jeweler 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/.travis.yml +5 -1
- data/ChangeLog.markdown +4 -0
- data/Gemfile +23 -23
- data/Gemfile.lock +142 -0
- data/Gemfile.orig +54 -0
- data/README.markdown +3 -0
- data/Rakefile +13 -14
- data/Rakefile.orig +88 -0
- data/features/generator/test.feature +2 -2
- data/features/step_definitions/debug_steps.rb +0 -1
- data/features/step_definitions/filesystem_steps.rb +2 -3
- data/features/step_definitions/generator_steps.rb +44 -64
- data/features/step_definitions/task_steps.rb +1 -2
- data/features/support/env.rb +21 -7
- data/jeweler.gemspec +11 -6
- data/jeweler.gemspec.orig +464 -0
- data/lib/jeweler.rb +18 -19
- data/lib/jeweler/commands/build_gem.rb +2 -2
- data/lib/jeweler/commands/check_dependencies.rb +3 -3
- data/lib/jeweler/commands/install_gem.rb +1 -1
- data/lib/jeweler/commands/release_gemspec.rb +8 -10
- data/lib/jeweler/commands/release_to_git.rb +9 -5
- data/lib/jeweler/commands/validate_gemspec.rb +5 -7
- data/lib/jeweler/commands/version/base.rb +8 -13
- data/lib/jeweler/commands/version/bump_major.rb +1 -3
- data/lib/jeweler/commands/version/bump_minor.rb +1 -2
- data/lib/jeweler/commands/version/bump_patch.rb +1 -4
- data/lib/jeweler/commands/write_gemspec.rb +4 -3
- data/lib/jeweler/gemspec_helper.rb +15 -15
- data/lib/jeweler/gemspec_helper.rb.orig +91 -0
- data/lib/jeweler/generator.rb +39 -41
- data/lib/jeweler/generator/application.rb +5 -7
- data/lib/jeweler/generator/bacon_mixin.rb +2 -4
- data/lib/jeweler/generator/github_mixin.rb +1 -3
- data/lib/jeweler/generator/micronaut_mixin.rb +3 -3
- data/lib/jeweler/generator/minitest_mixin.rb +2 -3
- data/lib/jeweler/generator/options.rb +15 -19
- data/lib/jeweler/generator/rdoc_mixin.rb +1 -1
- data/lib/jeweler/generator/riot_mixin.rb +2 -3
- data/lib/jeweler/generator/rspec_mixin.rb +2 -3
- data/lib/jeweler/generator/shindo_mixin.rb +2 -3
- data/lib/jeweler/generator/shoulda_mixin.rb +2 -3
- data/lib/jeweler/generator/testspec_mixin.rb +2 -3
- data/lib/jeweler/generator/testunit_mixin.rb +1 -3
- data/lib/jeweler/generator/yard_mixin.rb +3 -4
- data/lib/jeweler/rubyforge_tasks.rb +13 -13
- data/lib/jeweler/rubygems_dot_org_tasks.rb +3 -3
- data/lib/jeweler/rubygems_tasks.rb +3 -3
- data/lib/jeweler/specification.rb +22 -11
- data/lib/jeweler/tasks.rb +57 -57
- data/lib/jeweler/templates/bacon/flunking.rb +3 -3
- data/lib/jeweler/templates/micronaut/flunking.rb +3 -3
- data/lib/jeweler/templates/minitest/flunking.rb +1 -1
- data/lib/jeweler/templates/minitest/helper.rb +3 -3
- data/lib/jeweler/templates/riot/flunking.rb +1 -1
- data/lib/jeweler/templates/rspec/flunking.rb +3 -3
- data/lib/jeweler/templates/shindo/flunking.rb +3 -3
- data/lib/jeweler/templates/testspec/flunking.rb +3 -3
- data/lib/jeweler/version_helper.rb +18 -15
- data/test/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -1
- data/test/fixtures/existing-project-with-version-constant/Rakefile +18 -20
- data/test/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec +15 -17
- data/test/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb +2 -2
- data/test/fixtures/existing-project-with-version-plaintext/Rakefile +17 -19
- data/test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec +15 -17
- data/test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb +2 -2
- data/test/fixtures/existing-project-with-version-yaml/Rakefile +17 -19
- data/test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec +15 -17
- data/test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb +2 -2
- data/test/jeweler/commands/test_build_gem.rb +25 -28
- data/test/jeweler/commands/test_install_gem.rb +7 -7
- data/test/jeweler/commands/test_release_to_gemcutter.rb +6 -7
- data/test/jeweler/commands/test_release_to_git.rb +52 -57
- data/test/jeweler/commands/test_release_to_github.rb +112 -119
- data/test/jeweler/commands/test_validate_gemspec.rb +4 -6
- data/test/jeweler/commands/test_write_gemspec.rb +21 -24
- data/test/jeweler/commands/version/test_base.rb +9 -10
- data/test/jeweler/commands/version/test_bump_major.rb +1 -5
- data/test/jeweler/commands/version/test_bump_minor.rb +1 -2
- data/test/jeweler/commands/version/test_bump_patch.rb +1 -3
- data/test/jeweler/commands/version/test_write.rb +1 -3
- data/test/jeweler/generator/test_application.rb +22 -26
- data/test/jeweler/generator/test_options.rb +26 -27
- data/test/jeweler/test_gemspec_helper.rb +7 -7
- data/test/jeweler/test_generator.rb +31 -32
- data/test/jeweler/test_generator_initialization.rb +40 -43
- data/test/jeweler/test_generator_mixins.rb +6 -7
- data/test/jeweler/test_specification.rb +36 -43
- data/test/jeweler/test_tasks.rb +2 -3
- data/test/jeweler/test_version_helper.rb +33 -35
- data/test/shoulda_macros/jeweler_macros.rb +5 -5
- data/test/test_helper.rb +23 -25
- data/test/test_jeweler.rb +22 -25
- metadata +11 -6
@@ -13,7 +13,7 @@ Feature: generated test or spec
|
|
13
13
|
Given a working directory
|
14
14
|
And I have configured git sanely
|
15
15
|
When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
|
16
|
-
Then 'test/test_the-perfect-gem.rb' should define 'TestThePerfectGem' as a subclass of 'MiniTest::
|
16
|
+
Then 'test/test_the-perfect-gem.rb' should define 'TestThePerfectGem' as a subclass of 'MiniTest::Test'
|
17
17
|
|
18
18
|
Scenario: rspec
|
19
19
|
Given a working directory
|
@@ -51,4 +51,4 @@ Feature: generated test or spec
|
|
51
51
|
Given a working directory
|
52
52
|
And I have configured git sanely
|
53
53
|
When I generate a shindo project named 'the-perfect-gem' that is 'zomg, so good'
|
54
|
-
Then 'tests/the-perfect-gem_tests.rb' should have tests for 'ThePerfectGem'
|
54
|
+
Then 'tests/the-perfect-gem_tests.rb' should have tests for 'ThePerfectGem'
|
@@ -21,7 +21,7 @@ Given /^I use the jeweler command to generate the "([^"]+)" project in the worki
|
|
21
21
|
end
|
22
22
|
|
23
23
|
Given /^"([^"]+)" does not exist$/ do |file|
|
24
|
-
assert !
|
24
|
+
assert !File.exist?(File.join(@working_dir, file))
|
25
25
|
end
|
26
26
|
|
27
27
|
When /^I run "([^"]+)" in "([^"]+)"$/ do |command, directory|
|
@@ -33,7 +33,7 @@ When /^I run "([^"]+)" in "([^"]+)"$/ do |command, directory|
|
|
33
33
|
assert File.directory?(full_path), "#{full_path} is not a directory"
|
34
34
|
|
35
35
|
@stdout = `cd #{full_path} && #{command}`
|
36
|
-
@exited_cleanly =
|
36
|
+
@exited_cleanly = $CHILD_STATUS.exited?
|
37
37
|
end
|
38
38
|
|
39
39
|
Then /^the updated version, (.*), is displayed$/ do |version|
|
@@ -67,4 +67,3 @@ Given /^"VERSION" contains "([^\"]*)"$/ do |expected|
|
|
67
67
|
version = File.read(File.join(@working_dir, @name, 'VERSION')).chomp
|
68
68
|
assert_equal expected, version
|
69
69
|
end
|
70
|
-
|
@@ -18,7 +18,6 @@ Given /^I do not want bundler$/ do
|
|
18
18
|
@use_bundler = false
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
21
|
Given /^I want bundler$/ do
|
23
22
|
@use_bundler = true
|
24
23
|
end
|
@@ -40,14 +39,13 @@ And /^I want rubyforge setup$/ do
|
|
40
39
|
end
|
41
40
|
|
42
41
|
Given /^I want to use yard instead of rdoc$/ do
|
43
|
-
@documentation_framework =
|
42
|
+
@documentation_framework = 'yard'
|
44
43
|
end
|
45
44
|
|
46
45
|
Given /^I want to use rdoc instead of yard$/ do
|
47
|
-
@documentation_framework =
|
46
|
+
@documentation_framework = 'rdoc'
|
48
47
|
end
|
49
48
|
|
50
|
-
|
51
49
|
Given /^I intend to test with (\w+)$/ do |testing_framework|
|
52
50
|
@testing_framework = testing_framework.to_sym
|
53
51
|
end
|
@@ -58,11 +56,10 @@ Given /^I have configured git sanely$/ do
|
|
58
56
|
@github_user = 'technicalpickles'
|
59
57
|
|
60
58
|
require 'git'
|
61
|
-
Git.stubs(:global_config)
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
'github.user' => @github_user})
|
59
|
+
Git.stubs(:global_config)
|
60
|
+
.returns('user.name' => @user_name,
|
61
|
+
'user.email' => @user_email,
|
62
|
+
'github.user' => @github_user)
|
66
63
|
end
|
67
64
|
|
68
65
|
Given /^I set JEWELER_OPTS env variable to "(.*)"$/ do |val|
|
@@ -79,26 +76,21 @@ When /^I generate a (.*)project named '((?:\w|-|_)+)' that is '([^']*)' and desc
|
|
79
76
|
@description = description
|
80
77
|
|
81
78
|
testing_framework = testing_framework.squeeze.strip
|
82
|
-
unless testing_framework.blank?
|
83
|
-
@testing_framework = testing_framework.to_sym
|
84
|
-
end
|
79
|
+
@testing_framework = testing_framework.to_sym unless testing_framework.blank?
|
85
80
|
|
86
|
-
|
87
|
-
arguments = [ '--summary', @summary,
|
81
|
+
arguments = ['--summary', @summary,
|
88
82
|
'--description', @description,
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
"#{@working_dir}/#{@name}"].compact
|
101
|
-
|
83
|
+
@use_cucumber ? '--cucumber' : nil,
|
84
|
+
@testing_framework ? "--#{@testing_framework}" : nil,
|
85
|
+
@use_rubyforge ? '--rubyforge' : nil,
|
86
|
+
@use_roodi ? '--roodi' : nil,
|
87
|
+
@use_reek ? '--reek' : nil,
|
88
|
+
case @use_bundler
|
89
|
+
when true then '--bundler'
|
90
|
+
when false then '--no-bundler'
|
91
|
+
end,
|
92
|
+
@documentation_framework ? "--#{@documentation_framework}" : nil,
|
93
|
+
"#{@working_dir}/#{@name}"].compact
|
102
94
|
|
103
95
|
@stdout = OutputCatcher.catch_out do
|
104
96
|
Jeweler::Generator::Application.run! *arguments
|
@@ -110,28 +102,27 @@ end
|
|
110
102
|
Then /^a directory named '(.*)' is created$/ do |directory|
|
111
103
|
directory = File.join(@working_dir, directory)
|
112
104
|
|
113
|
-
assert File.
|
105
|
+
assert File.exist?(directory), "#{directory} did not exist"
|
114
106
|
assert File.directory?(directory), "#{directory} is not a directory"
|
115
107
|
end
|
116
108
|
|
117
|
-
Then
|
109
|
+
Then 'cucumber directories are created' do
|
118
110
|
step "a directory named 'the-perfect-gem/features' is created"
|
119
111
|
step "a directory named 'the-perfect-gem/features/support' is created"
|
120
112
|
step "a directory named 'the-perfect-gem/features/step_definitions' is created"
|
121
113
|
end
|
122
114
|
|
123
|
-
|
124
115
|
Then /^a file named '(.*)' is created$/ do |file|
|
125
116
|
file = File.join(@working_dir, file)
|
126
117
|
|
127
|
-
assert File.
|
118
|
+
assert File.exist?(file), "#{file} expected to exist, but did not"
|
128
119
|
assert File.file?(file), "#{file} expected to be a file, but is not"
|
129
120
|
end
|
130
121
|
|
131
122
|
Then /^a file named '(.*)' is not created$/ do |file|
|
132
123
|
file = File.join(@working_dir, file)
|
133
124
|
|
134
|
-
assert !
|
125
|
+
assert !File.exist?(file), "#{file} expected to not exist, but did"
|
135
126
|
end
|
136
127
|
|
137
128
|
Then /^a sane '.gitignore' is created$/ do
|
@@ -153,21 +144,21 @@ end
|
|
153
144
|
Then /^Rakefile has '(.*)' for the (.*) (.*)$/ do |value, task_class, field|
|
154
145
|
@rakefile_content ||= File.read(File.join(@working_dir, @name, 'Rakefile'))
|
155
146
|
block_variable, task_block = yank_task_info(@rakefile_content, task_class)
|
156
|
-
#raise "Found in #{task_class}: #{block_variable.inspect}: #{task_block.inspect}"
|
147
|
+
# raise "Found in #{task_class}: #{block_variable.inspect}: #{task_block.inspect}"
|
157
148
|
|
158
149
|
assert_match /#{block_variable}\.#{field} = (%Q\{|"|')#{Regexp.escape(value)}(\}|"|')/, task_block
|
159
150
|
end
|
160
151
|
|
161
152
|
Then /^Rakefile adds '(.*)' as a development dependency to Jeweler::Tasks$/ do |dependency|
|
162
153
|
@rakefile_content ||= File.read(File.join(@working_dir, @name, 'Rakefile'))
|
163
|
-
block_variable, task_block = yank_task_info(@rakefile_content,
|
154
|
+
block_variable, task_block = yank_task_info(@rakefile_content, 'Jeweler::Tasks')
|
164
155
|
|
165
156
|
assert_match /#{block_variable}\.add_development_dependency "#{dependency}"/, task_block
|
166
157
|
end
|
167
158
|
|
168
159
|
Then /^Rakefile does not add '(.*)' as a development dependency to Jeweler::Tasks$/ do |dependency|
|
169
160
|
@rakefile_content ||= File.read(File.join(@working_dir, @name, 'Rakefile'))
|
170
|
-
block_variable, task_block = yank_task_info(@rakefile_content,
|
161
|
+
block_variable, task_block = yank_task_info(@rakefile_content, 'Jeweler::Tasks')
|
171
162
|
|
172
163
|
assert_no_match /#{block_variable}\.add_development_dependency "#{dependency}"/, task_block
|
173
164
|
end
|
@@ -186,7 +177,6 @@ Then /^Rakefile has '(.*)' in the Rcov::RcovTask rcov_opts$/ do |rcov_opts|
|
|
186
177
|
assert_match "#{block_variable}.rcov_opts << '#{rcov_opts}'", @rakefile_content
|
187
178
|
end
|
188
179
|
|
189
|
-
|
190
180
|
Then /^'(.*)' contains '(.*)'$/ do |file, expected_string|
|
191
181
|
contents = File.read(File.join(@working_dir, @name, file))
|
192
182
|
assert_match expected_string, contents
|
@@ -202,7 +192,6 @@ Then /^'(.*)' mentions copyright belonging to me in the current year$/ do |file|
|
|
202
192
|
step "'#{file}' mentions copyright belonging to me in #{current_year}"
|
203
193
|
end
|
204
194
|
|
205
|
-
|
206
195
|
Then /^LICENSE\.txt credits '(.*)'$/ do |copyright_holder|
|
207
196
|
step "a file named 'the-perfect-gem/LICENSE.txt' is created"
|
208
197
|
@license_content ||= File.read(File.join(@working_dir, @name, 'LICENSE.txt'))
|
@@ -214,36 +203,34 @@ Given /^it is the year (\d+)$/ do |year|
|
|
214
203
|
Timecop.travel(time)
|
215
204
|
end
|
216
205
|
|
217
|
-
|
218
206
|
Then /^LICENSE\.txt has a copyright in the year (\d+)$/ do |year|
|
219
207
|
step "a file named 'the-perfect-gem/LICENSE.txt' is created"
|
220
208
|
@license_content ||= File.read(File.join(@working_dir, @name, 'LICENSE.txt'))
|
221
209
|
assert_match year, @license_content
|
222
210
|
end
|
223
211
|
|
224
|
-
|
225
212
|
Then /^'(.*)' should define '(.*)' as a subclass of '(.*)'$/ do |file, class_name, superclass_name|
|
226
|
-
@test_content = File.read(
|
213
|
+
@test_content = File.read(File.join(@working_dir, @name, file))
|
227
214
|
|
228
215
|
assert_match "class #{class_name} < #{superclass_name}", @test_content
|
229
216
|
end
|
230
217
|
|
231
218
|
Then /^'(.*)' should describe '(.*)'$/ do |file, describe_name|
|
232
|
-
@spec_content ||= File.read(
|
219
|
+
@spec_content ||= File.read(File.join(@working_dir, @name, file))
|
233
220
|
|
234
|
-
assert_match %
|
221
|
+
assert_match %(describe "#{describe_name}" do), @spec_content
|
235
222
|
end
|
236
223
|
|
237
224
|
Then /^'(.*)' should contextualize '(.*)'$/ do |file, describe_name|
|
238
|
-
@spec_content ||= File.read(
|
225
|
+
@spec_content ||= File.read(File.join(@working_dir, @name, file))
|
239
226
|
|
240
|
-
assert_match %
|
227
|
+
assert_match %(context "#{describe_name}" do), @spec_content
|
241
228
|
end
|
242
229
|
|
243
230
|
Then /^'(.*)' should have tests for '(.*)'$/ do |file, describe_name|
|
244
|
-
@tests_content ||= File.read(
|
231
|
+
@tests_content ||= File.read(File.join(@working_dir, @name, file))
|
245
232
|
|
246
|
-
assert_match %
|
233
|
+
assert_match %{Shindo.tests("#{describe_name}") do}, @tests_content
|
247
234
|
end
|
248
235
|
|
249
236
|
Then /^'(.*)' requires '(.*)'$/ do |file, lib|
|
@@ -276,11 +263,10 @@ Then /^Rakefile instantiates a (.*)$/ do |task_name|
|
|
276
263
|
assert_match /#{task_name}/, content
|
277
264
|
end
|
278
265
|
|
279
|
-
|
280
266
|
Then /^'(.+?)' should autorun tests$/ do |test_helper|
|
281
267
|
content = File.read(File.join(@working_dir, @name, test_helper))
|
282
268
|
|
283
|
-
assert_match "
|
269
|
+
assert_match "require 'minitest/autorun'", content
|
284
270
|
end
|
285
271
|
|
286
272
|
Then /^cucumber world extends "(.*)"$/ do |module_to_extend|
|
@@ -288,15 +274,13 @@ Then /^cucumber world extends "(.*)"$/ do |module_to_extend|
|
|
288
274
|
assert_match "World(#{module_to_extend})", content
|
289
275
|
end
|
290
276
|
|
291
|
-
|
292
277
|
Then /^'features\/support\/env\.rb' sets up features to use test\/unit assertions$/ do
|
293
|
-
|
294
278
|
end
|
295
279
|
|
296
280
|
Then /^'features\/support\/env\.rb' sets up features to use minitest assertions$/ do
|
297
281
|
content = File.read(File.join(@working_dir, @name, 'features', 'support', 'env.rb'))
|
298
282
|
|
299
|
-
assert_match
|
283
|
+
assert_match 'world.extend(Mini::Test::Assertions)', content
|
300
284
|
end
|
301
285
|
|
302
286
|
Then /^git repository has '(.*)' remote$/ do |remote|
|
@@ -305,7 +289,7 @@ Then /^git repository has '(.*)' remote$/ do |remote|
|
|
305
289
|
assert_equal 'origin', remote.name
|
306
290
|
end
|
307
291
|
|
308
|
-
Then /^git repository '(.*)' remote should be '(.*)'/ do |remote,
|
292
|
+
Then /^git repository '(.*)' remote should be '(.*)'/ do |remote, _remote_url|
|
309
293
|
remote = @repo.remotes.first
|
310
294
|
|
311
295
|
assert_equal 'git@github.com:technicalpickles/the-perfect-gem.git', remote.url
|
@@ -319,7 +303,7 @@ Then /^'(.*)' was checked in$/ do |file|
|
|
319
303
|
status = @repo.status[file]
|
320
304
|
|
321
305
|
assert_not_nil status, "wasn't able to get status for #{file}"
|
322
|
-
assert !
|
306
|
+
assert !status.untracked, "#{file} was untracked"
|
323
307
|
assert_nil status.type, "#{file} had a type. it should have been nil"
|
324
308
|
end
|
325
309
|
|
@@ -332,7 +316,6 @@ Then /^Rakefile has "(.*)" as the default task$/ do |task|
|
|
332
316
|
assert_match "task :default => :#{task}", @rakefile_content
|
333
317
|
end
|
334
318
|
|
335
|
-
|
336
319
|
After do
|
337
320
|
ENV['JEWELER_OPTS'] = nil
|
338
321
|
end
|
@@ -356,15 +339,14 @@ end
|
|
356
339
|
Then /^'Gemfile' has a development dependency on the current version of jeweler$/ do
|
357
340
|
@gemfile_content ||= File.read(File.join(@working_dir, @name, 'Gemfile'))
|
358
341
|
group_block = yank_group_info(@gemfile_content, 'development')
|
359
|
-
|
360
|
-
assert_match %Q{gem "jeweler", "~> #{Jeweler::Version::STRING}"}, group_block
|
361
|
-
end
|
362
342
|
|
343
|
+
assert_match %(gem "jeweler", "~> #{Jeweler::Version::STRING}"), group_block
|
344
|
+
end
|
363
345
|
|
364
346
|
Then /^'(.*)' sets up bundler using the default and development groups$/ do |file|
|
365
347
|
content = File.read(File.join(@working_dir, @name, file))
|
366
348
|
|
367
|
-
assert_match
|
349
|
+
assert_match 'Bundler.setup(:default, :development)', content
|
368
350
|
end
|
369
351
|
|
370
352
|
Then /^'(.*)' does not setup bundler$/ do |file|
|
@@ -373,15 +355,13 @@ Then /^'(.*)' does not setup bundler$/ do |file|
|
|
373
355
|
assert_no_match /Bundler\.setup/, content
|
374
356
|
end
|
375
357
|
|
376
|
-
Then /^'Gemfile' uses the (.*) source$/ do |
|
358
|
+
Then /^'Gemfile' uses the (.*) source$/ do |_source|
|
377
359
|
content = File.read(File.join(@working_dir, @name, 'Gemfile'))
|
378
360
|
|
379
|
-
assert_match %
|
361
|
+
assert_match %(source "https://rubygems.org"), content
|
380
362
|
end
|
381
363
|
|
382
|
-
|
383
|
-
Then /^Rakefile has a magic comment for UTF\-(\d+)$/ do |arg1|
|
364
|
+
Then /^Rakefile has a magic comment for UTF\-(\d+)$/ do |_arg1|
|
384
365
|
content = File.read(File.join(@working_dir, @name, 'Rakefile'))
|
385
|
-
assert_match
|
366
|
+
assert_match '# encoding: utf-8', content
|
386
367
|
end
|
387
|
-
|
@@ -1,6 +1,5 @@
|
|
1
1
|
Then /^I can gem install "([^"]+)"$/ do |gem_path|
|
2
2
|
@stdout = `cd #{@working_dir}; gem install --install-dir #{@working_dir}/gem-install-dir --no-ri --no-rdoc #{gem_path} 2>&1`
|
3
3
|
assert_no_match /ERROR/, @stdout
|
4
|
-
assert
|
4
|
+
assert $CHILD_STATUS.exited?
|
5
5
|
end
|
6
|
-
|
data/features/support/env.rb
CHANGED
@@ -1,24 +1,40 @@
|
|
1
|
+
ENV.delete_if { |name, _| name.start_with?('GIT') }
|
1
2
|
require 'bundler'
|
2
3
|
begin
|
3
4
|
Bundler.setup(:default, :xzibit, :test)
|
4
5
|
rescue Bundler::BundlerError => e
|
5
6
|
$stderr.puts e.message
|
6
|
-
$stderr.puts
|
7
|
+
$stderr.puts 'Run `bundle install` to install missing gems'
|
7
8
|
exit e.status_code
|
8
9
|
end
|
9
10
|
|
10
11
|
require 'jeweler'
|
11
12
|
require 'mocha'
|
13
|
+
require 'mocha/api'
|
14
|
+
World(Mocha::API)
|
15
|
+
|
16
|
+
Before do
|
17
|
+
mocha_setup
|
18
|
+
end
|
19
|
+
|
20
|
+
After do
|
21
|
+
begin
|
22
|
+
mocha_verify
|
23
|
+
ensure
|
24
|
+
mocha_teardown
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
12
28
|
require 'output_catcher'
|
13
29
|
require 'timecop'
|
14
|
-
require 'ruby-debug'
|
15
30
|
require 'active_support'
|
31
|
+
require 'active_support/core_ext/object/blank'
|
16
32
|
|
17
33
|
require 'test/unit/assertions'
|
18
34
|
World(Test::Unit::Assertions)
|
19
35
|
|
20
|
-
require '
|
21
|
-
World(
|
36
|
+
require 'test_construct'
|
37
|
+
World(TestConstruct::Helpers)
|
22
38
|
|
23
39
|
def yank_task_info(content, task)
|
24
40
|
if content =~ /#{Regexp.escape(task)}.new(\(.*\))? do \|(.*?)\|(.*?)^end$/m
|
@@ -27,9 +43,7 @@ def yank_task_info(content, task)
|
|
27
43
|
end
|
28
44
|
|
29
45
|
def yank_group_info(content, group)
|
30
|
-
if content =~ /group :#{group} do(.*?)end/m
|
31
|
-
$1
|
32
|
-
end
|
46
|
+
$1 if content =~ /group :#{group} do(.*?)end/m
|
33
47
|
end
|
34
48
|
|
35
49
|
def fixture_dir
|
data/jeweler.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: jeweler 2.1.
|
5
|
+
# stub: jeweler 2.1.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "jeweler"
|
9
|
-
s.version = "2.1.
|
9
|
+
s.version = "2.1.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Fred Mitchell", "Josh Nichols", "Yusuke Murata"]
|
14
|
-
s.date = "2016-
|
14
|
+
s.date = "2016-10-22"
|
15
15
|
s.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
|
16
16
|
s.email = ["fred.mitchell@gmx.de", "fred.mitchell@gmx.com", "info@muratayusuke.com"]
|
17
17
|
s.executables = ["jeweler"]
|
@@ -28,9 +28,12 @@ Gem::Specification.new do |s|
|
|
28
28
|
".yardopts",
|
29
29
|
"ChangeLog.markdown",
|
30
30
|
"Gemfile",
|
31
|
+
"Gemfile.lock",
|
32
|
+
"Gemfile.orig",
|
31
33
|
"LICENSE.txt",
|
32
34
|
"README.markdown",
|
33
35
|
"Rakefile",
|
36
|
+
"Rakefile.orig",
|
34
37
|
"bin/jeweler",
|
35
38
|
"features/generator/cucumber.feature",
|
36
39
|
"features/generator/directory_layout.feature",
|
@@ -53,6 +56,7 @@ Gem::Specification.new do |s|
|
|
53
56
|
"features/tasks/version.feature",
|
54
57
|
"features/tasks/version_bumping.feature",
|
55
58
|
"jeweler.gemspec",
|
59
|
+
"jeweler.gemspec.orig",
|
56
60
|
"lib/jeweler.rb",
|
57
61
|
"lib/jeweler/commands.rb",
|
58
62
|
"lib/jeweler/commands/build_gem.rb",
|
@@ -71,6 +75,7 @@ Gem::Specification.new do |s|
|
|
71
75
|
"lib/jeweler/errors.rb",
|
72
76
|
"lib/jeweler/gemcutter_tasks.rb",
|
73
77
|
"lib/jeweler/gemspec_helper.rb",
|
78
|
+
"lib/jeweler/gemspec_helper.rb.orig",
|
74
79
|
"lib/jeweler/generator.rb",
|
75
80
|
"lib/jeweler/generator/application.rb",
|
76
81
|
"lib/jeweler/generator/bacon_mixin.rb",
|
@@ -196,7 +201,7 @@ Gem::Specification.new do |s|
|
|
196
201
|
s.add_runtime_dependency(%q<rake>, [">= 0"])
|
197
202
|
s.add_runtime_dependency(%q<git>, [">= 1.2.5"])
|
198
203
|
s.add_runtime_dependency(%q<nokogiri>, [">= 1.5.10"])
|
199
|
-
s.add_runtime_dependency(%q<github_api>, ["
|
204
|
+
s.add_runtime_dependency(%q<github_api>, ["~> 0.11.0"])
|
200
205
|
s.add_runtime_dependency(%q<highline>, [">= 1.6.15"])
|
201
206
|
s.add_runtime_dependency(%q<bundler>, [">= 1.0"])
|
202
207
|
s.add_runtime_dependency(%q<rdoc>, [">= 0"])
|
@@ -210,7 +215,7 @@ Gem::Specification.new do |s|
|
|
210
215
|
s.add_dependency(%q<rake>, [">= 0"])
|
211
216
|
s.add_dependency(%q<git>, [">= 1.2.5"])
|
212
217
|
s.add_dependency(%q<nokogiri>, [">= 1.5.10"])
|
213
|
-
s.add_dependency(%q<github_api>, ["
|
218
|
+
s.add_dependency(%q<github_api>, ["~> 0.11.0"])
|
214
219
|
s.add_dependency(%q<highline>, [">= 1.6.15"])
|
215
220
|
s.add_dependency(%q<bundler>, [">= 1.0"])
|
216
221
|
s.add_dependency(%q<rdoc>, [">= 0"])
|
@@ -225,7 +230,7 @@ Gem::Specification.new do |s|
|
|
225
230
|
s.add_dependency(%q<rake>, [">= 0"])
|
226
231
|
s.add_dependency(%q<git>, [">= 1.2.5"])
|
227
232
|
s.add_dependency(%q<nokogiri>, [">= 1.5.10"])
|
228
|
-
s.add_dependency(%q<github_api>, ["
|
233
|
+
s.add_dependency(%q<github_api>, ["~> 0.11.0"])
|
229
234
|
s.add_dependency(%q<highline>, [">= 1.6.15"])
|
230
235
|
s.add_dependency(%q<bundler>, [">= 1.0"])
|
231
236
|
s.add_dependency(%q<rdoc>, [">= 0"])
|