lock_jar 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/lock_jar/resolver.rb +1 -0
- data/lib/lock_jar/runtime.rb +6 -6
- data/lock_jar.gemspec +1 -1
- data/spec/Jarfile +1 -1
- data/spec/lock_jar/dsl_spec.rb +1 -1
- data/spec/lock_jar_spec.rb +4 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.6
|
data/lib/lock_jar/resolver.rb
CHANGED
data/lib/lock_jar/runtime.rb
CHANGED
@@ -88,12 +88,7 @@ module LockJar
|
|
88
88
|
lock_data['local_repository'] = lock_data['local_repository'].force_encoding("UTF-8")
|
89
89
|
end
|
90
90
|
end
|
91
|
-
|
92
|
-
lock_data['repositories'] = resolver(opts).remote_repositories
|
93
|
-
if needs_force_encoding
|
94
|
-
lock_data['repositories'].map! { |repo| repo.force_encoding("UTF-8") }
|
95
|
-
end
|
96
|
-
|
91
|
+
|
97
92
|
if lock_jar_file.maps.size > 0
|
98
93
|
lock_data['maps'] = lock_jar_file.maps
|
99
94
|
end
|
@@ -122,6 +117,11 @@ module LockJar
|
|
122
117
|
if dependencies.size > 0
|
123
118
|
resolved_notations = resolver(opts).resolve( dependencies, opts[:download] == true )
|
124
119
|
|
120
|
+
lock_data['repositories'] = resolver(opts).remote_repositories.uniq
|
121
|
+
if needs_force_encoding
|
122
|
+
lock_data['repositories'].map! { |repo| repo.force_encoding("UTF-8") }
|
123
|
+
end
|
124
|
+
|
125
125
|
if lock_data['excludes']
|
126
126
|
lock_data['excludes'].each do |exclude|
|
127
127
|
resolved_notations.delete_if { |dep| dep =~ /#{exclude}/ }
|
data/lock_jar.gemspec
CHANGED
data/spec/Jarfile
CHANGED
data/spec/lock_jar/dsl_spec.rb
CHANGED
@@ -7,7 +7,7 @@ describe LockJar::Dsl do
|
|
7
7
|
|
8
8
|
jarfile.local_repository.should eql '~/.m2'
|
9
9
|
jarfile.notations.should eql( {"compile"=>["org.apache.mina:mina-core:2.0.4", "spec/pom.xml"], "runtime"=>["spec/pom.xml", "org.apache.tomcat:servlet-api:jar:6.0.35"], "test"=>["spec/pom.xml", "junit:junit:jar:4.10"]} )
|
10
|
-
jarfile.repositories.should eql( [
|
10
|
+
jarfile.repositories.should eql( ['http://mirrors.ibiblio.org/pub/mirrors/maven2'] )
|
11
11
|
end
|
12
12
|
|
13
13
|
it "should load a block" do
|
data/spec/lock_jar_spec.rb
CHANGED
@@ -17,7 +17,7 @@ describe LockJar, "#lock" do
|
|
17
17
|
lockfile = LockJar.read('tmp/Jarfile.lock')
|
18
18
|
lockfile.should eql( {
|
19
19
|
"local_repository" => "~/.m2",
|
20
|
-
"repositories" => ["http://repo1.maven.org/maven2/", "http://repository.jboss.org/nexus/content/groups/public-jboss"],
|
20
|
+
"repositories" => ["http://repo1.maven.org/maven2/", 'http://mirrors.ibiblio.org/pub/mirrors/maven2', "http://repository.jboss.org/nexus/content/groups/public-jboss"],
|
21
21
|
"scopes" => {
|
22
22
|
"compile"=>{
|
23
23
|
"dependencies"=>["org.apache.mina:mina-core:2.0.4", "spec/pom.xml"],
|
@@ -44,6 +44,7 @@ describe LockJar, "#lock" do
|
|
44
44
|
LockJar.lock( dsl, :local_repo => 'tmp/test-repo', :lockfile => 'tmp/Jarfile.lock' )
|
45
45
|
lockfile = LockJar.read('tmp/Jarfile.lock')
|
46
46
|
lockfile.should eql( {
|
47
|
+
"repositories" => ["http://repo1.maven.org/maven2/", 'http://mirrors.ibiblio.org/pub/mirrors/maven2', "http://repository.jboss.org/nexus/content/groups/public-jboss"],
|
47
48
|
"maps"=>{"junit:junit:4.10"=>["tmp"]},
|
48
49
|
"scopes"=>{
|
49
50
|
"compile"=>{
|
@@ -60,6 +61,7 @@ describe LockJar, "#lock" do
|
|
60
61
|
File.exists?( 'tmp/Jarfile.lock' ).should be_true
|
61
62
|
lockfile = LockJar.read('tmp/Jarfile.lock')
|
62
63
|
lockfile.should eql( {
|
64
|
+
"repositories" => ["http://repo1.maven.org/maven2/", 'http://mirrors.ibiblio.org/pub/mirrors/maven2', "http://repository.jboss.org/nexus/content/groups/public-jboss"],
|
63
65
|
"excludes"=>["commons-logging", "logkit"],
|
64
66
|
"scopes"=>{
|
65
67
|
"compile"=>{
|
@@ -78,6 +80,7 @@ describe LockJar, "#lock" do
|
|
78
80
|
|
79
81
|
lockfile = LockJar.read('tmp/NoRepoJarfile.lock')
|
80
82
|
lockfile.should eql( {
|
83
|
+
"repositories" => ["http://repo1.maven.org/maven2/"],
|
81
84
|
"scopes"=>{
|
82
85
|
"compile"=>{
|
83
86
|
"dependencies"=>["org.eclipse.jetty:jetty-servlet:8.1.3.v20120416"],
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lock_jar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -173,7 +173,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
segments:
|
175
175
|
- 0
|
176
|
-
hash: -
|
176
|
+
hash: -1691747764608271872
|
177
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
178
|
none: false
|
179
179
|
requirements:
|