rubygems-tasks 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +0 -1
- data/.travis.yml +9 -0
- data/ChangeLog.md +8 -0
- data/LICENSE.txt +1 -1
- data/README.md +22 -12
- data/Rakefile +4 -49
- data/gemspec.yml +10 -4
- data/lib/rubygems/tasks.rb +140 -2
- data/lib/rubygems/tasks/build/gem.rb +0 -2
- data/lib/rubygems/tasks/build/tar.rb +0 -2
- data/lib/rubygems/tasks/build/task.rb +9 -14
- data/lib/rubygems/tasks/console.rb +0 -3
- data/lib/rubygems/tasks/install.rb +1 -1
- data/lib/rubygems/tasks/project.rb +3 -3
- data/lib/rubygems/tasks/push.rb +2 -2
- data/lib/rubygems/tasks/sign/checksum.rb +3 -2
- data/lib/rubygems/tasks/sign/pgp.rb +1 -1
- data/lib/rubygems/tasks/sign/task.rb +13 -17
- data/lib/rubygems/tasks/task.rb +7 -7
- data/rubygems-tasks.gemspec +38 -87
- data/spec/console_spec.rb +10 -14
- data/spec/install_spec.rb +1 -1
- data/spec/project_spec.rb +30 -27
- data/spec/projects/bundler-project/.gitignore +17 -0
- data/spec/projects/bundler-project/Gemfile +4 -0
- data/spec/projects/bundler-project/LICENSE +22 -0
- data/spec/projects/bundler-project/README.md +29 -0
- data/spec/projects/bundler-project/Rakefile +2 -0
- data/spec/projects/bundler-project/bundler-project.gemspec +19 -0
- data/spec/projects/bundler-project/lib/bundler-project.rb +7 -0
- data/spec/projects/bundler-project/lib/bundler-project/version.rb +5 -0
- data/spec/projects/rubygems-multi-project/.gitignore +17 -0
- data/spec/projects/rubygems-multi-project/LICENSE.txt +22 -0
- data/spec/projects/rubygems-multi-project/README.md +21 -0
- data/spec/projects/rubygems-multi-project/lib/rubygems/project/version.rb +5 -0
- data/spec/projects/rubygems-multi-project/rubygems-project-lite.gemspec +19 -0
- data/spec/projects/rubygems-multi-project/rubygems-project.gemspec +19 -0
- data/spec/projects/rubygems-project/.gitignore +17 -0
- data/spec/projects/rubygems-project/LICENSE.txt +22 -0
- data/spec/projects/rubygems-project/README.md +21 -0
- data/spec/projects/rubygems-project/lib/rubygems/project/version.rb +5 -0
- data/spec/projects/rubygems-project/rubygems-project.gemspec +19 -0
- data/spec/push_spec.rb +2 -2
- data/spec/rake_context.rb +1 -3
- data/spec/scm/push_spec.rb +7 -7
- data/spec/scm/status_spec.rb +6 -6
- data/spec/scm/tag_spec.rb +18 -18
- data/spec/sign/pgp_spec.rb +1 -1
- data/spec/spec_helper.rb +25 -8
- data/spec/tasks_spec.rb +195 -55
- metadata +89 -83
- data/lib/rubygems/tasks/tasks.rb +0 -147
data/lib/rubygems/tasks/push.rb
CHANGED
@@ -7,7 +7,7 @@ module Gem
|
|
7
7
|
#
|
8
8
|
class Push < Task
|
9
9
|
|
10
|
-
# The
|
10
|
+
# The rubygems host to push gems to.
|
11
11
|
attr_accessor :host
|
12
12
|
|
13
13
|
#
|
@@ -17,7 +17,7 @@ module Gem
|
|
17
17
|
# Additional options.
|
18
18
|
#
|
19
19
|
# @option options [String] :host
|
20
|
-
# The
|
20
|
+
# The rubygems host to push gems to.
|
21
21
|
#
|
22
22
|
def initialize(options={})
|
23
23
|
super()
|
@@ -7,28 +7,13 @@ module Gem
|
|
7
7
|
module Sign
|
8
8
|
class Task < Tasks::Task
|
9
9
|
|
10
|
-
#
|
11
|
-
# Signs a package.
|
12
|
-
#
|
13
|
-
# @param [String] path
|
14
|
-
# The path to the package.
|
15
|
-
#
|
16
|
-
# @abstract
|
17
|
-
#
|
18
|
-
def sign(path)
|
19
|
-
end
|
20
|
-
|
21
|
-
protected
|
22
|
-
|
23
10
|
#
|
24
11
|
# Defines signing tasks for the various packages.
|
25
12
|
#
|
26
13
|
# @param [Symbol] name
|
27
14
|
# The name for the `sign:` task.
|
28
15
|
#
|
29
|
-
|
30
|
-
#
|
31
|
-
def sign_task(name)
|
16
|
+
def define(name)
|
32
17
|
@project.builds.each do |build,packages|
|
33
18
|
packages.each do |format,path|
|
34
19
|
namespace :sign do
|
@@ -42,7 +27,7 @@ module Gem
|
|
42
27
|
end
|
43
28
|
end
|
44
29
|
|
45
|
-
|
30
|
+
namespaced_tasks "sign:#{name}:#{build}", packages.keys
|
46
31
|
|
47
32
|
task "sign:#{name}" => "sign:#{name}:#{build}"
|
48
33
|
task "sign:#{build}" => "sign:#{name}:#{build}"
|
@@ -52,6 +37,17 @@ module Gem
|
|
52
37
|
end
|
53
38
|
end
|
54
39
|
|
40
|
+
#
|
41
|
+
# Signs a package.
|
42
|
+
#
|
43
|
+
# @param [String] path
|
44
|
+
# The path to the package.
|
45
|
+
#
|
46
|
+
# @abstract
|
47
|
+
#
|
48
|
+
def sign(path)
|
49
|
+
end
|
50
|
+
|
55
51
|
end
|
56
52
|
end
|
57
53
|
end
|
data/lib/rubygems/tasks/task.rb
CHANGED
@@ -124,28 +124,28 @@ module Gem
|
|
124
124
|
# @param [String] prefix
|
125
125
|
# The namespace of the sub-tasks to call.
|
126
126
|
#
|
127
|
-
# @param [Array<Symbol>]
|
127
|
+
# @param [Array<Symbol>] subtasks
|
128
128
|
# The names of the sub-tasks.
|
129
129
|
#
|
130
130
|
# @example
|
131
|
-
#
|
131
|
+
# namespaced_tasks 'pkg:tar', @project.gemspecs.keys
|
132
132
|
#
|
133
133
|
# @api semipublic
|
134
134
|
#
|
135
|
-
def
|
136
|
-
task prefix =>
|
135
|
+
def namespaced_tasks(prefix,subtasks)
|
136
|
+
task prefix => subtasks.map { |subtask| "#{prefix}:#{subtask}" }
|
137
137
|
end
|
138
138
|
|
139
139
|
#
|
140
140
|
# Defines a task that will execute tasks for each gemspec.
|
141
141
|
#
|
142
|
-
# @param [Symbol, String]
|
142
|
+
# @param [Symbol, String] prefix
|
143
143
|
# The name for the task.
|
144
144
|
#
|
145
145
|
# @api semipublic
|
146
146
|
#
|
147
|
-
def gemspec_tasks(
|
148
|
-
|
147
|
+
def gemspec_tasks(prefix)
|
148
|
+
namespaced_tasks prefix, @project.gemspecs.keys
|
149
149
|
end
|
150
150
|
|
151
151
|
end
|
data/rubygems-tasks.gemspec
CHANGED
@@ -2,108 +2,59 @@
|
|
2
2
|
|
3
3
|
require 'yaml'
|
4
4
|
|
5
|
-
Gem::Specification.new do |
|
6
|
-
|
7
|
-
`git ls-files`.split($/)
|
8
|
-
elsif File.directory?('.hg')
|
9
|
-
`hg manifest`.split($/)
|
10
|
-
elsif File.directory?('.svn')
|
11
|
-
`svn ls -R`.split($/).select { |path| File.file?(path) }
|
12
|
-
else
|
13
|
-
Dir['{**/}{.*,*}'].select { |path| File.file?(path) }
|
14
|
-
end
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gemspec = YAML.load_file('gemspec.yml')
|
15
7
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
when String
|
21
|
-
(files & Dir[paths])
|
22
|
-
end
|
23
|
-
}
|
24
|
-
|
25
|
-
version = {
|
26
|
-
:file => 'lib/rubygems/tasks/version.rb',
|
27
|
-
:constant => 'Gem::Tasks::VERSION'
|
28
|
-
}
|
29
|
-
|
30
|
-
defaults = {
|
31
|
-
'name' => File.basename(File.dirname(__FILE__)),
|
32
|
-
'files' => files,
|
33
|
-
'require_paths' => ['ext', 'lib'].select { |dir| File.directory?(dir) },
|
34
|
-
'executables' => filter_files['bin/*'].map { |path| File.basename(path) },
|
35
|
-
'test_files' => filter_files['{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'],
|
36
|
-
'extra_doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}']
|
37
|
-
}
|
38
|
-
|
39
|
-
metadata = defaults.merge(YAML.load_file('gemspec.yml'))
|
8
|
+
gem.name = gemspec.fetch('name')
|
9
|
+
gem.version = gemspec.fetch('version') do
|
10
|
+
lib_dir = File.join(File.dirname(__FILE__),'lib')
|
11
|
+
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
|
40
12
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
else
|
45
|
-
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
|
13
|
+
require 'rubygems/tasks/version'
|
14
|
+
Gem::Tasks::VERSION
|
15
|
+
end
|
46
16
|
|
47
|
-
|
48
|
-
|
49
|
-
|
17
|
+
gem.summary = gemspec['summary']
|
18
|
+
gem.description = gemspec['description']
|
19
|
+
gem.licenses = Array(gemspec['license'])
|
20
|
+
gem.authors = Array(gemspec['authors'])
|
21
|
+
gem.email = gemspec['email']
|
22
|
+
gem.homepage = gemspec['homepage']
|
50
23
|
|
51
|
-
|
52
|
-
gemspec.description = metadata.fetch('description',metadata['summary'])
|
24
|
+
glob = lambda { |patterns| gem.files & Dir[*patterns] }
|
53
25
|
|
54
|
-
|
55
|
-
|
26
|
+
gem.files = `git ls-files`.split($/)
|
27
|
+
gem.files = glob[gemspec['files']] if gemspec['files']
|
56
28
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
gemspec.require_paths = Array(metadata['require_paths'])
|
61
|
-
gemspec.files = filter_files[metadata['files']]
|
62
|
-
gemspec.executables = metadata['executables']
|
63
|
-
gemspec.extensions = metadata['extensions']
|
64
|
-
|
65
|
-
if Gem::VERSION < '1.7.'
|
66
|
-
gemspec.default_executable = gemspec.executables.first
|
29
|
+
gem.executables = gemspec.fetch('executables') do
|
30
|
+
glob['bin/*'].map { |path| File.basename(path) }
|
67
31
|
end
|
32
|
+
gem.default_executable = gem.executables.first if Gem::VERSION < '1.7.'
|
68
33
|
|
69
|
-
|
70
|
-
|
34
|
+
gem.extensions = glob[gemspec['extensions'] || 'ext/**/extconf.rb']
|
35
|
+
gem.test_files = glob[gemspec['test_files'] || '{test/{**/}*_test.rb']
|
36
|
+
gem.extra_rdoc_files = glob[gemspec['extra_doc_files'] || '*.{txt,md}']
|
71
37
|
|
72
|
-
|
73
|
-
|
38
|
+
gem.require_paths = Array(gemspec.fetch('require_paths') {
|
39
|
+
%w[ext lib].select { |dir| File.directory?(dir) }
|
40
|
+
})
|
74
41
|
|
75
|
-
|
76
|
-
|
77
|
-
|
42
|
+
gem.requirements = gemspec['requirements']
|
43
|
+
gem.required_ruby_version = gemspec['required_ruby_version']
|
44
|
+
gem.required_rubygems_version = gemspec['required_rubygems_version']
|
45
|
+
gem.post_install_message = gemspec['post_install_message']
|
78
46
|
|
79
|
-
|
80
|
-
gemspec.required_rubygems_version = metadata['required_ruby_version']
|
81
|
-
end
|
82
|
-
|
83
|
-
parse_versions = lambda { |versions|
|
84
|
-
case versions
|
85
|
-
when Array
|
86
|
-
versions.map { |v| v.to_s }
|
87
|
-
when String
|
88
|
-
versions.split(/,\s*/)
|
89
|
-
end
|
90
|
-
}
|
91
|
-
|
92
|
-
if metadata['dependencies']
|
93
|
-
metadata['dependencies'].each do |name,versions|
|
94
|
-
gemspec.add_dependency(name,parse_versions[versions])
|
95
|
-
end
|
96
|
-
end
|
47
|
+
split = lambda { |string| string.split(/,\s*/) }
|
97
48
|
|
98
|
-
if
|
99
|
-
|
100
|
-
|
49
|
+
if gemspec['dependencies']
|
50
|
+
gemspec['dependencies'].each do |name,versions|
|
51
|
+
gem.add_dependency(name,split[versions])
|
101
52
|
end
|
102
53
|
end
|
103
54
|
|
104
|
-
if
|
105
|
-
|
106
|
-
|
55
|
+
if gemspec['development_dependencies']
|
56
|
+
gemspec['development_dependencies'].each do |name,versions|
|
57
|
+
gem.add_development_dependency(name,split[versions])
|
107
58
|
end
|
108
59
|
end
|
109
60
|
end
|
data/spec/console_spec.rb
CHANGED
@@ -7,26 +7,22 @@ describe Gem::Tasks::Console do
|
|
7
7
|
describe "#console" do
|
8
8
|
include_context "rake"
|
9
9
|
|
10
|
-
|
11
|
-
let(:default_options) { %w[-Ilib -rrubygems -rrubygems/tasks] }
|
12
|
-
else
|
13
|
-
let(:default_options) { %w[-Ilib -rrubygems/tasks] }
|
14
|
-
end
|
10
|
+
let(:default_options) { %w[-Ilib -rrubygems/tasks] }
|
15
11
|
|
16
12
|
let(:custom_command) { 'ripl' }
|
17
13
|
let(:custom_options) { %w[-Ivendor -rfoo] }
|
18
14
|
|
19
15
|
context "defaults" do
|
20
16
|
it "should run `irb`" do
|
21
|
-
subject.
|
17
|
+
expect(subject).to receive(:run).with('irb',*default_options)
|
22
18
|
|
23
19
|
subject.console
|
24
20
|
end
|
25
21
|
|
26
22
|
context "when project.bundler? == true" do
|
27
23
|
it "should use `bundle exec`" do
|
28
|
-
subject.project.
|
29
|
-
subject.
|
24
|
+
allow(subject.project).to receive(:bundler?).and_return(true)
|
25
|
+
expect(subject).to receive(:run).with(
|
30
26
|
'bundle', 'exec', 'irb', *default_options
|
31
27
|
)
|
32
28
|
|
@@ -39,15 +35,15 @@ describe Gem::Tasks::Console do
|
|
39
35
|
subject { described_class.new(:command => custom_command) }
|
40
36
|
|
41
37
|
it "should run the custom console" do
|
42
|
-
subject.
|
38
|
+
expect(subject).to receive(:run).with(custom_command,*default_options)
|
43
39
|
|
44
40
|
subject.console
|
45
41
|
end
|
46
42
|
|
47
43
|
context "when project.bundler? == true" do
|
48
44
|
it "should use `bundle exec`" do
|
49
|
-
subject.project.
|
50
|
-
subject.
|
45
|
+
allow(subject.project).to receive(:bundler?).and_return(true)
|
46
|
+
expect(subject).to receive(:run).with(
|
51
47
|
'bundle', 'exec', custom_command, *default_options
|
52
48
|
)
|
53
49
|
|
@@ -60,15 +56,15 @@ describe Gem::Tasks::Console do
|
|
60
56
|
subject { described_class.new(:options => custom_options) }
|
61
57
|
|
62
58
|
it "should pass custom options to `irb`" do
|
63
|
-
subject.
|
59
|
+
expect(subject).to receive(:run).with('irb', *(default_options + custom_options))
|
64
60
|
|
65
61
|
subject.console
|
66
62
|
end
|
67
63
|
|
68
64
|
context "when project.bundler? == true" do
|
69
65
|
it "should use `bundle exec ...`" do
|
70
|
-
subject.project.
|
71
|
-
subject.
|
66
|
+
allow(subject.project).to receive(:bundler?).and_return(true)
|
67
|
+
expect(subject).to receive(:run).with('bundle', 'exec', 'irb', *(default_options + custom_options))
|
72
68
|
|
73
69
|
subject.console
|
74
70
|
end
|
data/spec/install_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe Gem::Tasks::Install do
|
|
8
8
|
let(:path) { 'pkg/foo-1.2.3.gem' }
|
9
9
|
|
10
10
|
it "should use `gem install -q`" do
|
11
|
-
subject.
|
11
|
+
expect(subject).to receive(:run).with('gem', 'install', '-q', path)
|
12
12
|
|
13
13
|
subject.install(path)
|
14
14
|
end
|
data/spec/project_spec.rb
CHANGED
@@ -2,24 +2,27 @@ require 'spec_helper'
|
|
2
2
|
require 'rubygems/tasks/project'
|
3
3
|
|
4
4
|
describe Gem::Tasks::Project do
|
5
|
-
let(:
|
6
|
-
|
5
|
+
let(:rubygems_project_dir) { File.join(PROJECTS_DIR,'rubygems-project') }
|
6
|
+
let(:rubygems_project) { described_class.new(rubygems_project_dir) }
|
7
|
+
|
8
|
+
let(:rubygems_multi_project_dir) do
|
9
|
+
File.join(PROJECTS_DIR,'rubygems-multi-project')
|
7
10
|
end
|
8
11
|
|
9
12
|
let(:rubygems_multi_project) do
|
10
|
-
described_class.new(
|
13
|
+
described_class.new(rubygems_multi_project_dir)
|
11
14
|
end
|
12
15
|
|
13
|
-
let(:
|
14
|
-
|
15
|
-
end
|
16
|
+
let(:bundler_project_dir) { File.join(PROJECTS_DIR,'bundler-project') }
|
17
|
+
let(:bundler_project) { described_class.new(bundler_project_dir) }
|
16
18
|
|
17
19
|
describe "directories" do
|
20
|
+
let(:directory) { rubygems_project_dir }
|
21
|
+
|
18
22
|
it "should map paths to #{described_class} instances" do
|
19
|
-
|
20
|
-
project = described_class.directories[directory]
|
23
|
+
project = described_class.directories[directory]
|
21
24
|
|
22
|
-
project.root.
|
25
|
+
expect(project.root).to eq(directory)
|
23
26
|
end
|
24
27
|
end
|
25
28
|
|
@@ -27,7 +30,7 @@ describe Gem::Tasks::Project do
|
|
27
30
|
subject { rubygems_project }
|
28
31
|
|
29
32
|
it "should use the name of the directory" do
|
30
|
-
subject.name.
|
33
|
+
expect(subject.name).to eq('rubygems-project')
|
31
34
|
end
|
32
35
|
end
|
33
36
|
|
@@ -35,7 +38,7 @@ describe Gem::Tasks::Project do
|
|
35
38
|
subject { bundler_project }
|
36
39
|
|
37
40
|
it "should detect the SCM used" do
|
38
|
-
subject.scm.
|
41
|
+
expect(subject.scm).to eq(:git)
|
39
42
|
end
|
40
43
|
end
|
41
44
|
|
@@ -44,7 +47,7 @@ describe Gem::Tasks::Project do
|
|
44
47
|
subject { rubygems_project }
|
45
48
|
|
46
49
|
it "should load the single-gemspec" do
|
47
|
-
subject.gemspecs.values.map(&:name).
|
50
|
+
expect(subject.gemspecs.values.map(&:name)).to eq(%w[rubygems-project])
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
@@ -52,10 +55,10 @@ describe Gem::Tasks::Project do
|
|
52
55
|
subject { rubygems_multi_project }
|
53
56
|
|
54
57
|
it "should load all gemspecs" do
|
55
|
-
subject.gemspecs.values.map(&:name).
|
58
|
+
expect(subject.gemspecs.values.map(&:name)).to match_array(%w[
|
56
59
|
rubygems-project
|
57
60
|
rubygems-project-lite
|
58
|
-
]
|
61
|
+
])
|
59
62
|
end
|
60
63
|
end
|
61
64
|
end
|
@@ -65,7 +68,7 @@ describe Gem::Tasks::Project do
|
|
65
68
|
subject { rubygems_project }
|
66
69
|
|
67
70
|
it "should match the directory name to the gemspec" do
|
68
|
-
subject.primary_gemspec.
|
71
|
+
expect(subject.primary_gemspec).to eq(subject.name)
|
69
72
|
end
|
70
73
|
end
|
71
74
|
|
@@ -73,7 +76,7 @@ describe Gem::Tasks::Project do
|
|
73
76
|
subject { rubygems_multi_project }
|
74
77
|
|
75
78
|
it "should pick the first gemspec" do
|
76
|
-
subject.primary_gemspec.
|
79
|
+
expect(subject.primary_gemspec).to eq('rubygems-project')
|
77
80
|
end
|
78
81
|
end
|
79
82
|
end
|
@@ -83,11 +86,11 @@ describe Gem::Tasks::Project do
|
|
83
86
|
subject { rubygems_project }
|
84
87
|
|
85
88
|
it "should default the directory name to the gemspec" do
|
86
|
-
subject.gemspec.name.
|
89
|
+
expect(subject.gemspec.name).to eq(subject.name)
|
87
90
|
end
|
88
91
|
|
89
92
|
it "should raise an ArgumentError for unknown gemspec names" do
|
90
|
-
|
93
|
+
expect { subject.gemspec('foo') }.to raise_error(ArgumentError)
|
91
94
|
end
|
92
95
|
end
|
93
96
|
|
@@ -95,13 +98,13 @@ describe Gem::Tasks::Project do
|
|
95
98
|
subject { rubygems_multi_project }
|
96
99
|
|
97
100
|
it "should default the first gemspec" do
|
98
|
-
subject.gemspec.name.
|
101
|
+
expect(subject.gemspec.name).to eq('rubygems-project')
|
99
102
|
end
|
100
103
|
|
101
104
|
it "should allow accessing alternate gemspecs" do
|
102
105
|
alternate = 'rubygems-project-lite'
|
103
106
|
|
104
|
-
subject.gemspec(alternate).name.
|
107
|
+
expect(subject.gemspec(alternate).name).to eq(alternate)
|
105
108
|
end
|
106
109
|
end
|
107
110
|
end
|
@@ -110,20 +113,20 @@ describe Gem::Tasks::Project do
|
|
110
113
|
subject { rubygems_multi_project }
|
111
114
|
|
112
115
|
it "should group builds by gemspec name" do
|
113
|
-
subject.builds.keys.
|
116
|
+
expect(subject.builds.keys).to be == subject.gemspecs.keys
|
114
117
|
end
|
115
118
|
|
116
119
|
it "should map a package format to a pkg/ path" do
|
117
120
|
packages = subject.builds['rubygems-project']
|
118
121
|
|
119
|
-
packages['tar.gz'].
|
122
|
+
expect(packages['tar.gz']).to eq('pkg/rubygems-project-1.2.3.tar.gz')
|
120
123
|
end
|
121
124
|
|
122
125
|
context "with single-gemspec project" do
|
123
126
|
subject { rubygems_project }
|
124
127
|
|
125
128
|
it "should only have a key for the single-gemspec" do
|
126
|
-
subject.builds.keys.
|
129
|
+
expect(subject.builds.keys).to eq(%w[rubygems-project])
|
127
130
|
end
|
128
131
|
end
|
129
132
|
|
@@ -131,10 +134,10 @@ describe Gem::Tasks::Project do
|
|
131
134
|
subject { rubygems_multi_project }
|
132
135
|
|
133
136
|
it "should have keys for each gemspec" do
|
134
|
-
subject.builds.keys.
|
137
|
+
expect(subject.builds.keys).to match_array(%w[
|
135
138
|
rubygems-project
|
136
139
|
rubygems-project-lite
|
137
|
-
]
|
140
|
+
])
|
138
141
|
end
|
139
142
|
end
|
140
143
|
end
|
@@ -144,7 +147,7 @@ describe Gem::Tasks::Project do
|
|
144
147
|
subject { bundler_project }
|
145
148
|
|
146
149
|
it "should detect the 'Gemfile' file" do
|
147
|
-
subject.bundler
|
150
|
+
expect(subject.bundler?).to be_truthy
|
148
151
|
end
|
149
152
|
end
|
150
153
|
|
@@ -152,7 +155,7 @@ describe Gem::Tasks::Project do
|
|
152
155
|
subject { rubygems_project }
|
153
156
|
|
154
157
|
it "should be false" do
|
155
|
-
subject.bundler
|
158
|
+
expect(subject.bundler?).to be_falsey
|
156
159
|
end
|
157
160
|
end
|
158
161
|
end
|