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 2014/08/23 05:45:36 UTC

[1/2] git commit: Use single quotes where possible

Repository: buildr
Updated Branches:
  refs/heads/master bba6350cb -> 2a4892a5c


Use single quotes where possible


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/e2423a1e
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/e2423a1e
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/e2423a1e

Branch: refs/heads/master
Commit: e2423a1ecbed407c5bb9836c869f198c0b822824
Parents: bba6350
Author: Peter Donald <pe...@realityforge.org>
Authored: Sat Aug 23 09:10:53 2014 +1000
Committer: Peter Donald <pe...@realityforge.org>
Committed: Sat Aug 23 09:10:53 2014 +1000

----------------------------------------------------------------------
 buildr.gemspec | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/e2423a1e/buildr.gemspec
----------------------------------------------------------------------
diff --git a/buildr.gemspec b/buildr.gemspec
index 6e22b11..05c5ed8 100644
--- a/buildr.gemspec
+++ b/buildr.gemspec
@@ -26,9 +26,9 @@ Gem::Specification.new do |spec|
   spec.name           = 'buildr'
   spec.version        = Buildr::VERSION.dup
   spec.author         = 'Apache Buildr'
-  spec.email          = "users@buildr.apache.org"
-  spec.homepage       = "http://buildr.apache.org/"
-  spec.summary        = "Build like you code"
+  spec.email          = 'users@buildr.apache.org'
+  spec.homepage       = 'http://buildr.apache.org/'
+  spec.summary        = 'Build like you code'
   spec.description    = <<-TEXT
 Apache Buildr is a build system for Java-based applications, including support
 for Scala, Groovy and a growing number of JVM languages and tools.  We wanted
@@ -49,9 +49,9 @@ for those one-off tasks, with a language that's a joy to use.
   spec.extra_rdoc_files = 'README.rdoc', 'CHANGELOG', 'LICENSE', 'NOTICE'
   spec.rdoc_options     = '--title', 'Buildr', '--main', 'README.rdoc',
                           '--webcvs', 'https://github.com/apache/buildr'
-  spec.post_install_message = "To get started run buildr --help"
+  spec.post_install_message = 'To get started run buildr --help'
 
-  spec.required_rubygems_version = ">= 1.8.6"
+  spec.required_rubygems_version = '>= 1.8.6'
 
   # Tested against these dependencies.
   spec.add_dependency 'rake',                 '0.9.2.2'
@@ -59,7 +59,7 @@ for those one-off tasks, with a language that's a joy to use.
   spec.add_dependency 'net-ssh',              '2.7.0'
   spec.add_dependency 'net-sftp',             '2.1.2'
   # Required for sftp support under windows
-  spec.add_dependency "jruby-pageant",        '1.1.1' if $platform.to_s == 'java'
+  spec.add_dependency 'jruby-pageant',        '1.1.1' if $platform.to_s == 'java'
   spec.add_dependency 'rubyzip',              '0.9.9'
   spec.add_dependency 'json_pure',            '1.8.0'
   spec.add_dependency 'hoe',                  '3.7.1'


[2/2] git commit: Work around bug/feature of jruby 1.7.13 that caches Gem::Version objects based on constructor parameters that causes issues with Buildr as we mutate the version objects through monkey patching.

Posted by do...@apache.org.
Work around bug/feature of jruby 1.7.13 that caches Gem::Version
objects based on constructor parameters that causes issues with
Buildr as we mutate the version objects through monkey patching.


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/2a4892a5
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/2a4892a5
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/2a4892a5

Branch: refs/heads/master
Commit: 2a4892a5cf098d864f213a7ee4257f43728012f4
Parents: e2423a1
Author: Peter Donald <pe...@realityforge.org>
Authored: Sat Aug 23 13:45:12 2014 +1000
Committer: Peter Donald <pe...@realityforge.org>
Committed: Sat Aug 23 13:45:12 2014 +1000

