Title: [585] trunk/rails-integration/plugins/goldspike-snapshot/lib/java_library.rb: reformatted source for java_library
Revision
585
Author
fausto
Date
2007-05-13 08:50:37 -0400 (Sun, 13 May 2007)

Log Message

reformatted source for java_library

Modified Paths


Diff

Modified: trunk/rails-integration/plugins/goldspike-snapshot/lib/java_library.rb (584 => 585)


--- trunk/rails-integration/plugins/goldspike-snapshot/lib/java_library.rb	2007-05-13 12:32:50 UTC (rev 584)
+++ trunk/rails-integration/plugins/goldspike-snapshot/lib/java_library.rb	2007-05-13 12:50:37 UTC (rev 585)
@@ -19,14 +19,14 @@
       check_locations = local_locations(name, version)
       
       if locations.is_a?(String)
-			    locations = [ locations ]
-			end 
+        locations = [ locations ]
+      end 
       check_locations += locations
       @locations =  check_locations
     end
     
     def file
-    "#{artifact}-#{version}.jar"
+      "#{artifact}-#{version}.jar"
     end
     
     def install(config, target_file)
@@ -45,8 +45,8 @@
         raise <<-ERROR
         The library #{self} could not be obtained from in any of the following locations:
           + #{locations.join("
-          + ")}
-      ERROR
+        + ")}
+        ERROR
       end
     end
     
@@ -85,51 +85,51 @@
     end
     
     def to_s
-    "#{artifact}-#{version}"
+      "#{artifact}-#{version}"
     end
     
     
-		 def local_locations(artifact, version, type='jar')
-				WLog.debug("locations for " + artifact + " " + version);
-				paths = []
-				if config.local_java_lib
-					paths << File.join(local_java_lib, "#{artifact}-#{version}.#{type}")
-					paths << File.join(local_java_lib, "#{artifact}.#{type}")
-				end
-				if config.jruby_home
-					paths << File.join(jruby_home, 'lib', "#{artifact}-#{version}.#{type}")
-					paths << File.join(jruby_home, 'lib', "#{artifact}.#{type}")
-				end
-				WLog.debug("paths: " + paths.join("\n"))
-				return paths
-			end
+    def local_locations(artifact, version, type='jar')
+      WLog.debug("locations for " + artifact + " " + version);
+      paths = []
+      if config.local_java_lib
+        paths << File.join(local_java_lib, "#{artifact}-#{version}.#{type}")
+        paths << File.join(local_java_lib, "#{artifact}.#{type}")
+      end
+      if config.jruby_home
+        paths << File.join(jruby_home, 'lib', "#{artifact}-#{version}.#{type}")
+        paths << File.join(jruby_home, 'lib', "#{artifact}.#{type}")
+      end
+      WLog.debug("paths: " + paths.join("\n"))
+      return paths
+    end
 
   end #class
 
-	class MavenLibrary < JavaLibrary
+  class MavenLibrary < JavaLibrary
 
-	attr_accessor :group, :name, :version, :config
+    attr_accessor :group, :name, :version, :config
 
-	def initialize (group, name, version, config)
-	      @config = config
-	      @group = group
-	      @locations = maven_locations(group, name, version)   
-	end
+    def initialize (group, name, version, config)
+      @config = config
+      @group = group
+      @locations = maven_locations(group, name, version)   
+    end
 	
-		def maven_locations(group, artifact, version, type='jar')
-			paths = []
-			maven_local_repository = config.maven_local_repository
-			maven_remote_repository = config.maven_remote_repository
-			if maven_local_repository
-				paths << File.join(maven_local_repository, group.gsub('.', File::SEPARATOR), artifact, version, "#{artifact}-#{version}.#{type}")
-			end
-			if maven_remote_repository
-				paths << "#{maven_remote_repository}/#{group.gsub('.', '/')}/#{artifact}/#{version}/#{artifact}-#{version}.#{type}"
-			end
-			return paths
-		end
+    def maven_locations(group, artifact, version, type='jar')
+      paths = []
+      maven_local_repository = config.maven_local_repository
+      maven_remote_repository = config.maven_remote_repository
+      if maven_local_repository
+        paths << File.join(maven_local_repository, group.gsub('.', File::SEPARATOR), artifact, version, "#{artifact}-#{version}.#{type}")
+      end
+      if maven_remote_repository
+        paths << "#{maven_remote_repository}/#{group.gsub('.', '/')}/#{artifact}/#{version}/#{artifact}-#{version}.#{type}"
+      end
+      return paths
+    end
 
-	end
+  end
 
 
 
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to