buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject [2/2] git commit: Fix the vcs detection in IDEA addon for 1.8.6 (!) versions of ruby by reordering blocks.
Date Thu, 15 May 2014 03:33:06 GMT
Fix the vcs detection in IDEA addon for 1.8.6 (!) versions of ruby by reordering blocks.


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

Branch: refs/heads/master
Commit: 8435984d1db897635f8a0e4bafb01e4b2aed5521
Parents: 946fc8a
Author: Peter Donald <peter@realityforge.org>
Authored: Thu May 15 13:32:50 2014 +1000
Committer: Peter Donald <peter@realityforge.org>
Committed: Thu May 15 13:32:50 2014 +1000

----------------------------------------------------------------------
 CHANGELOG              |  2 ++
 lib/buildr/ide/idea.rb | 14 +++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/8435984d/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 4aaae82..772742d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
 1.4.17 (Pending)
+* Fixed:  Fix the vcs detection in IDEA addon for 1.8.6 (!) versions
+          of ruby by reordering blocks.
 * Added:  Import 'buildr/custom_pom' addon to make it easier to
           build POMs for projects publishing to Maven Central.
 * Added:  Add flag to allow non portable extensions in wsgen addon.

http://git-wip-us.apache.org/repos/asf/buildr/blob/8435984d/lib/buildr/ide/idea.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/ide/idea.rb b/lib/buildr/ide/idea.rb
index 30a62af..f0c6271 100644
--- a/lib/buildr/ide/idea.rb
+++ b/lib/buildr/ide/idea.rb
@@ -942,13 +942,13 @@ module Buildr #:nodoc:
           end
         end
 
-        if mappings.size > 1
-          create_component("VcsDirectoryMappings") do |xml|
-            mappings.each_pair do |dir, vcs_type|
-              resolved_dir = resolve_path(dir)
-              mapped_dir = resolved_dir == '$PROJECT_DIR$/.' ? buildr_project.base_dir :
resolved_dir
-              xml.mapping :directory => mapped_dir, :vcs => vcs_type
-            end
+        return nil if 0 == mappings.size
+
+        create_component("VcsDirectoryMappings") do |xml|
+          mappings.each_pair do |dir, vcs_type|
+            resolved_dir = resolve_path(dir)
+            mapped_dir = resolved_dir == '$PROJECT_DIR$/.' ? buildr_project.base_dir : resolved_dir
+            xml.mapping :directory => mapped_dir, :vcs => vcs_type
           end
         end
       end


Mime
View raw message