----------------------------------------------------------------------
 CHANGELOG                                   |  3 +++
 lib/buildr/java/version_requirement.rb      |  6 ++++--
 lib/buildr/packaging/version_requirement.rb | 11 ++++++-----
 3 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/2a4892a5/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index c4746ac..e1b99c1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,7 @@
 1.4.20 (Pending)
+* Fixed : Work around bug/feature of jruby 1.7.13 that caches Gem::Version
+          objects based on constructor parameters that causes issues with
+          Buildr as we mutate the version objects through monkey patching.
 * Change: Upgrade rjb dependency to 1.4.9.
 * Change: BUILDR-701 - Update to JUnit 4.11. Submitted by Jean-Philippe Caruana.
 * Added:  Support the 'report_level' property on findbugs addon.

http://git-wip-us.apache.org/repos/asf/buildr/blob/2a4892a5/lib/buildr/java/version_requirement.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/java/version_requirement.rb b/lib/buildr/java/version_requirement.rb
index 8b796cd..fd7f6cd 100644
--- a/lib/buildr/java/version_requirement.rb
+++ b/lib/buildr/java/version_requirement.rb
@@ -53,7 +53,8 @@ module Buildr #:nodoc:
           raise "Invalid requirement string: #{req}"
         end
         comparator, version = $1, $2
-        version = Gem::Version.new(0).tap { |v| v.version = version }
+        # dup required due to jruby 1.7.13 bug/feature that caches versions?
+        version = Gem::Version.new(0).dup.tap { |v| v.version = version }
         VersionRequirement.new(nil, [$1, version])
       end
 
@@ -122,7 +123,8 @@ module Buildr #:nodoc:
       return false unless version
       unless version.kind_of?(Gem::Version)
         raise "Invalid version: #{version.inspect}" unless self.class.version?(version)
-        version = Gem::Version.new(0).tap { |v| v.version = version.strip }
+        # dup required due to jruby 1.7.13 bug/feature that caches versions?
+        version = Gem::Version.new(0).dup.tap { |v| v.version = version.strip }
       end
       message = op == :| ? :any? : :all?
       result = requirements.send message do |req|

http://git-wip-us.apache.org/repos/asf/buildr/blob/2a4892a5/lib/buildr/packaging/version_requirement.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/packaging/version_requirement.rb b/lib/buildr/packaging/version_requirement.rb
index c5a6d95..450a825 100644
--- a/lib/buildr/packaging/version_requirement.rb
+++ b/lib/buildr/packaging/version_requirement.rb
@@ -17,11 +17,10 @@
 # Rubygems 1.3.6 removed the 'version' accessor so monkey-patch it back to
 # circumvent version validation.  This is needed because Gem::Version doesn't
 # accept version specs with dashes.
-unless Gem::Version.new(0).respond_to?(:version=)
+unless Gem::Version.new("0").respond_to?(:version=)
   class Gem::Version
     def version=(version)
-      @version = version.to_s
-      @version.strip!
+      @version = version.to_s.strip
 
       # re-prime @segments
       @segments = nil
@@ -73,7 +72,8 @@ module Buildr #:nodoc:
           raise "Invalid requirement string: #{req}"
         end
         comparator, version = $1, $2
-        version = Gem::Version.new(0).tap { |v| v.version = version }
+        # dup required due to jruby 1.7.13 bug/feature that caches versions?
+        version = Gem::Version.new(0).dup.tap { |v| v.version = version }
         VersionRequirement.new(nil, [$1, version])
       end
 
@@ -142,7 +142,8 @@ module Buildr #:nodoc:
       return false unless version
       unless version.kind_of?(Gem::Version)
         raise "Invalid version: #{version.inspect}" unless self.class.version?(version)
-        version = Gem::Version.new(0).tap { |v| v.version = version.strip }
+        # dup required due to jruby 1.7.13 bug/feature that caches versions?
+        version = Gem::Version.new(0).dup.tap { |v| v.version = version.strip }
       end
       message = op == :| ? :any? : :all?
       result = requirements.send message do |req|