javagems 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +9 -3
- data/VERSION +1 -1
- data/javagems.gemspec +84 -9
- data/lib/rubygems/commands/classpath_command.rb +23 -8
- data/test/classpath_command_test.rb +31 -5
- data/test/{aaaaagem_overrides_test.rb → gem_overrides_test.rb} +0 -9
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/.document +5 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/.gitignore +21 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/LICENSE +20 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/README.rdoc +18 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/Rakefile +52 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/VERSION +1 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/lib/test-gem-four.rb +0 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/test/helper.rb +10 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/test/test_test-gem-four.rb +7 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-four/test-gem-four.gemspec +53 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/.document +5 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/.gitignore +21 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/LICENSE +20 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/README.rdoc +18 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/Rakefile +51 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/VERSION +1 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/lib/test-gem-one.rb +0 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/test/helper.rb +10 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/test/test_test-gem-one.rb +7 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-one/test-gem-one.gemspec +53 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/.document +5 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/.gitignore +21 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/LICENSE +20 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/README.rdoc +18 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/Rakefile +52 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/VERSION +1 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/lib/test-gem-two.rb +0 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/test/helper.rb +10 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/test/test_test-gem-two.rb +7 -0
- data/test/invalid_test_app/vendor/gems/dirs/test-gem-two/test-gem-two.gemspec +53 -0
- data/test/test_helper.rb +0 -15
- data/test/valid_test_app/Gemfile +3 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/.document +5 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/.gitignore +21 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/LICENSE +20 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/README.rdoc +18 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/Rakefile +52 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/VERSION +1 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/lib/test-gem-four.rb +0 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/test/helper.rb +10 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/test/test_test-gem-four.rb +7 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-four/test-gem-four.gemspec +53 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/.document +5 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/.gitignore +21 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/LICENSE +20 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/README.rdoc +18 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/Rakefile +51 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/VERSION +1 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/lib/test-gem-one.rb +0 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/test/helper.rb +10 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/test/test_test-gem-one.rb +7 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-one/test-gem-one.gemspec +53 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/.document +5 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/.gitignore +21 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/LICENSE +20 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/README.rdoc +18 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/Rakefile +52 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/VERSION +1 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/lib/test-gem-three.rb +0 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/test/helper.rb +10 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/test/test_test-gem-three.rb +7 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-three/test-gem-three.gemspec +53 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/.document +5 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/.gitignore +21 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/LICENSE +20 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/README.rdoc +18 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/Rakefile +52 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/VERSION +1 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/lib/test-gem-two.rb +0 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/test/helper.rb +10 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/test/test_test-gem-two.rb +7 -0
- data/test/valid_test_app/vendor/gems/dirs/test-gem-two/test-gem-two.gemspec +53 -0
- data/test/valid_test_app/vendor/gems/environment.rb +107 -0
- data/test/valid_test_app/vendor/gems/specifications/test-gem-four-0.0.0.gemspec +33 -0
- data/test/valid_test_app/vendor/gems/specifications/test-gem-one-0.0.0.gemspec +33 -0
- data/test/valid_test_app/vendor/gems/specifications/test-gem-two-0.0.0.gemspec +33 -0
- metadata +83 -8
- /data/test/{test_app → invalid_test_app}/Gemfile +0 -0
- /data/test/{test_app → invalid_test_app}/vendor/gems/environment.rb +0 -0
- /data/test/{test_app → invalid_test_app}/vendor/gems/specifications/test-gem-four-0.0.0.gemspec +0 -0
- /data/test/{test_app → invalid_test_app}/vendor/gems/specifications/test-gem-one-0.0.0.gemspec +0 -0
- /data/test/{test_app → invalid_test_app}/vendor/gems/specifications/test-gem-two-0.0.0.gemspec +0 -0
- /data/test/{test_app → valid_test_app}/vendor/gems/specifications/test-gem-three-0.0.0.gemspec +0 -0
data/Rakefile
CHANGED
@@ -21,7 +21,7 @@ rescue LoadError
|
|
21
21
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
22
22
|
end
|
23
23
|
|
24
|
-
task :test => :check_dependencies
|
24
|
+
task :test => [:check_dependencies, :test_non_mutating, :test_mutating]
|
25
25
|
task :default => :test
|
26
26
|
|
27
27
|
require 'rake/rdoctask'
|
@@ -35,8 +35,14 @@ Rake::RDocTask.new do |rdoc|
|
|
35
35
|
end
|
36
36
|
|
37
37
|
require 'rake/testtask'
|
38
|
-
Rake::TestTask.new(:
|
38
|
+
Rake::TestTask.new(:test_non_mutating) do |test|
|
39
39
|
test.libs << 'lib' << 'test'
|
40
|
-
test.
|
40
|
+
test.test_files = FileList['test/**/*_test.rb'].exclude('gem_overrides_test.rb')
|
41
|
+
test.verbose = true
|
42
|
+
end
|
43
|
+
|
44
|
+
Rake::TestTask.new(:test_mutating) do |test|
|
45
|
+
test.libs << 'lib' << 'test'
|
46
|
+
test.test_files = ['test/gem_overrides_test.rb']
|
41
47
|
test.verbose = true
|
42
48
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.1
|
data/javagems.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{javagems}
|
8
|
-
s.version = "0.4.
|
8
|
+
s.version = "0.4.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["gabrielg", "jaknowlden"]
|
@@ -34,16 +34,91 @@ Gem::Specification.new do |s|
|
|
34
34
|
"lib/javagems/gem_overrides.rb",
|
35
35
|
"lib/rubygems/commands/classpath_command.rb",
|
36
36
|
"lib/rubygems/commands/jeweler_command.rb",
|
37
|
-
"test/aaaaagem_overrides_test.rb",
|
38
37
|
"test/classpath_command_test.rb",
|
38
|
+
"test/gem_overrides_test.rb",
|
39
|
+
"test/invalid_test_app/Gemfile",
|
40
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/.document",
|
41
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/.gitignore",
|
42
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/LICENSE",
|
43
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/README.rdoc",
|
44
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/Rakefile",
|
45
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/VERSION",
|
46
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/lib/test-gem-four.rb",
|
47
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/test-gem-four.gemspec",
|
48
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/test/helper.rb",
|
49
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-four/test/test_test-gem-four.rb",
|
50
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/.document",
|
51
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/.gitignore",
|
52
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/LICENSE",
|
53
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/README.rdoc",
|
54
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/Rakefile",
|
55
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/VERSION",
|
56
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/lib/test-gem-one.rb",
|
57
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/test-gem-one.gemspec",
|
58
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/test/helper.rb",
|
59
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-one/test/test_test-gem-one.rb",
|
60
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/.document",
|
61
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/.gitignore",
|
62
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/LICENSE",
|
63
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/README.rdoc",
|
64
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/Rakefile",
|
65
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/VERSION",
|
66
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/lib/test-gem-two.rb",
|
67
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/test-gem-two.gemspec",
|
68
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/test/helper.rb",
|
69
|
+
"test/invalid_test_app/vendor/gems/dirs/test-gem-two/test/test_test-gem-two.rb",
|
70
|
+
"test/invalid_test_app/vendor/gems/environment.rb",
|
71
|
+
"test/invalid_test_app/vendor/gems/specifications/test-gem-four-0.0.0.gemspec",
|
72
|
+
"test/invalid_test_app/vendor/gems/specifications/test-gem-one-0.0.0.gemspec",
|
73
|
+
"test/invalid_test_app/vendor/gems/specifications/test-gem-two-0.0.0.gemspec",
|
39
74
|
"test/jeweler_command_test.rb",
|
40
|
-
"test/
|
41
|
-
"test/
|
42
|
-
"test/
|
43
|
-
"test/
|
44
|
-
"test/
|
45
|
-
"test/
|
46
|
-
"test/
|
75
|
+
"test/test_helper.rb",
|
76
|
+
"test/valid_test_app/Gemfile",
|
77
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/.document",
|
78
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/.gitignore",
|
79
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/LICENSE",
|
80
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/README.rdoc",
|
81
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/Rakefile",
|
82
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/VERSION",
|
83
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/lib/test-gem-four.rb",
|
84
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/test-gem-four.gemspec",
|
85
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/test/helper.rb",
|
86
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-four/test/test_test-gem-four.rb",
|
87
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/.document",
|
88
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/.gitignore",
|
89
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/LICENSE",
|
90
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/README.rdoc",
|
91
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/Rakefile",
|
92
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/VERSION",
|
93
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/lib/test-gem-one.rb",
|
94
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/test-gem-one.gemspec",
|
95
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/test/helper.rb",
|
96
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-one/test/test_test-gem-one.rb",
|
97
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/.document",
|
98
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/.gitignore",
|
99
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/LICENSE",
|
100
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/README.rdoc",
|
101
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/Rakefile",
|
102
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/VERSION",
|
103
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/lib/test-gem-three.rb",
|
104
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/test-gem-three.gemspec",
|
105
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/test/helper.rb",
|
106
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-three/test/test_test-gem-three.rb",
|
107
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/.document",
|
108
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/.gitignore",
|
109
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/LICENSE",
|
110
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/README.rdoc",
|
111
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/Rakefile",
|
112
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/VERSION",
|
113
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/lib/test-gem-two.rb",
|
114
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/test-gem-two.gemspec",
|
115
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/test/helper.rb",
|
116
|
+
"test/valid_test_app/vendor/gems/dirs/test-gem-two/test/test_test-gem-two.rb",
|
117
|
+
"test/valid_test_app/vendor/gems/environment.rb",
|
118
|
+
"test/valid_test_app/vendor/gems/specifications/test-gem-four-0.0.0.gemspec",
|
119
|
+
"test/valid_test_app/vendor/gems/specifications/test-gem-one-0.0.0.gemspec",
|
120
|
+
"test/valid_test_app/vendor/gems/specifications/test-gem-three-0.0.0.gemspec",
|
121
|
+
"test/valid_test_app/vendor/gems/specifications/test-gem-two-0.0.0.gemspec"
|
47
122
|
]
|
48
123
|
s.homepage = %q{http://www.javagems.org/}
|
49
124
|
s.rdoc_options = ["--charset=UTF-8"]
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'rubygems/command'
|
2
2
|
require 'bundler'
|
3
|
+
require 'stringio'
|
3
4
|
|
4
5
|
class Gem::Commands::ClasspathCommand < Gem::Command
|
5
|
-
Bundler.logger.level = Logger::FATAL
|
6
6
|
|
7
7
|
def initialize
|
8
8
|
super 'classpath', "Given a Gemfile, returns the classpath necessary to satisfy dependencies"
|
@@ -13,17 +13,32 @@ class Gem::Commands::ClasspathCommand < Gem::Command
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def execute
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
(
|
21
|
-
|
22
|
-
|
16
|
+
with_hijacked_bundler_logging do
|
17
|
+
bundler_env = Bundler::Environment.load(options[:args].first)
|
18
|
+
deps = bundler_env.dependencies.map {|dep| dep.to_gem_dependency }
|
19
|
+
|
20
|
+
cp = Bundler::Resolver.resolve(deps, sources).collect do |spec|
|
21
|
+
(Pathname(spec.full_gem_path) + "lib").expand_path.to_s
|
22
|
+
end.join(File::PATH_SEPARATOR)
|
23
|
+
say(cp)
|
24
|
+
end
|
25
|
+
rescue => e
|
26
|
+
@hijacked_out.readlines.each { |l| alert_error(l.strip) }
|
27
|
+
exit 1
|
23
28
|
end
|
24
29
|
|
25
30
|
private
|
26
31
|
|
32
|
+
def with_hijacked_bundler_logging
|
33
|
+
@hijacked_out = StringIO.new
|
34
|
+
real_logger, Bundler.logger = Bundler.logger, Logger.new(@hijacked_out, Logger::INFO)
|
35
|
+
Bundler.logger.formatter = real_logger.formatter
|
36
|
+
yield
|
37
|
+
ensure
|
38
|
+
@hijacked_out.rewind
|
39
|
+
Bundler.logger = real_logger
|
40
|
+
end
|
41
|
+
|
27
42
|
# FIXME - Until we have actual bundler support, use the system source index.
|
28
43
|
def sources
|
29
44
|
[Bundler::SystemGemSource.instance]
|
@@ -3,22 +3,48 @@ require 'rubygems/commands/classpath_command'
|
|
3
3
|
require 'pathname'
|
4
4
|
|
5
5
|
context "the classpath command" do
|
6
|
+
|
6
7
|
context "given a valid Gemfile" do
|
7
8
|
setup do
|
8
9
|
@command = Gem::Commands::ClasspathCommand.new
|
9
10
|
# FIXME - ghetto-mock
|
10
11
|
def @command.sources
|
11
|
-
[Bundler::DirectorySource.new(:location => (TestRoot + "
|
12
|
+
[Bundler::DirectorySource.new(:location => (TestRoot + "valid_test_app/vendor").expand_path.to_s)]
|
12
13
|
end
|
13
14
|
end
|
14
15
|
|
15
16
|
should "return the expected classpath on stdout" do
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
out = StringIO.new
|
18
|
+
@command.ui = Gem::StreamUI.new(StringIO.new, out)
|
19
|
+
@command.invoke((TestRoot + "valid_test_app/Gemfile").expand_path.to_s)
|
20
|
+
out.rewind
|
21
|
+
out.read.split(File::PATH_SEPARATOR).collect { |p| Pathname(p).parent.basename.to_s }
|
19
22
|
end.equals(["test-gem-two", "test-gem-three", "test-gem-one", "test-gem-four"])
|
20
23
|
|
21
|
-
end
|
24
|
+
end # given a valid Gemfile
|
25
|
+
|
26
|
+
context "given a Gemfile with missing dependencies" do
|
27
|
+
setup do
|
28
|
+
@command = Gem::Commands::ClasspathCommand.new
|
29
|
+
# FIXME - ghetto-mock
|
30
|
+
def @command.sources
|
31
|
+
[Bundler::DirectorySource.new(:location => (TestRoot + "invalid_test_app/vendor").expand_path.to_s)]
|
32
|
+
end
|
33
|
+
|
34
|
+
def @command.exit(status)
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
should "return an error on stderr" do
|
40
|
+
err = StringIO.new
|
41
|
+
@command.ui = Gem::StreamUI.new(StringIO.new, StringIO.new, err)
|
42
|
+
@command.invoke((TestRoot + "invalid_test_app/Gemfile").expand_path.to_s)
|
43
|
+
err.rewind
|
44
|
+
err.read
|
45
|
+
end.matches(/Could not find gem/)
|
46
|
+
|
47
|
+
end # given a valid Gemfile
|
22
48
|
|
23
49
|
end
|
24
50
|
|
@@ -1,11 +1,4 @@
|
|
1
1
|
require 'test_helper'
|
2
|
-
# FIXME - ahahaha this test filename is a stupid hack so this test always runs last
|
3
|
-
# and doesn't run all the other tests.
|
4
|
-
|
5
|
-
# We fork here so we don't mess up the current Gem environment
|
6
|
-
# in the process of running our tests, because that's what
|
7
|
-
# the gem_overrides do.
|
8
|
-
pid = fork do
|
9
2
|
require 'javagems/gem_overrides'
|
10
3
|
require 'pathname'
|
11
4
|
|
@@ -67,5 +60,3 @@ context "the given gem overrides" do
|
|
67
60
|
end.equals("http://javagems.org")
|
68
61
|
|
69
62
|
end
|
70
|
-
end
|
71
|
-
Process.waitpid(pid)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 ggironda
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
= test-gem-four
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but
|
13
|
+
bump version in a commit by itself I can ignore when I pull)
|
14
|
+
* Send me a pull request. Bonus points for topic branches.
|
15
|
+
|
16
|
+
== Copyright
|
17
|
+
|
18
|
+
Copyright (c) 2009 ggironda. See LICENSE for details.
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "test-gem-four"
|
8
|
+
gem.summary = %Q{TODO: one-line summary of your gem}
|
9
|
+
gem.description = %Q{TODO: longer description of your gem}
|
10
|
+
gem.email = "gabriel.gironda@centro.net"
|
11
|
+
gem.homepage = "http://github.com/gabrielg/test-gem-four"
|
12
|
+
gem.authors = ["ggironda"]
|
13
|
+
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
|
14
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
|
+
end
|
16
|
+
rescue LoadError
|
17
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
18
|
+
end
|
19
|
+
|
20
|
+
require 'rake/testtask'
|
21
|
+
Rake::TestTask.new(:test) do |test|
|
22
|
+
test.libs << 'lib' << 'test'
|
23
|
+
test.pattern = 'test/**/test_*.rb'
|
24
|
+
test.verbose = true
|
25
|
+
end
|
26
|
+
|
27
|
+
begin
|
28
|
+
require 'rcov/rcovtask'
|
29
|
+
Rcov::RcovTask.new do |test|
|
30
|
+
test.libs << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
rescue LoadError
|
35
|
+
task :rcov do
|
36
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
task :test => :check_dependencies
|
41
|
+
|
42
|
+
task :default => :test
|
43
|
+
|
44
|
+
require 'rake/rdoctask'
|
45
|
+
Rake::RDocTask.new do |rdoc|
|
46
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
47
|
+
|
48
|
+
rdoc.rdoc_dir = 'rdoc'
|
49
|
+
rdoc.title = "test-gem-four #{version}"
|
50
|
+
rdoc.rdoc_files.include('README*')
|
51
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
52
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0
|
File without changes
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{test-gem-four}
|
8
|
+
s.version = "0.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["ggironda"]
|
12
|
+
s.date = %q{2009-11-14}
|
13
|
+
s.description = %q{TODO: longer description of your gem}
|
14
|
+
s.email = %q{gabriel.gironda@centro.net}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/test-gem-four.rb",
|
27
|
+
"test/helper.rb",
|
28
|
+
"test/test_test-gem-four.rb"
|
29
|
+
]
|
30
|
+
s.homepage = %q{http://github.com/gabrielg/test-gem-four}
|
31
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
32
|
+
s.require_paths = ["lib"]
|
33
|
+
s.rubygems_version = %q{1.3.5}
|
34
|
+
s.summary = %q{TODO: one-line summary of your gem}
|
35
|
+
s.test_files = [
|
36
|
+
"test/helper.rb",
|
37
|
+
"test/test_test-gem-four.rb"
|
38
|
+
]
|
39
|
+
|
40
|
+
if s.respond_to? :specification_version then
|
41
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
42
|
+
s.specification_version = 3
|
43
|
+
|
44
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
45
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
46
|
+
else
|
47
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
48
|
+
end
|
49
|
+
else
|
50
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 ggironda
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
= test-gem-one
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Note on Patches/Pull Requests
|
6
|
+
|
7
|
+
* Fork the project.
|
8
|
+
* Make your feature addition or bug fix.
|
9
|
+
* Add tests for it. This is important so I don't break it in a
|
10
|
+
future version unintentionally.
|
11
|
+
* Commit, do not mess with rakefile, version, or history.
|
12
|
+
(if you want to have your own version, that is fine but
|
13
|
+
bump version in a commit by itself I can ignore when I pull)
|
14
|
+
* Send me a pull request. Bonus points for topic branches.
|
15
|
+
|
16
|
+
== Copyright
|
17
|
+
|
18
|
+
Copyright (c) 2009 ggironda. See LICENSE for details.
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "test-gem-one"
|
8
|
+
gem.summary = %Q{TODO: one-line summary of your gem}
|
9
|
+
gem.description = %Q{TODO: longer description of your gem}
|
10
|
+
gem.email = "gabriel.gironda@centro.net"
|
11
|
+
gem.homepage = "http://github.com/gabrielg/test-gem-one"
|
12
|
+
gem.authors = ["ggironda"]
|
13
|
+
gem.add_dependency "test-gem-three"
|
14
|
+
end
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'rake/testtask'
|
20
|
+
Rake::TestTask.new(:test) do |test|
|
21
|
+
test.libs << 'lib' << 'test'
|
22
|
+
test.pattern = 'test/**/test_*.rb'
|
23
|
+
test.verbose = true
|
24
|
+
end
|
25
|
+
|
26
|
+
begin
|
27
|
+
require 'rcov/rcovtask'
|
28
|
+
Rcov::RcovTask.new do |test|
|
29
|
+
test.libs << 'test'
|
30
|
+
test.pattern = 'test/**/test_*.rb'
|
31
|
+
test.verbose = true
|
32
|
+
end
|
33
|
+
rescue LoadError
|
34
|
+
task :rcov do
|
35
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
task :test => :check_dependencies
|
40
|
+
|
41
|
+
task :default => :test
|
42
|
+
|
43
|
+
require 'rake/rdoctask'
|
44
|
+
Rake::RDocTask.new do |rdoc|
|
45
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
|
+
|
47
|
+
rdoc.rdoc_dir = 'rdoc'
|
48
|
+
rdoc.title = "test-gem-one #{version}"
|
49
|
+
rdoc.rdoc_files.include('README*')
|
50
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
51
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
0.0.0
|
File without changes
|