naether 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
data/lib/naether.rb CHANGED
@@ -12,6 +12,7 @@ class Naether
12
12
 
13
13
  # Naether jar path will default to packaged in the gem
14
14
  JAR_LIB = "#{File.dirname(__FILE__)}/.."
15
+ JAR_PATH = "#{JAR_LIB}/naether-0.5.1.jar" #XXX: hardcoded, should be based on VERSION file
15
16
 
16
17
  class << self
17
18
 
@@ -69,29 +69,31 @@ class Naether
69
69
 
70
70
  deps[:downloaded] = []
71
71
 
72
- puts "Downloading jars for Naether"
73
-
74
- deps[:missing].each do |dep|
75
- notation = dep.split(":")
76
- group = notation[0].gsub("\.", File::SEPARATOR)
77
- artifact = notation[1]
78
- type = notation[2]
79
- version = notation[3]
80
-
81
- jar = "#{artifact}-#{version}.#{type}"
82
-
83
- maven_path = "#{dest}#{File::SEPARATOR}#{jar}"
84
-
85
- if !File.exists? maven_path
86
- maven_mirror = "http://repo1.maven.org/maven2/#{group}/#{artifact}/#{version}/#{jar}"
72
+ if deps[:missing].size > 0
73
+ puts "Downloading jars for Naether"
87
74
 
88
- open(maven_path, 'wb') do |io|
89
- io.print open(maven_mirror).read
90
- end
75
+ deps[:missing].each do |dep|
76
+ notation = dep.split(":")
77
+ group = notation[0].gsub("\.", File::SEPARATOR)
78
+ artifact = notation[1]
79
+ type = notation[2]
80
+ version = notation[3]
91
81
 
92
- deps[:downloaded] << { dep => maven_path }
93
- else
94
- deps[:exists] << maven_path
82
+ jar = "#{artifact}-#{version}.#{type}"
83
+
84
+ maven_path = "#{dest}#{File::SEPARATOR}#{jar}"
85
+
86
+ if !File.exists? maven_path
87
+ maven_mirror = "http://repo1.maven.org/maven2/#{group}/#{artifact}/#{version}/#{jar}"
88
+
89
+ open(maven_path, 'wb') do |io|
90
+ io.print open(maven_mirror).read
91
+ end
92
+
93
+ deps[:downloaded] << { dep => maven_path }
94
+ else
95
+ deps[:exists] << { dep => maven_path }
96
+ end
95
97
  end
96
98
  end
97
99
 
@@ -120,7 +122,7 @@ class Naether
120
122
  maven_path = "#{local_repo}#{File::SEPARATOR}#{group}#{File::SEPARATOR}#{artifact}#{File::SEPARATOR}#{version}#{File::SEPARATOR}#{jar}"
121
123
 
122
124
  if File.exists? maven_path
123
- deps[:exists] << dep
125
+ deps[:exists] << { dep => maven_path }
124
126
  else
125
127
  deps[:missing] << dep
126
128
  end
@@ -131,8 +133,6 @@ class Naether
131
133
  end
132
134
 
133
135
  def install_dependencies_to_local_repo( jars_or_dir, opts = {} )
134
-
135
- deps = check_local_repo_for_deps(opts[:local_repo])
136
136
 
137
137
  @naether = nil
138
138
  jars = []
data/pom.xml CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  <groupId>com.slackworks</groupId>
6
6
  <artifactId>naether</artifactId>
7
- <version>0.5.0</version>
7
+ <version>0.5.1</version>
8
8
  <packaging>jar</packaging>
9
9
  <name>naether</name>
10
10
  <url>https://github.com/mguymon/naether</url>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: naether
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 0
10
- version: 0.5.0
9
+ - 1
10
+ version: 0.5.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Guymon
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-20 00:00:00 -05:00
18
+ date: 2011-11-21 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -99,7 +99,7 @@ files:
99
99
  - lib/naether.rb
100
100
  - lib/naether/bootstrap.rb
101
101
  - lib/naether/java.rb
102
- - naether-0.5.0.jar
102
+ - naether-0.5.1.jar
103
103
  - pom.xml
104
104
  has_rdoc: true
105
105
  homepage: http://github.com/mguymon/naether