diff options
author | 7rans <transfire@gmail.com> | 2010-11-06 14:23:15 -0400 |
---|---|---|
committer | Gabriel Horner <gabriel.horner@gmail.com> | 2011-07-09 14:11:05 -0400 |
commit | fd57ab852798225187e60f1f3be33aa6bead3907 (patch) | |
tree | 5052cf502a1b994ae63878f1df083054c5c4bb6f /lib | |
parent | f15de0cd2de9243ab1ca3ac5a64b813117696c2f (diff) | |
download | bundler-fd57ab852798225187e60f1f3be33aa6bead3907.tar.gz |
support hidden gemspec file
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/dsl.rb | 2 | ||||
-rw-r--r-- | lib/bundler/gem_helper.rb | 2 | ||||
-rw-r--r-- | lib/bundler/source.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb index fa80a76d..e9a2bd7a 100644 --- a/lib/bundler/dsl.rb +++ b/lib/bundler/dsl.rb @@ -22,7 +22,7 @@ module Bundler def gemspec(opts = nil) path = opts && opts[:path] || '.' - name = opts && opts[:name] || '*' + name = opts && opts[:name] || '{,*}' development_group = opts && opts[:development_group] || :development path = File.expand_path(path, Bundler.default_gemfile.dirname) gemspecs = Dir[File.join(path, "#{name}.gemspec")] diff --git a/lib/bundler/gem_helper.rb b/lib/bundler/gem_helper.rb index b906d5af..a3f83e58 100644 --- a/lib/bundler/gem_helper.rb +++ b/lib/bundler/gem_helper.rb @@ -16,7 +16,7 @@ module Bundler def initialize(base, name = nil) Bundler.ui = UI::Shell.new(Thor::Base.shell.new) @base = base - gemspecs = name ? [File.join(base, "#{name}.gemspec")] : Dir[File.join(base, "*.gemspec")] + gemspecs = name ? [File.join(base, "#{name}.gemspec")] : Dir[File.join(base, "{,*}.gemspec")] raise "Unable to determine name from existing gemspec. Use :name => 'gemname' in #install_tasks to manually set it." unless gemspecs.size == 1 @spec_path = gemspecs.first @gemspec = Bundler.load_gemspec(@spec_path) diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index 29e5139a..cf36e87f 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -280,7 +280,7 @@ module Bundler attr_writer :name attr_accessor :version - DEFAULT_GLOB = "{,*/}*.gemspec" + DEFAULT_GLOB = "{,*,*/*}.gemspec" def initialize(options) @options = options |