diff options
author | Andre Arko <andre@arko.net> | 2015-05-17 12:39:34 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-05-17 13:13:43 -0700 |
commit | 7aaee7a002fd8a8d0ed03b839a6867f8d2083fb5 (patch) | |
tree | 0e54bd02178149537b307c07b6d04a11d50d86a4 /spec/support/builders.rb | |
parent | 858afa5cfec914bd3c9d6242d1ae49cd6c227fa1 (diff) | |
download | bundler-7aaee7a002fd8a8d0ed03b839a6867f8d2083fb5.tar.gz |
RubyGems can only validate during chdir
Since it turns out that Specification#validate only works correctly if
the cwd is the directory that contains the gemspec, we now validate at
the same time as we load the gemspec. At least then we’ve already had
to chdir, so we can validate correctly.
Diffstat (limited to 'spec/support/builders.rb')
-rw-r--r-- | spec/support/builders.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb index 1a1c9167..4dbcb298 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -456,10 +456,12 @@ module Spec end def executables=(val) - Array(val).each do |file| - write "#{@spec.bindir}/#{file}", "require '#{@name}' ; puts #{@name.upcase}" - end @spec.executables = Array(val) + @spec.executables.each do |file| + executable = "#{@spec.bindir}/#{file}" + @spec.files << executable + write executable, "require '#{@name}' ; puts #{@name.upcase}" + end end def add_c_extension |