diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-08-05 16:51:54 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-08-25 11:16:58 -0500 |
commit | 5248cc34cb57b31c27f67c15836455d26228d6db (patch) | |
tree | 0b2eb127f56d466f023b6c34a2a90bb4f215f74c | |
parent | d11481852434cce7f192bb678374577107b86ea9 (diff) | |
download | bundler-5248cc34cb57b31c27f67c15836455d26228d6db.tar.gz |
Automatically add platform to version in the spec’s builders
-rw-r--r-- | spec/support/builders.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb index 337234f1..7436779d 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -610,7 +610,10 @@ module Spec end def _default_files - @_default_files ||= { "lib/#{name}.rb" => "#{Builders.constantize(name)} = '#{version}'" } + @_default_files ||= begin + platform_string = " #{@spec.platform}" unless @spec.platform == Gem::Platform::RUBY + { "lib/#{name}.rb" => "#{Builders.constantize(name)} = '#{version}#{platform_string}'" } + end end def _default_path |