doubleshot 0.5.0-java → 0.6.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/Doubleshot +1 -1
- data/lib/doubleshot.rb +18 -18
- data/target/doubleshot.jar +0 -0
- metadata +2 -2
data/Doubleshot
CHANGED
data/lib/doubleshot.rb
CHANGED
@@ -67,7 +67,7 @@ class Doubleshot
|
|
67
67
|
#
|
68
68
|
# SCENARIO: You will run into this if you've added a new dependency
|
69
69
|
# (or made any other change) to your Doubleshot configuration file.
|
70
|
-
if path.exist? && lockfile.exist? && path.mtime > lockfile.mtime
|
70
|
+
if path && path.exist? && lockfile.exist? && path.mtime > lockfile.mtime
|
71
71
|
lockfile.delete
|
72
72
|
classpath_cache.delete if classpath_cache.exist?
|
73
73
|
end
|
@@ -89,20 +89,20 @@ class Doubleshot
|
|
89
89
|
load_gems! unless @config.runtime.gems.empty? && @config.development.gems.empty?
|
90
90
|
load_jars! unless @config.runtime.jars.empty? && @config.development.jars.empty?
|
91
91
|
end
|
92
|
-
|
92
|
+
|
93
93
|
def build!(conditional = true)
|
94
94
|
if !conditional && @config.target.exist?
|
95
95
|
@config.target.rmtree
|
96
96
|
end
|
97
|
-
|
97
|
+
|
98
98
|
return unless @config.source.java.exist?
|
99
|
-
|
99
|
+
|
100
100
|
compiler = Doubleshot::Compiler.new(@config.source.java, @config.target)
|
101
|
-
|
101
|
+
|
102
102
|
lockfile.jars.each do |jar|
|
103
103
|
compiler.classpath << jar.path
|
104
104
|
end
|
105
|
-
|
105
|
+
|
106
106
|
if !conditional || compiler.pending?
|
107
107
|
puts "Compiling..."
|
108
108
|
compiler.build! true
|
@@ -114,23 +114,23 @@ class Doubleshot
|
|
114
114
|
def load_gems!
|
115
115
|
if lockfile.gems.empty?
|
116
116
|
dependencies = @config.runtime.gems + @config.development.gems
|
117
|
-
|
117
|
+
|
118
118
|
puts "Dependencies not locked. Resolving the following:"
|
119
119
|
dependencies.each do |dependency|
|
120
120
|
puts " #{dependency.name}: #{dependency.requirements.map(&:to_s).join(", ")}"
|
121
121
|
end
|
122
|
-
|
122
|
+
|
123
123
|
unless dependencies.empty?
|
124
124
|
resolver = Resolver::GemResolver.new *@config.gem_repositories
|
125
125
|
puts "Using repositories: #{@config.gem_repositories.map(&:to_s).join(",")}"
|
126
|
-
|
126
|
+
|
127
127
|
resolver.resolve! dependencies
|
128
|
-
|
128
|
+
|
129
129
|
puts "Resolved dependencies:"
|
130
130
|
dependencies.each do |dependency|
|
131
131
|
puts " #{dependency.name}: #{dependency.version}"
|
132
132
|
end
|
133
|
-
|
133
|
+
|
134
134
|
require "rubygems/dependency_installer"
|
135
135
|
Gem::sources = @config.gem_repositories.entries
|
136
136
|
installer = Gem::DependencyInstaller.new domain: :both
|
@@ -145,7 +145,7 @@ class Doubleshot
|
|
145
145
|
end
|
146
146
|
lockfile.add dependency
|
147
147
|
end
|
148
|
-
|
148
|
+
|
149
149
|
dependencies.each { |dependency| lockfile.add dependency }
|
150
150
|
lockfile.flush!
|
151
151
|
end
|
@@ -195,21 +195,21 @@ class Doubleshot
|
|
195
195
|
# classpath_cache for future processes to use.
|
196
196
|
jars = @config.runtime.jars + @config.development.jars
|
197
197
|
unless jars.empty?
|
198
|
-
|
198
|
+
|
199
199
|
resolver = Resolver::JarResolver.new(*@config.mvn_repositories)
|
200
|
-
|
200
|
+
|
201
201
|
if lockfile.exist? && !lockfile.jars.empty?
|
202
202
|
jars = Dependencies::JarDependencyList.new
|
203
203
|
lockfile.jars.each do |jar|
|
204
204
|
jars.add jar
|
205
205
|
end
|
206
206
|
end
|
207
|
-
|
207
|
+
|
208
208
|
resolver.resolve! jars
|
209
|
-
|
209
|
+
|
210
210
|
jars.each { |jar| lockfile.add jar }
|
211
211
|
lockfile.flush!
|
212
|
-
|
212
|
+
|
213
213
|
cache = {}
|
214
214
|
jars.each do |jar|
|
215
215
|
cache[jar.to_s] = jar.path.to_s
|
@@ -221,7 +221,7 @@ class Doubleshot
|
|
221
221
|
raise
|
222
222
|
end
|
223
223
|
end
|
224
|
-
|
224
|
+
|
225
225
|
classpath_cache.open("w+") do |file|
|
226
226
|
file << cache.to_yaml
|
227
227
|
end
|
data/target/doubleshot.jar
CHANGED
Binary file
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: doubleshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.6.0
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Sam Smoot
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|