pompompom 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +2 -0
- data/examples/Rakefile +38 -0
- data/examples/config.yml +5 -0
- data/lib/pompompom.rb +2 -1
- data/lib/pompompom/cli.rb +13 -39
- data/lib/pompompom/config.rb +47 -0
- data/lib/pompompom/rake.rb +52 -0
- data/pompompom.gemspec +10 -2
- data/spec/pompompom/cli_spec.rb +3 -7
- data/spec/pompompom/config_spec.rb +75 -0
- data/spec/pompompom/rake_spec.rb +66 -0
- data/spec/spec_helper.rb +1 -0
- metadata +11 -3
data/.gitignore
CHANGED
data/examples/Rakefile
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
$: << File.expand_path('../../lib', __FILE__)
|
2
|
+
|
3
|
+
require 'pompompom/rake'
|
4
|
+
|
5
|
+
|
6
|
+
task :clean do
|
7
|
+
rm_rf 'lib'
|
8
|
+
rm_rf 'cache'
|
9
|
+
end
|
10
|
+
|
11
|
+
task :example1 do
|
12
|
+
pompompom 'org.eclipse.jetty:jetty-server:7.1.5.v20100705'
|
13
|
+
end
|
14
|
+
|
15
|
+
task :example2 do
|
16
|
+
repositories = %w(
|
17
|
+
http://repo1.maven.org/maven2
|
18
|
+
http://scala-tools.org/repo-releases
|
19
|
+
http://scala-tools.org/repo-snapshots
|
20
|
+
)
|
21
|
+
|
22
|
+
dependencies = %w(
|
23
|
+
org.eclipse.jetty:jetty-server:7.1.5.v20100705
|
24
|
+
org.scala-tools.testing:specs_2.8.0:1.6.5-SNAPSHOT
|
25
|
+
org.mockito:mockito-core:1.8.5
|
26
|
+
net.liftweb:lift-json:2.0-scala280-SNAPSHOT
|
27
|
+
log4j:log4j:1.2.16
|
28
|
+
org.slf4j:slf4j-log4j12:1.6.1
|
29
|
+
org.slf4j:slf4j-api:1.6.1
|
30
|
+
org.mongodb:mongo-java-driver:2.0
|
31
|
+
)
|
32
|
+
|
33
|
+
pompompom dependencies, :repositories => repositories, :cache_dir => 'cache'
|
34
|
+
end
|
35
|
+
|
36
|
+
task :example3 do
|
37
|
+
pompompom 'org.eclipse.jetty:jetty-server:7.1.5.v20100705', :logger => STDOUT, :config_file => 'config.yml', :cache_dir => 'cache'
|
38
|
+
end
|
data/examples/config.yml
ADDED
data/lib/pompompom.rb
CHANGED
data/lib/pompompom/cli.rb
CHANGED
@@ -3,15 +3,13 @@ require 'yaml'
|
|
3
3
|
|
4
4
|
module PomPomPom
|
5
5
|
class Cli
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
CONFIG_FILE = File.expand_path('~/.pompompomrc')
|
10
|
-
|
11
|
-
def initialize(stdin, stdout, stderr)
|
6
|
+
def initialize(stdin, stdout, stderr, options={})
|
7
|
+
@config = Config.new(options)
|
8
|
+
@config.load!
|
12
9
|
@stdin, @stdout, @stderr = stdin, stdout, stderr
|
13
10
|
@status_logger = EchoLogger.new(@stderr)
|
14
|
-
@downloader = CachingDownloader.new(
|
11
|
+
@downloader = CachingDownloader.new(@config.cache_dir, Downloader.new)
|
12
|
+
@resolver = options[:resolver]
|
15
13
|
end
|
16
14
|
|
17
15
|
def run!(*args)
|
@@ -22,21 +20,21 @@ module PomPomPom
|
|
22
20
|
|
23
21
|
resolver = create_resolver
|
24
22
|
|
25
|
-
|
23
|
+
@config.create_file! unless @config.file_exists?
|
26
24
|
create_lib_directory!
|
27
25
|
|
28
26
|
@status_logger.info("Determining transitive dependencies...")
|
29
27
|
|
30
28
|
dependencies = parse_dependencies(args)
|
31
29
|
dependencies = resolver.find_transitive_dependencies(*dependencies)
|
32
|
-
dependencies = dependencies.reject { |d| File.exists?(File.join(
|
30
|
+
dependencies = dependencies.reject { |d| File.exists?(File.join(@config.target_dir, d.jar_file_name)) }
|
33
31
|
|
34
32
|
if dependencies.empty?
|
35
33
|
@status_logger.info('All dependencies are met')
|
36
34
|
else
|
37
35
|
dependencies.each do |dependency|
|
38
36
|
@status_logger.info(%(Downloading "#{dependency.to_dependency.to_s}"))
|
39
|
-
resolver.download!(
|
37
|
+
resolver.download!(@config.target_dir, false, dependency)
|
40
38
|
end
|
41
39
|
end
|
42
40
|
|
@@ -48,44 +46,20 @@ module PomPomPom
|
|
48
46
|
|
49
47
|
private
|
50
48
|
|
51
|
-
def create_config_file!
|
52
|
-
return if File.exists?(config_file_path)
|
53
|
-
File.open(config_file_path, 'w') { |f| f.write(YAML.dump('repositories' => STANDARD_REPOSITORIES))}
|
54
|
-
end
|
55
|
-
|
56
49
|
def create_lib_directory!
|
57
|
-
return if File.directory?(
|
58
|
-
raise %(Cannot create destination, "#{
|
59
|
-
Dir.mkdir(
|
50
|
+
return if File.directory?(@config.target_dir)
|
51
|
+
raise %(Cannot create destination, "#{@config.target_dir}" is a file!) if File.exists?(@config.target_dir)
|
52
|
+
Dir.mkdir(@config.target_dir)
|
60
53
|
end
|
61
54
|
|
62
55
|
def create_resolver
|
63
|
-
Resolver.new(
|
64
|
-
config
|
56
|
+
@resolver ||= Resolver.new(
|
57
|
+
@config.repositories,
|
65
58
|
:logger => @status_logger,
|
66
59
|
:downloader => @downloader
|
67
60
|
)
|
68
61
|
end
|
69
62
|
|
70
|
-
def config
|
71
|
-
@config ||= symbolize_keys(YAML.load(File.read(config_file_path)))
|
72
|
-
end
|
73
|
-
|
74
|
-
def symbolize_keys(h)
|
75
|
-
h.keys.inject({}) do |acc, k|
|
76
|
-
acc[k.to_sym] = if Hash === h[k] then symbolize_keys(h[k]) else h[k] end
|
77
|
-
acc
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
def config_file_path
|
82
|
-
CONFIG_FILE
|
83
|
-
end
|
84
|
-
|
85
|
-
def destination_dir_path
|
86
|
-
DEFAULT_DESTINATION_DIR
|
87
|
-
end
|
88
|
-
|
89
63
|
def parse_dependencies(args)
|
90
64
|
args.map do |coordinate|
|
91
65
|
begin
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
|
4
|
+
module PomPomPom
|
5
|
+
class Config
|
6
|
+
REPOSITORIES = %w(http://repo1.maven.org/maven2)
|
7
|
+
TARGET_DIR = 'lib'
|
8
|
+
CACHE_DIR = File.expand_path('~/.pompompom')
|
9
|
+
CONFIG_FILE = File.expand_path('~/.pompompomrc')
|
10
|
+
|
11
|
+
attr_reader :repositories, :target_dir, :cache_dir, :config_file
|
12
|
+
|
13
|
+
def initialize(options={})
|
14
|
+
@repositories = options[:repositories] || REPOSITORIES
|
15
|
+
@target_dir = options[:target_dir] || TARGET_DIR
|
16
|
+
@cache_dir = options[:cache_dir] || CACHE_DIR
|
17
|
+
@config_file = options[:config_file] || CONFIG_FILE
|
18
|
+
end
|
19
|
+
|
20
|
+
def load!
|
21
|
+
return unless file_exists?
|
22
|
+
options = symbolize_keys(YAML.load(File.read(@config_file)))
|
23
|
+
@repositories = options[:repositories] || @repositories
|
24
|
+
@target_dir = options[:target_dir] || @target_dir
|
25
|
+
@cache_dir = options[:cache_dir] || @cache_dir
|
26
|
+
@config_file = options[:config_file] || @config_file
|
27
|
+
end
|
28
|
+
|
29
|
+
def file_exists?
|
30
|
+
File.exists?(@config_file)
|
31
|
+
end
|
32
|
+
|
33
|
+
def create_file!
|
34
|
+
return if file_exists?
|
35
|
+
File.open(@config_file, 'w') do |f|
|
36
|
+
f.write(YAML.dump('repositories' => @repositories))
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def symbolize_keys(h)
|
41
|
+
h.keys.inject({}) do |acc, k|
|
42
|
+
acc[k.to_sym] = if Hash === h[k] then symbolize_keys(h[k]) else h[k] end
|
43
|
+
acc
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'pompompom'
|
2
|
+
|
3
|
+
|
4
|
+
module PomPomPom
|
5
|
+
class SimpleLogger
|
6
|
+
def initialize(io)
|
7
|
+
@io = io
|
8
|
+
end
|
9
|
+
def info(msg)
|
10
|
+
@io.puts(msg)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class NullLogger
|
15
|
+
def info(msg); end
|
16
|
+
end
|
17
|
+
|
18
|
+
def pompompom(*args)
|
19
|
+
options = (Hash === args.last) ? args.pop : { }
|
20
|
+
dependencies = args.flatten
|
21
|
+
|
22
|
+
logger = NullLogger.new
|
23
|
+
|
24
|
+
if options[:logger]
|
25
|
+
if options[:logger].respond_to?(:info)
|
26
|
+
logger = options[:logger]
|
27
|
+
elsif options[:logger].respond_to?(:puts)
|
28
|
+
logger = SimpleLogger.new(options[:logger])
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
config = Config.new(options)
|
33
|
+
config.load!
|
34
|
+
|
35
|
+
downloader = options[:downloader]
|
36
|
+
downloader ||= CachingDownloader.new(config.cache_dir, Downloader.new)
|
37
|
+
|
38
|
+
resolver = Resolver.new(config.repositories, :downloader => downloader)
|
39
|
+
dependencies = dependencies.map { |d| Dependency.parse(d) }
|
40
|
+
dependencies = resolver.find_transitive_dependencies(*dependencies)
|
41
|
+
dependencies = dependencies.reject { |d| File.exists?(File.join(config.target_dir, d.jar_file_name)) }
|
42
|
+
|
43
|
+
unless dependencies.empty?
|
44
|
+
dependencies.each do |dependency|
|
45
|
+
logger.info("Loading #{dependency.jar_file_name}")
|
46
|
+
resolver.download!(config.target_dir, false, dependency)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
include PomPomPom
|
data/pompompom.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{pompompom}
|
8
|
-
s.version = "1.0
|
8
|
+
s.version = "1.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Theo Hultberg"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-17}
|
13
13
|
s.default_executable = %q{pompompom}
|
14
14
|
s.description = %q{Ruby dependency manager for Maven repository artifacts}
|
15
15
|
s.email = %q{theo@iconara.net}
|
@@ -26,21 +26,27 @@ Gem::Specification.new do |s|
|
|
26
26
|
"README.mdown",
|
27
27
|
"Rakefile",
|
28
28
|
"bin/pompompom",
|
29
|
+
"examples/Rakefile",
|
30
|
+
"examples/config.yml",
|
29
31
|
"lib/pom_pom_pom.rb",
|
30
32
|
"lib/pompompom.rb",
|
31
33
|
"lib/pompompom/cli.rb",
|
34
|
+
"lib/pompompom/config.rb",
|
32
35
|
"lib/pompompom/dependency.rb",
|
33
36
|
"lib/pompompom/downloader.rb",
|
34
37
|
"lib/pompompom/metadata.rb",
|
35
38
|
"lib/pompompom/pom.rb",
|
39
|
+
"lib/pompompom/rake.rb",
|
36
40
|
"lib/pompompom/resolver.rb",
|
37
41
|
"lib/pompompom/url_builder.rb",
|
38
42
|
"pompompom.gemspec",
|
39
43
|
"spec/pompompom/cli_spec.rb",
|
44
|
+
"spec/pompompom/config_spec.rb",
|
40
45
|
"spec/pompompom/dependency_spec.rb",
|
41
46
|
"spec/pompompom/downloader_spec.rb",
|
42
47
|
"spec/pompompom/metadata_spec.rb",
|
43
48
|
"spec/pompompom/pom_spec.rb",
|
49
|
+
"spec/pompompom/rake_spec.rb",
|
44
50
|
"spec/pompompom/resolver_spec.rb",
|
45
51
|
"spec/pompompom/url_builders_shared.rb",
|
46
52
|
"spec/resources/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar",
|
@@ -96,10 +102,12 @@ Gem::Specification.new do |s|
|
|
96
102
|
s.summary = %q{Ruby dependency manager for Maven repository artifacts}
|
97
103
|
s.test_files = [
|
98
104
|
"spec/pompompom/cli_spec.rb",
|
105
|
+
"spec/pompompom/config_spec.rb",
|
99
106
|
"spec/pompompom/dependency_spec.rb",
|
100
107
|
"spec/pompompom/downloader_spec.rb",
|
101
108
|
"spec/pompompom/metadata_spec.rb",
|
102
109
|
"spec/pompompom/pom_spec.rb",
|
110
|
+
"spec/pompompom/rake_spec.rb",
|
103
111
|
"spec/pompompom/resolver_spec.rb",
|
104
112
|
"spec/pompompom/url_builders_shared.rb",
|
105
113
|
"spec/spec_helper.rb"
|
data/spec/pompompom/cli_spec.rb
CHANGED
@@ -13,15 +13,12 @@ module PomPomPom
|
|
13
13
|
@stderr = StringIO.new
|
14
14
|
@downloader = FilesystemDownloader.new
|
15
15
|
@resolver = Resolver.new([@repository_path])
|
16
|
-
@cli = Cli.new(@stdin, @stdout, @stderr)
|
17
16
|
@tmp_dir = File.join(Dir.tmpdir, 'pompompom')
|
18
17
|
FileUtils.rm_rf(@tmp_dir)
|
19
18
|
Dir.mkdir(@tmp_dir)
|
20
19
|
Dir.chdir(@tmp_dir)
|
21
20
|
@config_file_path = File.join(@tmp_dir, '.pompompomrc')
|
22
|
-
@cli.
|
23
|
-
@cli.stub!(:create_lib_directory!)
|
24
|
-
@cli.stub!(:config_file_path).and_return(@config_file_path)
|
21
|
+
@cli = Cli.new(@stdin, @stdout, @stderr, :resolver => @resolver, :config_file => @config_file_path)
|
25
22
|
end
|
26
23
|
|
27
24
|
after do
|
@@ -102,7 +99,7 @@ module PomPomPom
|
|
102
99
|
it 'adds the standard repositories to the config file, if it doesn\'t exist' do
|
103
100
|
@cli.run!('net.iconara:pompompom:1.0', 'com.example:test:9.9')
|
104
101
|
@config = YAML.load(File.read(@config_file_path))
|
105
|
-
@config['repositories'].should ==
|
102
|
+
@config['repositories'].should == Config::REPOSITORIES
|
106
103
|
end
|
107
104
|
|
108
105
|
it 'doesn\'t clobber an existing config file' do
|
@@ -117,8 +114,7 @@ module PomPomPom
|
|
117
114
|
@config = {'repositories' => %w(http://example.com/repo1 http://example.com/repo2)}
|
118
115
|
File.open(@config_file_path, 'w') { |f| f.write(YAML::dump(@config)) }
|
119
116
|
Resolver.should_receive(:new).with(%w(http://example.com/repo1 http://example.com/repo2), an_instance_of(Hash))
|
120
|
-
@cli = Cli.new(@stdin, @stdout, @stderr)
|
121
|
-
@cli.stub!(:config_file_path).and_return(@config_file_path)
|
117
|
+
@cli = Cli.new(@stdin, @stdout, @stderr, :config_file => @config_file_path)
|
122
118
|
@cli.run!('net.iconara:pompompom:1.0', 'com.example:test:9.9')
|
123
119
|
end
|
124
120
|
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
2
|
+
require 'tmpdir'
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
|
6
|
+
module PomPomPom
|
7
|
+
describe Config do
|
8
|
+
before do
|
9
|
+
@tmp_dir = File.join(Dir.tmpdir, 'pompompom')
|
10
|
+
FileUtils.rm_rf(@tmp_dir)
|
11
|
+
Dir.mkdir(@tmp_dir)
|
12
|
+
end
|
13
|
+
|
14
|
+
after do
|
15
|
+
FileUtils.rm_rf(@tmp_dir)
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'defaults' do
|
19
|
+
subject { Config.new }
|
20
|
+
|
21
|
+
its(:target_dir) { should == 'lib' }
|
22
|
+
its(:repositories) { should == %w(http://repo1.maven.org/maven2) }
|
23
|
+
its(:cache_dir) { should == File.expand_path('~/.pompompom') }
|
24
|
+
its(:config_file) { should == File.expand_path('~/.pompompomrc') }
|
25
|
+
end
|
26
|
+
|
27
|
+
describe '#load!' do
|
28
|
+
it 'loads the config file' do
|
29
|
+
config_file = File.join(@tmp_dir, '.pom3rc')
|
30
|
+
File.open(config_file, 'w') { |f| f.write(YAML::dump(:repositories => %w(repo1 repo2))) }
|
31
|
+
config = Config.new(:config_file => config_file)
|
32
|
+
config.load!
|
33
|
+
config.repositories.should == %w(repo1 repo2)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe '#file_exists?' do
|
38
|
+
before do
|
39
|
+
@config_file = File.join(@tmp_dir, '.pom3rc')
|
40
|
+
@config = Config.new(:config_file => @config_file)
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'returns true if the file exists' do
|
44
|
+
FileUtils.touch(@config_file)
|
45
|
+
@config.file_exists?.should == true
|
46
|
+
end
|
47
|
+
|
48
|
+
it 'returns false if the file doesn\'t exist' do
|
49
|
+
@config.file_exists?.should == false
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe '#create_file!' do
|
54
|
+
before do
|
55
|
+
@config_file = File.join(@tmp_dir, '.pom3rc')
|
56
|
+
@config = Config.new(:config_file => @config_file)
|
57
|
+
end
|
58
|
+
|
59
|
+
after do
|
60
|
+
FileUtils.rm_f(@config_file)
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'creates the file and puts the standard repository list in it' do
|
64
|
+
@config.create_file!
|
65
|
+
YAML.load(File.read(@config_file))['repositories'].should == %w(http://repo1.maven.org/maven2)
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'doesn\'t clobber existing files' do
|
69
|
+
FileUtils.touch(@config_file)
|
70
|
+
@config.create_file!
|
71
|
+
File.read(@config_file).should == ''
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require File.expand_path('../../spec_helper', __FILE__)
|
2
|
+
require 'tmpdir'
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
|
6
|
+
describe 'rake' do
|
7
|
+
before do
|
8
|
+
@repository_path = File.expand_path('../../resources/repository', __FILE__)
|
9
|
+
@tmp_dir = File.join(Dir.tmpdir, 'pompompom')
|
10
|
+
FileUtils.rm_rf(@tmp_dir)
|
11
|
+
Dir.mkdir(@tmp_dir)
|
12
|
+
@lib_dir = File.join(@tmp_dir, 'lib')
|
13
|
+
@repo_dir = File.join(@tmp_dir, 'repo')
|
14
|
+
@config_file = File.join(@tmp_dir, '.pompompomrc')
|
15
|
+
@downloader = FilesystemDownloader.new
|
16
|
+
@dependencies = %w(com.rabbitmq:amqp-client:1.8.0 com.google.inject:guice:2.0)
|
17
|
+
end
|
18
|
+
|
19
|
+
after do
|
20
|
+
FileUtils.rm_rf(@tmp_dir)
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'downloads dependencies' do
|
24
|
+
pompompom(@dependencies, :target_dir => @lib_dir, :downloader => @downloader, :repositories => [@repository_path], :config_file => @config_file)
|
25
|
+
jars = Dir[File.join(@lib_dir, '*.jar')].map { |f| File.basename(f) }
|
26
|
+
jars.should include('amqp-client-1.8.0.jar')
|
27
|
+
jars.should include('guice-2.0.jar')
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'downloads dependencies (when specified as separate arguments)' do
|
31
|
+
pompompom('com.rabbitmq:amqp-client:1.8.0', 'com.google.inject:guice:2.0', :target_dir => @lib_dir, :downloader => @downloader, :repositories => [@repository_path], :config_file => @config_file)
|
32
|
+
jars = Dir[File.join(@lib_dir, '*.jar')].map { |f| File.basename(f) }
|
33
|
+
jars.should include('amqp-client-1.8.0.jar')
|
34
|
+
jars.should include('guice-2.0.jar')
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'reads the config file' do
|
38
|
+
File.open(@config_file, 'w') { |f| f.write(YAML.dump('repositories' => [@repository_path])) }
|
39
|
+
pompompom(@dependencies, :config_file => @config_file, :target_dir => @lib_dir, :downloader => @downloader)
|
40
|
+
jars = Dir[File.join(@lib_dir, '*.jar')].map { |f| File.basename(f) }
|
41
|
+
jars.should include('amqp-client-1.8.0.jar')
|
42
|
+
jars.should include('guice-2.0.jar')
|
43
|
+
end
|
44
|
+
|
45
|
+
context 'logging' do
|
46
|
+
it 'outputs status to an IO' do
|
47
|
+
io = StringIO.new
|
48
|
+
pompompom(@dependencies, :logger => io, :target_dir => @lib_dir, :downloader => @downloader, :repositories => [@repository_path], :config_file => @config_file)
|
49
|
+
io.string.should include('Loading amqp-client-1.8.0.jar')
|
50
|
+
io.string.should include('Loading guice-2.0.jar')
|
51
|
+
io.string.should include('Loading commons-io-1.2.jar')
|
52
|
+
io.string.should include('Loading commons-cli-1.1.jar')
|
53
|
+
io.string.should include('Loading aopalliance-1.0.jar')
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'logs to #info on a logger' do
|
57
|
+
logger = double()
|
58
|
+
logger.should_receive(:info).with('Loading amqp-client-1.8.0.jar')
|
59
|
+
logger.should_receive(:info).with('Loading guice-2.0.jar')
|
60
|
+
logger.should_receive(:info).with('Loading commons-io-1.2.jar')
|
61
|
+
logger.should_receive(:info).with('Loading commons-cli-1.1.jar')
|
62
|
+
logger.should_receive(:info).with('Loading aopalliance-1.0.jar')
|
63
|
+
pompompom(@dependencies, :logger => logger, :target_dir => @lib_dir, :downloader => @downloader, :repositories => [@repository_path], :config_file => @config_file)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 1.0.2
|
10
|
+
version: 1.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Theo Hultberg
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-17 00:00:00 +02:00
|
19
19
|
default_executable: pompompom
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -63,21 +63,27 @@ files:
|
|
63
63
|
- README.mdown
|
64
64
|
- Rakefile
|
65
65
|
- bin/pompompom
|
66
|
+
- examples/Rakefile
|
67
|
+
- examples/config.yml
|
66
68
|
- lib/pom_pom_pom.rb
|
67
69
|
- lib/pompompom.rb
|
68
70
|
- lib/pompompom/cli.rb
|
71
|
+
- lib/pompompom/config.rb
|
69
72
|
- lib/pompompom/dependency.rb
|
70
73
|
- lib/pompompom/downloader.rb
|
71
74
|
- lib/pompompom/metadata.rb
|
72
75
|
- lib/pompompom/pom.rb
|
76
|
+
- lib/pompompom/rake.rb
|
73
77
|
- lib/pompompom/resolver.rb
|
74
78
|
- lib/pompompom/url_builder.rb
|
75
79
|
- pompompom.gemspec
|
76
80
|
- spec/pompompom/cli_spec.rb
|
81
|
+
- spec/pompompom/config_spec.rb
|
77
82
|
- spec/pompompom/dependency_spec.rb
|
78
83
|
- spec/pompompom/downloader_spec.rb
|
79
84
|
- spec/pompompom/metadata_spec.rb
|
80
85
|
- spec/pompompom/pom_spec.rb
|
86
|
+
- spec/pompompom/rake_spec.rb
|
81
87
|
- spec/pompompom/resolver_spec.rb
|
82
88
|
- spec/pompompom/url_builders_shared.rb
|
83
89
|
- spec/resources/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
|
@@ -162,10 +168,12 @@ specification_version: 3
|
|
162
168
|
summary: Ruby dependency manager for Maven repository artifacts
|
163
169
|
test_files:
|
164
170
|
- spec/pompompom/cli_spec.rb
|
171
|
+
- spec/pompompom/config_spec.rb
|
165
172
|
- spec/pompompom/dependency_spec.rb
|
166
173
|
- spec/pompompom/downloader_spec.rb
|
167
174
|
- spec/pompompom/metadata_spec.rb
|
168
175
|
- spec/pompompom/pom_spec.rb
|
176
|
+
- spec/pompompom/rake_spec.rb
|
169
177
|
- spec/pompompom/resolver_spec.rb
|
170
178
|
- spec/pompompom/url_builders_shared.rb
|
171
179
|
- spec/spec_helper.rb
|