From 0a2a4df098625b4263c14ca2eefe1046aedfbfa7 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Sat, 14 Aug 2010 22:58:34 -0700 Subject: Create gem version files that work with nested constants --- lib/bundler/cli.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/bundler/cli.rb') diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index e22b3f0d51..7e5ae32636 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -430,8 +430,9 @@ module Bundler constant_name = name.split('_').map{|p| p.capitalize}.join constant_name = constant_name.split('-').map{|q| q.capitalize}.join('::') if constant_name =~ /-/ + constant_array = constant_name.split('::') FileUtils.mkdir_p(File.join(target, 'lib', name)) - opts = {:name => name, :constant_name => constant_name} + opts = {:name => name, :constant_name => constant_name, :constant_array => constant_array} template(File.join('newgem', 'Gemfile.tt'), File.join(target, 'Gemfile'), opts) template(File.join('newgem', 'Rakefile.tt'), File.join(target, 'Rakefile'), opts) template(File.join('newgem', 'gitignore.tt'), File.join(target, '.gitignore'), opts) -- cgit v1.2.1