ivy4r 0.12.6 → 0.12.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/.project +17 -0
- data/{History.txt → CHANGELOG} +4 -0
- data/Gemfile +5 -0
- data/Rakefile +35 -31
- data/ivy4r.gemspec +29 -0
- data/lib/buildr/ivy_extension.rb +3 -5
- data/lib/ivy4r.rb +0 -2
- data/lib/ivy4r/version.rb +3 -0
- data/{test → test-functional}/buildlist/p1/buildfile +0 -0
- data/{test → test-functional}/buildlist/p1/ivy.xml +7 -7
- data/{test → test-functional}/buildlist/sub/p2/buildfile +0 -0
- data/{test → test-functional}/buildlist/sub/p2/ivy.xml +11 -11
- data/{test → test-functional}/buildlist/sub/p3/buildfile +0 -0
- data/{test → test-functional}/buildlist/sub/p3/ivy.xml +11 -11
- data/{test → test-functional}/ivy/ivysettings.xml +11 -11
- data/{test → test-functional}/ivy/ivytest.xml +18 -18
- data/{test → test-functional}/ivy/test_target.rb +99 -97
- data/{test → test-functional}/ivy/test_targets.rb +34 -34
- data/{test → test-functional}/test_ivy4r.rb +0 -0
- metadata +98 -67
- data/Manifest.txt +0 -40
- data/bin/ivy4r +0 -3
data/.gitignore
ADDED
data/.project
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<projectDescription>
|
3
|
+
<name>ivy4r</name>
|
4
|
+
<comment></comment>
|
5
|
+
<projects>
|
6
|
+
</projects>
|
7
|
+
<buildSpec>
|
8
|
+
<buildCommand>
|
9
|
+
<name>org.rubypeople.rdt.core.rubybuilder</name>
|
10
|
+
<arguments>
|
11
|
+
</arguments>
|
12
|
+
</buildCommand>
|
13
|
+
</buildSpec>
|
14
|
+
<natures>
|
15
|
+
<nature>org.rubypeople.rdt.core.rubynature</nature>
|
16
|
+
</natures>
|
17
|
+
</projectDescription>
|
data/{History.txt → CHANGELOG}
RENAMED
data/Rakefile
CHANGED
@@ -1,38 +1,42 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require "rubygems"
|
2
|
+
require "bundler"
|
3
|
+
require "rake"
|
4
|
+
require "rake/testtask"
|
3
5
|
|
4
|
-
|
5
|
-
require
|
6
|
-
require 'ivy4r'
|
7
|
-
|
8
|
-
hoe = Hoe.spec 'ivy4r' do |p|
|
9
|
-
p.developer('Klaas Reineke', 'klaas.reineke@googlemail.com')
|
10
|
-
p.remote_rdoc_dir = 'ivy4r'
|
11
|
-
p.extra_deps << ['Antwrap', '>=0.7.0']
|
12
|
-
p.extra_deps << ['ivy4r-jars', '>=1.2.0']
|
13
|
-
p.extra_deps << ['facets', '>=2.5.2']
|
14
|
-
#p.extra_deps << ['thoughtbot-shoulda', '>=2.5.2']
|
15
|
-
#p.extra_deps << ['rr', '>=0.10.0']
|
16
|
-
File.open(File.join(File.dirname(__FILE__), 'VERSION'), 'w') do |file|
|
17
|
-
file.puts Ivy4r::VERSION
|
18
|
-
end
|
19
|
-
end
|
6
|
+
$:.unshift File.join(File.dirname(__FILE__),'lib')
|
7
|
+
require "ivy4r/version"
|
20
8
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
9
|
+
# Todo
|
10
|
+
require "rspec/core/rake_task"
|
11
|
+
RSpec::Core::RakeTask.new :spec
|
12
|
+
#task :default => :spec
|
13
|
+
|
14
|
+
desc "Functional test execution not that this only works under MRI and not with JRuby 1.5.1"
|
15
|
+
Rake::TestTask.new :test_functional do |t|
|
16
|
+
Bundler.require :development
|
17
|
+
t.test_files = FileList['test-functional/**/test*.rb']
|
18
|
+
t.verbose = true
|
26
19
|
end
|
27
20
|
|
28
|
-
task :
|
21
|
+
task :build => :test_functional do
|
22
|
+
system "gem build ivy4r.gemspec"
|
23
|
+
end
|
24
|
+
|
25
|
+
task :release => :build do
|
26
|
+
system "gem push ivy4r-#{Ivy4r::VERSION}.gem"
|
27
|
+
end
|
29
28
|
|
30
|
-
|
31
|
-
|
29
|
+
# Todo
|
30
|
+
begin
|
31
|
+
require "hanna/rdoctask"
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
Rake::RDocTask.new do |t|
|
34
|
+
t.title = "Ivy4r - Ruby interface to Apache Ivy dependency management with integration for Buildr and Rake"
|
35
|
+
t.rdoc_dir = "doc"
|
36
|
+
t.rdoc_files.include("**/*.rdoc").include("lib/**/*.rb")
|
37
|
+
t.options << "--line-numbers"
|
38
|
+
t.options << "--webcvs=http://github.com/klaas1979/ivy4r/tree/master/"
|
39
|
+
end
|
40
|
+
rescue LoadError
|
41
|
+
puts "'gem install hanna' to generate documentation"
|
36
42
|
end
|
37
|
-
|
38
|
-
# vim: syntax=ruby
|
data/ivy4r.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "ivy4r/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "ivy4r"
|
7
|
+
s.version = Ivy4r::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Klaas Reineke"]
|
10
|
+
s.email = ["klaas.reineke@googlemail.com"]
|
11
|
+
s.homepage = "http://github.com/klaas1979/ivy4r"
|
12
|
+
s.summary = %q{Ivy4r Apache Ivy dependency management for Ruby}
|
13
|
+
s.description = %q{Ivy4r is a Ruby interface for Apache Ivy dependency management library. Offers support for using Ivy with Buildr and Rake.}
|
14
|
+
|
15
|
+
s.rubyforge_project = "ivy4r"
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
#s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
|
22
|
+
s.add_dependency 'facets', '>= 2.9.0'
|
23
|
+
s.add_dependency 'Antwrap', '>= 0.7.0'
|
24
|
+
s.add_dependency 'ivy4r-jars', '>= 1.2.0'
|
25
|
+
|
26
|
+
s.add_development_dependency 'rspec', '>= 2.0.0'
|
27
|
+
s.add_development_dependency 'mocha', '>= 0.9.8'
|
28
|
+
s.add_development_dependency 'rr' # for old functional tests
|
29
|
+
end
|
data/lib/buildr/ivy_extension.rb
CHANGED
@@ -131,10 +131,8 @@ module Buildr
|
|
131
131
|
if @base_ivy
|
132
132
|
@base_ivy.info
|
133
133
|
else
|
134
|
-
|
135
|
-
|
136
|
-
@ivy4r = nil
|
137
|
-
result
|
134
|
+
configure
|
135
|
+
ivy4r.info :file => file
|
138
136
|
end
|
139
137
|
end
|
140
138
|
|
@@ -172,7 +170,7 @@ module Buildr
|
|
172
170
|
else
|
173
171
|
{
|
174
172
|
'organisation' => @resolved['ivy.organisation'],
|
175
|
-
'module' => @resolved['ivy.
|
173
|
+
'module' => @resolved['ivy.module'],
|
176
174
|
'revision' => revision
|
177
175
|
}
|
178
176
|
end
|
data/lib/ivy4r.rb
CHANGED
File without changes
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<?xml-stylesheet type="text/xsl" href="http://www.ivyrep.org/ivy-doc.xsl"?>
|
3
|
-
<ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
-
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
|
5
|
-
|
6
|
-
<info organisation="blau" module="p1" revision="1.0" />
|
7
|
-
</ivy-module>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<?xml-stylesheet type="text/xsl" href="http://www.ivyrep.org/ivy-doc.xsl"?>
|
3
|
+
<ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
+
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
|
5
|
+
|
6
|
+
<info organisation="blau" module="p1" revision="1.0" />
|
7
|
+
</ivy-module>
|
File without changes
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<?xml-stylesheet type="text/xsl" href="http://www.ivyrep.org/ivy-doc.xsl"?>
|
3
|
-
<ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
-
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
|
5
|
-
|
6
|
-
<info organisation="blau" module="p2" revision="1.1" />
|
7
|
-
|
8
|
-
<dependencies>
|
9
|
-
<dependency org="blau" name="p1" rev="1.0" conf="*->default" />
|
10
|
-
</dependencies>
|
11
|
-
</ivy-module>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<?xml-stylesheet type="text/xsl" href="http://www.ivyrep.org/ivy-doc.xsl"?>
|
3
|
+
<ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
+
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
|
5
|
+
|
6
|
+
<info organisation="blau" module="p2" revision="1.1" />
|
7
|
+
|
8
|
+
<dependencies>
|
9
|
+
<dependency org="blau" name="p1" rev="1.0" conf="*->default" />
|
10
|
+
</dependencies>
|
11
|
+
</ivy-module>
|
File without changes
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<?xml-stylesheet type="text/xsl" href="http://www.ivyrep.org/ivy-doc.xsl"?>
|
3
|
-
<ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
-
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
|
5
|
-
|
6
|
-
<info organisation="blau" module="p3" revision="1.1" />
|
7
|
-
|
8
|
-
<dependencies>
|
9
|
-
<dependency org="blau" name="p2" rev="1.1" conf="*->default" />
|
10
|
-
</dependencies>
|
11
|
-
</ivy-module>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<?xml-stylesheet type="text/xsl" href="http://www.ivyrep.org/ivy-doc.xsl"?>
|
3
|
+
<ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
+
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
|
5
|
+
|
6
|
+
<info organisation="blau" module="p3" revision="1.1" />
|
7
|
+
|
8
|
+
<dependencies>
|
9
|
+
<dependency org="blau" name="p2" rev="1.1" conf="*->default" />
|
10
|
+
</dependencies>
|
11
|
+
</ivy-module>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<ivysettings>
|
2
|
-
<property name="myparam" value="myvalue" />
|
3
|
-
<settings defaultCache="/tmp" defaultResolver="ibiblio" checkUpToDate="false" />
|
4
|
-
<resolvers>
|
5
|
-
<ibiblio name="ibiblio" />
|
6
|
-
<filesystem name="internal">
|
7
|
-
<ivy pattern="/tmp/[module]/ivy-[revision].xml" />
|
8
|
-
<artifact pattern="/tmp/[module]/[artifact]-[revision].[ext]" />
|
9
|
-
</filesystem>
|
10
|
-
</resolvers>
|
11
|
-
</ivysettings>
|
1
|
+
<ivysettings>
|
2
|
+
<property name="myparam" value="myvalue" />
|
3
|
+
<settings defaultCache="/tmp" defaultResolver="ibiblio" checkUpToDate="false" />
|
4
|
+
<resolvers>
|
5
|
+
<ibiblio name="ibiblio" />
|
6
|
+
<filesystem name="internal">
|
7
|
+
<ivy pattern="/tmp/[module]/ivy-[revision].xml" />
|
8
|
+
<artifact pattern="/tmp/[module]/[artifact]-[revision].[ext]" />
|
9
|
+
</filesystem>
|
10
|
+
</resolvers>
|
11
|
+
</ivysettings>
|
@@ -1,18 +1,18 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<?xml-stylesheet type="text/xsl" href="http://www.ivyrep.org/ivy-doc.xsl"?>
|
3
|
-
<ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
-
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
|
5
|
-
|
6
|
-
<info organisation="blau" module="testmodule" revision="2.20.0" />
|
7
|
-
|
8
|
-
<configurations defaultconfmapping="client">
|
9
|
-
<conf name="deploy" description="Contains the deployable artifacts for the Project." />
|
10
|
-
<conf name="reports" description="Contains all buildreports for the Project." />
|
11
|
-
<conf name="basic" visibility="private" description="Basic dependencies needed for all configurations."/>
|
12
|
-
<conf name="test" extends="basic" visibility="private" description="Only needed for testing of project."/>
|
13
|
-
</configurations>
|
14
|
-
|
15
|
-
<dependencies>
|
16
|
-
<dependency org="oro" name="oro" rev="2.0.8" conf="*->default" />
|
17
|
-
</dependencies>
|
18
|
-
</ivy-module>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<?xml-stylesheet type="text/xsl" href="http://www.ivyrep.org/ivy-doc.xsl"?>
|
3
|
+
<ivy-module version="1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
4
|
+
xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd">
|
5
|
+
|
6
|
+
<info organisation="blau" module="testmodule" revision="2.20.0" />
|
7
|
+
|
8
|
+
<configurations defaultconfmapping="client">
|
9
|
+
<conf name="deploy" description="Contains the deployable artifacts for the Project." />
|
10
|
+
<conf name="reports" description="Contains all buildreports for the Project." />
|
11
|
+
<conf name="basic" visibility="private" description="Basic dependencies needed for all configurations."/>
|
12
|
+
<conf name="test" extends="basic" visibility="private" description="Only needed for testing of project."/>
|
13
|
+
</configurations>
|
14
|
+
|
15
|
+
<dependencies>
|
16
|
+
<dependency org="oro" name="oro" rev="2.0.8" conf="*->default" />
|
17
|
+
</dependencies>
|
18
|
+
</ivy-module>
|
@@ -1,97 +1,99 @@
|
|
1
|
-
$:.unshift File.join(File.dirname(__FILE__),'..','..','lib')
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
require '
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
@
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
@
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
:
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
:
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
@
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
:
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
raise "
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
@
|
95
|
-
|
96
|
-
|
97
|
-
end
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__),'..','..','lib')
|
2
|
+
|
3
|
+
JRuby.objectspace = true if RUBY_PLATFORM == 'java'
|
4
|
+
|
5
|
+
require 'test/unit'
|
6
|
+
require 'rr'
|
7
|
+
require 'ivy/target'
|
8
|
+
|
9
|
+
class Test::Unit::TestCase
|
10
|
+
include RR::Adapters::TestUnit
|
11
|
+
end
|
12
|
+
|
13
|
+
module Ivy
|
14
|
+
class TargetTest < Test::Unit::TestCase
|
15
|
+
|
16
|
+
def setup
|
17
|
+
Ivy::Target.send(:public, :call_nested) # make tested method public
|
18
|
+
@ant = Object.new
|
19
|
+
@target = Ivy::Target.new(@ant)
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_call_nested_simple
|
23
|
+
nested = {
|
24
|
+
:fileset => {
|
25
|
+
:includes => 'bla',
|
26
|
+
:excludes => 'blub',
|
27
|
+
:dir => 'anything'
|
28
|
+
}
|
29
|
+
}
|
30
|
+
mock(@ant).fileset(nested[:fileset])
|
31
|
+
|
32
|
+
@target.call_nested(nested)
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_call_nested_multiply
|
36
|
+
nested = {
|
37
|
+
:fileset => {
|
38
|
+
:includes => 'bla',
|
39
|
+
:excludes => 'blub',
|
40
|
+
:dir => 'anything'
|
41
|
+
},
|
42
|
+
:other => {
|
43
|
+
:param => 'myparam'
|
44
|
+
}
|
45
|
+
}
|
46
|
+
mock(@ant).fileset nested[:fileset]
|
47
|
+
mock(@ant).other nested[:other]
|
48
|
+
|
49
|
+
@target.call_nested(nested)
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_call_nested_list_with_same_method
|
53
|
+
nested = {
|
54
|
+
:fileset => [
|
55
|
+
{
|
56
|
+
:includes => 'bla',
|
57
|
+
:excludes => 'blub',
|
58
|
+
:dir => 'anything'
|
59
|
+
},
|
60
|
+
{
|
61
|
+
:includes => 'otherbla',
|
62
|
+
:excludes => 'otherblub',
|
63
|
+
:dir => 'otheranything'
|
64
|
+
}
|
65
|
+
]
|
66
|
+
}
|
67
|
+
mock(@ant).fileset nested[:fileset][0]
|
68
|
+
mock(@ant).fileset nested[:fileset][1]
|
69
|
+
|
70
|
+
@target.call_nested(nested)
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_call_recursive_nested
|
74
|
+
nested = {
|
75
|
+
:taskdef =>
|
76
|
+
{
|
77
|
+
:name => 'bla',
|
78
|
+
:nested => {
|
79
|
+
:fileset => {
|
80
|
+
:includes => 'bla',
|
81
|
+
:excludes => 'blub',
|
82
|
+
:dir => 'anything'}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
# define the method that yields if a block is given, to test the nested stuff
|
88
|
+
def @ant.taskdef(p)
|
89
|
+
raise "Invalid params to many" unless p.size == 1
|
90
|
+
raise "Wrong parameter value" unless 'bla' == p[:name]
|
91
|
+
raise "missing block for method" unless block_given?
|
92
|
+
yield
|
93
|
+
end
|
94
|
+
mock(@ant).fileset nested[:taskdef][:nested][:fileset]
|
95
|
+
|
96
|
+
@target.call_nested(nested)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -1,34 +1,34 @@
|
|
1
|
-
$:.unshift File.join(File.dirname(__FILE__),'..','..','lib')
|
2
|
-
|
3
|
-
require 'test/unit'
|
4
|
-
require 'ivy/targets'
|
5
|
-
require 'ivy4r'
|
6
|
-
|
7
|
-
module Ivy
|
8
|
-
class TargetsTest < Test::Unit::TestCase
|
9
|
-
|
10
|
-
def setup
|
11
|
-
ivy4r = Ivy4r.new
|
12
|
-
@ivy_test_xml = File.join(File.dirname(__FILE__), 'ivytest.xml')
|
13
|
-
@info = Ivy::Info.new(ivy4r.ant)
|
14
|
-
end
|
15
|
-
|
16
|
-
def test_execute_empty_parameters_missing_mandatory_exception
|
17
|
-
assert_raise(ArgumentError) { @info.execute({}) }
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_execute_validate_with_unkown_parameter_exception
|
21
|
-
assert_raise(ArgumentError) { @info.execute(:unknown_parameter => 'unknown') }
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_execute_simple_file_correct_return_values
|
25
|
-
result = @info.execute(:file => @ivy_test_xml)
|
26
|
-
|
27
|
-
assert_not_nil result
|
28
|
-
%w[ivy.organisation ivy.revision ivy.module].each do |var|
|
29
|
-
assert_equal true, result.keys.member?(var), "Contains key '#{var}', has '#{result.keys.join(', ')}'"
|
30
|
-
end
|
31
|
-
assert_equal 'blau', result['ivy.organisation']
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__),'..','..','lib')
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require 'ivy/targets'
|
5
|
+
require 'ivy4r'
|
6
|
+
|
7
|
+
module Ivy
|
8
|
+
class TargetsTest < Test::Unit::TestCase
|
9
|
+
|
10
|
+
def setup
|
11
|
+
ivy4r = Ivy4r.new
|
12
|
+
@ivy_test_xml = File.join(File.dirname(__FILE__), 'ivytest.xml')
|
13
|
+
@info = Ivy::Info.new(ivy4r.ant)
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_execute_empty_parameters_missing_mandatory_exception
|
17
|
+
assert_raise(ArgumentError) { @info.execute({}) }
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_execute_validate_with_unkown_parameter_exception
|
21
|
+
assert_raise(ArgumentError) { @info.execute(:unknown_parameter => 'unknown') }
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_execute_simple_file_correct_return_values
|
25
|
+
result = @info.execute(:file => @ivy_test_xml)
|
26
|
+
|
27
|
+
assert_not_nil result
|
28
|
+
%w[ivy.organisation ivy.revision ivy.module].each do |var|
|
29
|
+
assert_equal true, result.keys.member?(var), "Contains key '#{var}', has '#{result.keys.join(', ')}'"
|
30
|
+
end
|
31
|
+
assert_equal 'blau', result['ivy.organisation']
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ivy4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 12
|
8
|
+
- 7
|
9
|
+
version: 0.12.7
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Klaas Reineke
|
@@ -9,82 +14,108 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2011-01-06 00:00:00 +01:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
21
|
+
name: facets
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
segments:
|
27
|
+
- 2
|
28
|
+
- 9
|
29
|
+
- 0
|
30
|
+
version: 2.9.0
|
31
|
+
requirement: *id001
|
32
|
+
prerelease: false
|
17
33
|
type: :runtime
|
18
|
-
|
19
|
-
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: Antwrap
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
20
37
|
requirements:
|
21
38
|
- - ">="
|
22
39
|
- !ruby/object:Gem::Version
|
40
|
+
segments:
|
41
|
+
- 0
|
42
|
+
- 7
|
43
|
+
- 0
|
23
44
|
version: 0.7.0
|
24
|
-
|
45
|
+
requirement: *id002
|
46
|
+
prerelease: false
|
47
|
+
type: :runtime
|
25
48
|
- !ruby/object:Gem::Dependency
|
26
49
|
name: ivy4r-jars
|
27
|
-
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
30
51
|
requirements:
|
31
52
|
- - ">="
|
32
53
|
- !ruby/object:Gem::Version
|
54
|
+
segments:
|
55
|
+
- 1
|
56
|
+
- 2
|
57
|
+
- 0
|
33
58
|
version: 1.2.0
|
34
|
-
|
35
|
-
|
36
|
-
name: facets
|
59
|
+
requirement: *id003
|
60
|
+
prerelease: false
|
37
61
|
type: :runtime
|
38
|
-
|
39
|
-
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
40
65
|
requirements:
|
41
66
|
- - ">="
|
42
67
|
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
68
|
+
segments:
|
69
|
+
- 2
|
70
|
+
- 0
|
71
|
+
- 0
|
72
|
+
version: 2.0.0
|
73
|
+
requirement: *id004
|
74
|
+
prerelease: false
|
47
75
|
type: :development
|
48
|
-
|
49
|
-
|
76
|
+
- !ruby/object:Gem::Dependency
|
77
|
+
name: mocha
|
78
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
50
79
|
requirements:
|
51
80
|
- - ">="
|
52
81
|
- !ruby/object:Gem::Version
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
- 9
|
85
|
+
- 8
|
86
|
+
version: 0.9.8
|
87
|
+
requirement: *id005
|
88
|
+
prerelease: false
|
57
89
|
type: :development
|
58
|
-
|
59
|
-
|
90
|
+
- !ruby/object:Gem::Dependency
|
91
|
+
name: rr
|
92
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
60
93
|
requirements:
|
61
94
|
- - ">="
|
62
95
|
- !ruby/object:Gem::Version
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
Includes a Extension for Buildr[http://buildr.apache.org/] and Rake[http://rake.rubyforge.org] to use
|
71
|
-
{Apache Ivy}[http://ant.apache.org/ivy/index.html] for dependency management.
|
96
|
+
segments:
|
97
|
+
- 0
|
98
|
+
version: "0"
|
99
|
+
requirement: *id006
|
100
|
+
prerelease: false
|
101
|
+
type: :development
|
102
|
+
description: Ivy4r is a Ruby interface for Apache Ivy dependency management library. Offers support for using Ivy with Buildr and Rake.
|
72
103
|
email:
|
73
104
|
- klaas.reineke@googlemail.com
|
74
|
-
executables:
|
75
|
-
|
105
|
+
executables: []
|
106
|
+
|
76
107
|
extensions: []
|
77
108
|
|
78
|
-
extra_rdoc_files:
|
79
|
-
|
80
|
-
- Manifest.txt
|
81
|
-
- README.txt
|
109
|
+
extra_rdoc_files: []
|
110
|
+
|
82
111
|
files:
|
83
|
-
-
|
84
|
-
-
|
112
|
+
- .gitignore
|
113
|
+
- .project
|
114
|
+
- CHANGELOG
|
115
|
+
- Gemfile
|
85
116
|
- README.txt
|
86
117
|
- Rakefile
|
87
|
-
-
|
118
|
+
- ivy4r.gemspec
|
88
119
|
- lib/buildr/ivy_extension.rb
|
89
120
|
- lib/ivy/artifactproperty.rb
|
90
121
|
- lib/ivy/artifactreport.rb
|
@@ -107,49 +138,49 @@ files:
|
|
107
138
|
- lib/ivy/target.rb
|
108
139
|
- lib/ivy/targets.rb
|
109
140
|
- lib/ivy4r.rb
|
141
|
+
- lib/ivy4r/version.rb
|
110
142
|
- lib/ivy4r_java_extensions.rb
|
111
143
|
- lib/rake/ivy_extension.rb
|
112
|
-
- test/buildlist/p1/buildfile
|
113
|
-
- test/buildlist/p1/ivy.xml
|
114
|
-
- test/buildlist/sub/p2/buildfile
|
115
|
-
- test/buildlist/sub/p2/ivy.xml
|
116
|
-
- test/buildlist/sub/p3/buildfile
|
117
|
-
- test/buildlist/sub/p3/ivy.xml
|
118
|
-
- test/ivy/ivysettings.xml
|
119
|
-
- test/ivy/ivytest.xml
|
120
|
-
- test/ivy/test_target.rb
|
121
|
-
- test/ivy/test_targets.rb
|
122
|
-
- test/test_ivy4r.rb
|
144
|
+
- test-functional/buildlist/p1/buildfile
|
145
|
+
- test-functional/buildlist/p1/ivy.xml
|
146
|
+
- test-functional/buildlist/sub/p2/buildfile
|
147
|
+
- test-functional/buildlist/sub/p2/ivy.xml
|
148
|
+
- test-functional/buildlist/sub/p3/buildfile
|
149
|
+
- test-functional/buildlist/sub/p3/ivy.xml
|
150
|
+
- test-functional/ivy/ivysettings.xml
|
151
|
+
- test-functional/ivy/ivytest.xml
|
152
|
+
- test-functional/ivy/test_target.rb
|
153
|
+
- test-functional/ivy/test_targets.rb
|
154
|
+
- test-functional/test_ivy4r.rb
|
123
155
|
has_rdoc: true
|
124
|
-
homepage: http://github.com/klaas1979/ivy4r
|
156
|
+
homepage: http://github.com/klaas1979/ivy4r
|
125
157
|
licenses: []
|
126
158
|
|
127
159
|
post_install_message:
|
128
|
-
rdoc_options:
|
129
|
-
|
130
|
-
- README.txt
|
160
|
+
rdoc_options: []
|
161
|
+
|
131
162
|
require_paths:
|
132
163
|
- lib
|
133
164
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
165
|
requirements:
|
135
166
|
- - ">="
|
136
167
|
- !ruby/object:Gem::Version
|
168
|
+
segments:
|
169
|
+
- 0
|
137
170
|
version: "0"
|
138
|
-
version:
|
139
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
172
|
requirements:
|
141
173
|
- - ">="
|
142
174
|
- !ruby/object:Gem::Version
|
175
|
+
segments:
|
176
|
+
- 0
|
143
177
|
version: "0"
|
144
|
-
version:
|
145
178
|
requirements: []
|
146
179
|
|
147
180
|
rubyforge_project: ivy4r
|
148
|
-
rubygems_version: 1.3.
|
181
|
+
rubygems_version: 1.3.6
|
149
182
|
signing_key:
|
150
183
|
specification_version: 3
|
151
|
-
summary: Apache Ivy dependency
|
152
|
-
test_files:
|
153
|
-
|
154
|
-
- test/ivy/test_targets.rb
|
155
|
-
- test/ivy/test_target.rb
|
184
|
+
summary: Ivy4r Apache Ivy dependency management for Ruby
|
185
|
+
test_files: []
|
186
|
+
|
data/Manifest.txt
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
README.txt
|
4
|
-
Rakefile
|
5
|
-
bin/ivy4r
|
6
|
-
lib/buildr/ivy_extension.rb
|
7
|
-
lib/ivy/artifactproperty.rb
|
8
|
-
lib/ivy/artifactreport.rb
|
9
|
-
lib/ivy/buildlist.rb
|
10
|
-
lib/ivy/buildnumber.rb
|
11
|
-
lib/ivy/cachepath.rb
|
12
|
-
lib/ivy/cleancache.rb
|
13
|
-
lib/ivy/configure.rb
|
14
|
-
lib/ivy/findrevision.rb
|
15
|
-
lib/ivy/info.rb
|
16
|
-
lib/ivy/java/all_version_matcher.rb
|
17
|
-
lib/ivy/java/java_object_wrapper.rb
|
18
|
-
lib/ivy/listmodules.rb
|
19
|
-
lib/ivy/makepom.rb
|
20
|
-
lib/ivy/publish.rb
|
21
|
-
lib/ivy/report.rb
|
22
|
-
lib/ivy/resolve.rb
|
23
|
-
lib/ivy/retrieve.rb
|
24
|
-
lib/ivy/settings.rb
|
25
|
-
lib/ivy/target.rb
|
26
|
-
lib/ivy/targets.rb
|
27
|
-
lib/ivy4r.rb
|
28
|
-
lib/ivy4r_java_extensions.rb
|
29
|
-
lib/rake/ivy_extension.rb
|
30
|
-
test/buildlist/p1/buildfile
|
31
|
-
test/buildlist/p1/ivy.xml
|
32
|
-
test/buildlist/sub/p2/buildfile
|
33
|
-
test/buildlist/sub/p2/ivy.xml
|
34
|
-
test/buildlist/sub/p3/buildfile
|
35
|
-
test/buildlist/sub/p3/ivy.xml
|
36
|
-
test/ivy/ivysettings.xml
|
37
|
-
test/ivy/ivytest.xml
|
38
|
-
test/ivy/test_target.rb
|
39
|
-
test/ivy/test_targets.rb
|
40
|
-
test/test_ivy4r.rb
|
data/bin/ivy4r
DELETED