Skip to content

Commit

Permalink
Automatically add platform to version in the spec’s builders
Browse files Browse the repository at this point in the history
  • Loading branch information
segiddins committed Aug 25, 2016
1 parent d114818 commit 5248cc3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/support/builders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,10 @@ def @spec.validate; end
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
Expand Down

0 comments on commit 5248cc3

Please sign in to comment.