You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2012/05/20 02:01:51 UTC
svn commit: r1340594 - /buildr/trunk/buildr.gemspec
Author: donaldp
Date: Sun May 20 00:01:51 2012
New Revision: 1340594
URL: http://svn.apache.org/viewvc?rev=1340594&view=rev
Log:
Set the $platform global variable to the platform as a string and use that to guard construction of the gem as newer versions of rubygems use a complex object for platform rather than a string
Modified:
buildr/trunk/buildr.gemspec
Modified: buildr/trunk/buildr.gemspec
URL: http://svn.apache.org/viewvc/buildr/trunk/buildr.gemspec?rev=1340594&r1=1340593&r2=1340594&view=diff
==============================================================================
--- buildr/trunk/buildr.gemspec (original)
+++ buildr/trunk/buildr.gemspec Sun May 20 00:01:51 2012
@@ -18,6 +18,10 @@ unless defined?(Buildr::VERSION)
$LOADED_FEATURES << 'buildr/version.rb'
end
+# Rakefile needs to create spec for both platforms (ruby and java), using the
+# $platform global variable. In all other cases, we figure it out from RUBY_PLATFORM.
+$platform ||= RUBY_PLATFORM[/java/] || 'ruby'
+
Gem::Specification.new do |spec|
spec.name = 'buildr'
spec.version = Buildr::VERSION.dup
@@ -34,9 +38,7 @@ for those one-off tasks, with a language
TEXT
spec.rubyforge_project = 'buildr'
- # Rakefile needs to create spec for both platforms (ruby and java), using the
- # $platform global variable. In all other cases, we figure it out from RUBY_PLATFORM.
- spec.platform = $platform || RUBY_PLATFORM[/java/] || 'ruby'
+ spec.platform = $platform
spec.files = Dir['{addon,bin,doc,etc,lib,rakelib,spec}/**/*', '*.{gemspec,buildfile}'] +
['LICENSE', 'NOTICE', 'CHANGELOG', 'README.rdoc', 'Rakefile', '_buildr', '_jbuildr']
@@ -61,7 +63,7 @@ for those one-off tasks, with a language
spec.add_dependency 'json_pure', '1.4.3'
spec.add_dependency 'rubyforge', '2.0.3'
spec.add_dependency 'hoe', '2.3.3'
- spec.add_dependency 'rjb', '1.3.7' if spec.platform.to_s == 'x86-mswin32' || spec.platform.to_s == 'ruby'
+ spec.add_dependency 'rjb', '1.3.7' if ($platform.to_s == 'x86-mswin32' || $platform.to_s == 'ruby')
spec.add_dependency 'atoulme-Antwrap', '~> 0.7.2'
spec.add_dependency 'diff-lcs', '1.1.3'
spec.add_dependency 'rspec-expectations', '2.9.0'
@@ -70,10 +72,10 @@ for those one-off tasks, with a language
spec.add_dependency 'rspec', '2.9.0'
spec.add_dependency 'xml-simple', '1.0.12'
spec.add_dependency 'minitar', '0.5.3'
- spec.add_dependency 'jruby-openssl', '>= 0.7' if spec.platform.to_s == 'java'
+ spec.add_dependency 'jruby-openssl', '>= 0.7' if $platform.to_s == 'java'
# The documentation is currently not generated whe building via jruby
- unless spec.platform.to_s == 'java'
+ unless $platform.to_s == 'java'
spec.add_development_dependency 'jekyll', '0.11.0'
spec.add_development_dependency 'RedCloth', '4.2.9'
spec.add_development_dependency 'jekylltask', '1.1.0'
@@ -84,6 +86,6 @@ for those one-off tasks, with a language
spec.add_development_dependency 'ci_reporter', '1.6.3'
spec.add_development_dependency 'bundler'
- spec.add_development_dependency 'win32console' if spec.platform.to_s == 'x86-mswin32'
+ spec.add_development_dependency 'win32console' if $platform.to_s == 'x86-mswin32'
spec.add_development_dependency 'rubyforge'
end