dima-jeweler 0.9.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/ChangeLog.markdown +54 -1
- data/README.markdown +89 -20
- data/ROADMAP +12 -0
- data/Rakefile +52 -12
- data/VERSION.yml +3 -3
- data/features/generator/cucumber.feature +83 -0
- data/features/generator/directory_layout.feature +76 -0
- data/features/generator/dotdocument.feature +14 -0
- data/features/generator/env_options.feature +9 -0
- data/features/generator/git.feature +94 -0
- data/features/generator/license.feature +11 -0
- data/features/generator/rakefile.feature +151 -0
- data/features/generator/readme.feature +12 -0
- data/features/generator/test.feature +41 -0
- data/features/generator/test_helper.feature +49 -0
- data/features/placeholder.feature +5 -0
- data/features/step_definitions/debug_steps.rb +6 -0
- data/features/step_definitions/filesystem_steps.rb +68 -0
- data/features/step_definitions/generator_steps.rb +284 -0
- data/features/step_definitions/task_steps.rb +6 -0
- data/features/support/env.rb +29 -0
- data/features/tasks/build_gem.feature +9 -0
- data/features/tasks/version.feature +24 -0
- data/features/tasks/version_bumping.feature +33 -0
- data/jeweler.gemspec +225 -0
- data/lib/jeweler.rb +39 -52
- data/lib/jeweler/commands.rb +2 -0
- data/lib/jeweler/commands/build_gem.rb +9 -0
- data/lib/jeweler/commands/check_dependencies.rb +52 -0
- data/lib/jeweler/commands/install_gem.rb +23 -2
- data/lib/jeweler/commands/release.rb +52 -12
- data/lib/jeweler/commands/release_to_rubyforge.rb +32 -9
- data/lib/jeweler/commands/setup_rubyforge.rb +57 -0
- data/lib/jeweler/commands/validate_gemspec.rb +9 -0
- data/lib/jeweler/commands/version/base.rb +13 -2
- data/lib/jeweler/commands/write_gemspec.rb +13 -0
- data/lib/jeweler/errors.rb +13 -1
- data/lib/jeweler/gemspec_helper.rb +31 -3
- data/lib/jeweler/generator.rb +80 -120
- data/lib/jeweler/generator/application.rb +12 -3
- data/lib/jeweler/generator/bacon_mixin.rb +43 -0
- data/lib/jeweler/generator/micronaut_mixin.rb +41 -0
- data/lib/jeweler/generator/minitest_mixin.rb +42 -0
- data/lib/jeweler/generator/options.rb +37 -3
- data/lib/jeweler/generator/rdoc_mixin.rb +9 -0
- data/lib/jeweler/generator/rspec_mixin.rb +42 -0
- data/lib/jeweler/generator/shoulda_mixin.rb +42 -0
- data/lib/jeweler/generator/testunit_mixin.rb +39 -0
- data/lib/jeweler/generator/yard_mixin.rb +14 -0
- data/lib/jeweler/rubyforge_tasks.rb +98 -0
- data/lib/jeweler/specification.rb +66 -0
- data/lib/jeweler/tasks.rb +72 -39
- data/lib/jeweler/templates/.document +5 -0
- data/lib/jeweler/templates/README.rdoc +12 -1
- data/lib/jeweler/templates/Rakefile +83 -49
- data/lib/jeweler/templates/bacon/helper.rb +1 -1
- data/lib/jeweler/templates/features/support/env.rb +4 -7
- data/lib/jeweler/templates/micronaut/helper.rb +1 -1
- data/lib/jeweler/templates/minitest/helper.rb +1 -1
- data/lib/jeweler/templates/rspec/flunking.rb +1 -1
- data/lib/jeweler/templates/rspec/helper.rb +4 -3
- data/lib/jeweler/templates/shoulda/helper.rb +1 -1
- data/lib/jeweler/templates/testunit/helper.rb +1 -1
- data/lib/jeweler/version_helper.rb +78 -33
- data/test/fixtures/bar/bin/foo_the_ultimate_bin +1 -0
- data/test/fixtures/bar/hey_include_me_in_gemspec +0 -0
- data/test/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -0
- data/test/fixtures/existing-project-with-version-plaintext/.document +5 -0
- data/test/fixtures/existing-project-with-version-plaintext/.gitignore +5 -0
- data/test/fixtures/existing-project-with-version-plaintext/LICENSE +20 -0
- data/test/fixtures/existing-project-with-version-plaintext/README.rdoc +7 -0
- data/test/fixtures/existing-project-with-version-plaintext/Rakefile +82 -0
- data/test/fixtures/existing-project-with-version-plaintext/VERSION +1 -0
- data/test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec +29 -0
- data/test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb +0 -0
- data/test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb +7 -0
- data/test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb +10 -0
- data/test/fixtures/existing-project-with-version-yaml/.document +5 -0
- data/test/fixtures/existing-project-with-version-yaml/.gitignore +5 -0
- data/test/fixtures/existing-project-with-version-yaml/LICENSE +20 -0
- data/test/fixtures/existing-project-with-version-yaml/README.rdoc +7 -0
- data/test/fixtures/existing-project-with-version-yaml/Rakefile +82 -0
- data/test/fixtures/existing-project-with-version-yaml/VERSION.yml +4 -0
- data/test/fixtures/existing-project-with-version-yaml/bin/foo_the_ultimate_bin +0 -0
- data/test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec +29 -0
- data/test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb +0 -0
- data/test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb +7 -0
- data/test/fixtures/existing-project-with-version-yaml/test/test_helper.rb +10 -0
- data/test/jeweler/commands/test_build_gem.rb +20 -1
- data/test/jeweler/commands/test_install_gem.rb +74 -0
- data/test/jeweler/commands/test_release.rb +289 -77
- data/test/jeweler/commands/test_release_to_rubyforge.rb +66 -50
- data/test/jeweler/commands/test_setup_rubyforge.rb +182 -0
- data/test/jeweler/commands/test_validate_gemspec.rb +27 -0
- data/test/jeweler/commands/test_write_gemspec.rb +34 -0
- data/test/jeweler/commands/version/test_base.rb +32 -0
- data/test/jeweler/commands/version/test_bump_major.rb +1 -0
- data/test/test_application.rb +31 -1
- data/test/test_gemspec_helper.rb +4 -0
- data/test/test_generator.rb +101 -114
- data/test/test_generator_initialization.rb +156 -0
- data/test/test_generator_mixins.rb +18 -0
- data/test/test_helper.rb +104 -16
- data/test/test_jeweler.rb +134 -96
- data/test/test_options.rb +59 -0
- data/test/test_specification.rb +61 -0
- data/test/test_tasks.rb +13 -18
- data/test/test_version_helper.rb +47 -9
- metadata +174 -43
- data/TODO +0 -11
- data/test/generators/initialization_test.rb +0 -146
@@ -0,0 +1,284 @@
|
|
1
|
+
Given /^I do not want cucumber stories$/ do
|
2
|
+
@use_cucumber = false
|
3
|
+
end
|
4
|
+
|
5
|
+
Given /^I want cucumber stories$/ do
|
6
|
+
@use_cucumber = true
|
7
|
+
end
|
8
|
+
|
9
|
+
Given /^I do not want reek$/ do
|
10
|
+
@use_reek = false
|
11
|
+
end
|
12
|
+
|
13
|
+
Given /^I want reek$/ do
|
14
|
+
@use_reek = true
|
15
|
+
end
|
16
|
+
|
17
|
+
Given /^I do not want roodi$/ do
|
18
|
+
@use_roodi = false
|
19
|
+
end
|
20
|
+
|
21
|
+
Given /^I want roodi$/ do
|
22
|
+
@use_roodi = true
|
23
|
+
end
|
24
|
+
|
25
|
+
And /^I do not want rubyforge setup$/ do
|
26
|
+
@use_rubyforge = false
|
27
|
+
end
|
28
|
+
|
29
|
+
And /^I want rubyforge setup$/ do
|
30
|
+
@use_rubyforge = true
|
31
|
+
end
|
32
|
+
|
33
|
+
Given /^I want to use yard instead of rdoc$/ do
|
34
|
+
@documentation_framework = "yard"
|
35
|
+
end
|
36
|
+
|
37
|
+
Given /^I want to use rdoc instead of yard$/ do
|
38
|
+
@documentation_framework = "rdoc"
|
39
|
+
end
|
40
|
+
|
41
|
+
|
42
|
+
Given /^I intend to test with (\w+)$/ do |testing_framework|
|
43
|
+
@testing_framework = testing_framework.to_sym
|
44
|
+
end
|
45
|
+
|
46
|
+
Given /^I have configured git sanely$/ do
|
47
|
+
@user_email = 'bar@example.com'
|
48
|
+
@user_name = 'foo'
|
49
|
+
@github_user = 'technicalpickles'
|
50
|
+
@github_token = 'zomgtoken'
|
51
|
+
|
52
|
+
Jeweler::Generator.any_instance.stubs(:read_git_config).
|
53
|
+
returns({
|
54
|
+
'user.name' => @user_name,
|
55
|
+
'user.email' => @user_email,
|
56
|
+
'github.user' => @github_user,
|
57
|
+
'github.token' => @github_token})
|
58
|
+
end
|
59
|
+
|
60
|
+
Given /^I set JEWELER_OPTS env variable to "(.*)"$/ do |val|
|
61
|
+
ENV['JEWELER_OPTS'] = val
|
62
|
+
end
|
63
|
+
|
64
|
+
When /^I generate a (.*)project named '((?:\w|-|_)+)' that is '([^']*)'$/ do |testing_framework, name, summary|
|
65
|
+
When "I generate a #{testing_framework}project named '#{name}' that is '#{summary}' and described as ''"
|
66
|
+
end
|
67
|
+
|
68
|
+
When /^I generate a (.*)project named '((?:\w|-|_)+)' that is '([^']*)' and described as '([^']*)'$/ do |testing_framework, name, summary, description|
|
69
|
+
@name = name
|
70
|
+
@summary = summary
|
71
|
+
@description = description
|
72
|
+
|
73
|
+
testing_framework = testing_framework.squeeze.strip
|
74
|
+
unless testing_framework.blank?
|
75
|
+
@testing_framework = testing_framework.to_sym
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
arguments = ['--directory',
|
80
|
+
"#{@working_dir}/#{@name}",
|
81
|
+
'--summary', @summary,
|
82
|
+
'--description', @description,
|
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
|
+
@documentation_framework ? "--#{@documentation_framework}" : nil,
|
89
|
+
@name].compact
|
90
|
+
|
91
|
+
@stdout = OutputCatcher.catch_out do
|
92
|
+
Jeweler::Generator::Application.run! *arguments
|
93
|
+
end
|
94
|
+
|
95
|
+
@repo = Git.open(File.join(@working_dir, @name))
|
96
|
+
end
|
97
|
+
|
98
|
+
Then /^a directory named '(.*)' is created$/ do |directory|
|
99
|
+
directory = File.join(@working_dir, directory)
|
100
|
+
|
101
|
+
assert File.exists?(directory), "#{directory} did not exist"
|
102
|
+
assert File.directory?(directory), "#{directory} is not a directory"
|
103
|
+
end
|
104
|
+
|
105
|
+
Then "cucumber directories are created" do
|
106
|
+
Then "a directory named 'the-perfect-gem/features' is created"
|
107
|
+
Then "a directory named 'the-perfect-gem/features/support' is created"
|
108
|
+
Then "a directory named 'the-perfect-gem/features/step_definitions' is created"
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
Then /^a file named '(.*)' is created$/ do |file|
|
113
|
+
file = File.join(@working_dir, file)
|
114
|
+
|
115
|
+
assert File.exists?(file), "#{file} expected to exist, but did not"
|
116
|
+
assert File.file?(file), "#{file} expected to be a file, but is not"
|
117
|
+
end
|
118
|
+
|
119
|
+
Then /^a file named '(.*)' is not created$/ do |file|
|
120
|
+
file = File.join(@working_dir, file)
|
121
|
+
|
122
|
+
assert ! File.exists?(file), "#{file} expected to not exist, but did"
|
123
|
+
end
|
124
|
+
|
125
|
+
Then /^a sane '.gitignore' is created$/ do
|
126
|
+
Then "a file named 'the-perfect-gem/.gitignore' is created"
|
127
|
+
Then "'coverage' is ignored by git"
|
128
|
+
Then "'*.sw?' is ignored by git"
|
129
|
+
Then "'.DS_Store' is ignored by git"
|
130
|
+
Then "'rdoc' is ignored by git"
|
131
|
+
Then "'pkg' is ignored by git"
|
132
|
+
end
|
133
|
+
|
134
|
+
Then /^'(.*)' is ignored by git$/ do |git_ignore|
|
135
|
+
@gitignore_content ||= File.read(File.join(@working_dir, @name, '.gitignore'))
|
136
|
+
|
137
|
+
assert_match git_ignore, @gitignore_content
|
138
|
+
end
|
139
|
+
|
140
|
+
Then /^Rakefile has '(.*)' for the (.*) (.*)$/ do |value, task_class, field|
|
141
|
+
@rakefile_content ||= File.read(File.join(@working_dir, @name, 'Rakefile'))
|
142
|
+
block_variable, task_block = yank_task_info(@rakefile_content, task_class)
|
143
|
+
#raise "Found in #{task_class}: #{block_variable.inspect}: #{task_block.inspect}"
|
144
|
+
|
145
|
+
assert_match /#{block_variable}\.#{field} = (%Q\{|"|')#{Regexp.escape(value)}(\}|"|')/, task_block
|
146
|
+
end
|
147
|
+
|
148
|
+
Then /^Rakefile has '(.*)' in the Rcov::RcovTask libs$/ do |libs|
|
149
|
+
@rakefile_content ||= File.read(File.join(@working_dir, @name, 'Rakefile'))
|
150
|
+
block_variable, task_block = yank_task_info(@rakefile_content, 'Rcov::RcovTask')
|
151
|
+
|
152
|
+
assert_match "#{block_variable}.libs << '#{libs}'", @rakefile_content
|
153
|
+
end
|
154
|
+
|
155
|
+
|
156
|
+
Then /^'(.*)' contains '(.*)'$/ do |file, expected_string|
|
157
|
+
contents = File.read(File.join(@working_dir, @name, file))
|
158
|
+
assert_match expected_string, contents
|
159
|
+
end
|
160
|
+
|
161
|
+
Then /^'(.*)' mentions copyright belonging to me in (\d{4})$/ do |file, year|
|
162
|
+
contents = File.read(File.join(@working_dir, @name, file))
|
163
|
+
assert_match "Copyright (c) #{year} #{@user_name}", contents
|
164
|
+
end
|
165
|
+
|
166
|
+
Then /^'(.*)' mentions copyright belonging to me in the current year$/ do |file|
|
167
|
+
current_year = Time.now.year
|
168
|
+
Then "'#{file}' mentions copyright belonging to me in #{current_year}"
|
169
|
+
end
|
170
|
+
|
171
|
+
|
172
|
+
Then /^LICENSE has the copyright as belonging to '(.*)' in '(\d{4})'$/ do |copyright_holder, year|
|
173
|
+
Then "a file named 'the-perfect-gem/LICENSE' is created"
|
174
|
+
|
175
|
+
@license_content ||= File.read(File.join(@working_dir, @name, 'LICENSE'))
|
176
|
+
|
177
|
+
assert_match copyright_holder, @license_content
|
178
|
+
|
179
|
+
assert_match year, @license_content
|
180
|
+
end
|
181
|
+
|
182
|
+
Then /^'(.*)' should define '(.*)' as a subclass of '(.*)'$/ do |file, class_name, superclass_name|
|
183
|
+
@test_content = File.read((File.join(@working_dir, @name, file)))
|
184
|
+
|
185
|
+
assert_match "class #{class_name} < #{superclass_name}", @test_content
|
186
|
+
end
|
187
|
+
|
188
|
+
Then /^'(.*)' should describe '(.*)'$/ do |file, describe_name|
|
189
|
+
@spec_content ||= File.read((File.join(@working_dir, @name, file)))
|
190
|
+
|
191
|
+
assert_match %Q{describe "#{describe_name}" do}, @spec_content
|
192
|
+
end
|
193
|
+
|
194
|
+
Then /^'(.*)' requires '(.*)'$/ do |file, lib|
|
195
|
+
content = File.read(File.join(@working_dir, @name, file))
|
196
|
+
|
197
|
+
assert_match /require ['"]#{Regexp.escape(lib)}['"]/, content
|
198
|
+
end
|
199
|
+
|
200
|
+
Then /^'(.*)' does not require '(.*)'$/ do |file, lib|
|
201
|
+
content = File.read(File.join(@working_dir, @name, file))
|
202
|
+
|
203
|
+
assert_no_match /require ['"]#{Regexp.escape(lib)}['"]/, content
|
204
|
+
end
|
205
|
+
|
206
|
+
Then /^Rakefile does not require '(.*)'$/ do |file|
|
207
|
+
Then "'Rakefile' does not require '#{file}'"
|
208
|
+
end
|
209
|
+
|
210
|
+
Then /^Rakefile requires '(.*)'$/ do |file|
|
211
|
+
Then "'Rakefile' requires '#{file}'"
|
212
|
+
end
|
213
|
+
|
214
|
+
Then /^Rakefile does not instantiate a (.*)$/ do |task_name|
|
215
|
+
content = File.read(File.join(@working_dir, @name, 'Rakefile'))
|
216
|
+
assert_no_match /#{task_name}/, content
|
217
|
+
end
|
218
|
+
|
219
|
+
Then /^Rakefile instantiates a (.*)$/ do |task_name|
|
220
|
+
content = File.read(File.join(@working_dir, @name, 'Rakefile'))
|
221
|
+
assert_match /#{task_name}/, content
|
222
|
+
end
|
223
|
+
|
224
|
+
|
225
|
+
Then /^'test\/test_helper\.rb' should autorun tests$/ do
|
226
|
+
content = File.read(File.join(@working_dir, @name, 'test/test_helper.rb'))
|
227
|
+
|
228
|
+
assert_match "Mini::Test.autorun", content
|
229
|
+
end
|
230
|
+
|
231
|
+
Then /^cucumber world extends "(.*)"$/ do |module_to_extend|
|
232
|
+
content = File.read(File.join(@working_dir, @name, 'features', 'support', 'env.rb'))
|
233
|
+
assert_match "World(#{module_to_extend})", content
|
234
|
+
end
|
235
|
+
|
236
|
+
|
237
|
+
Then /^'features\/support\/env\.rb' sets up features to use test\/unit assertions$/ do
|
238
|
+
|
239
|
+
end
|
240
|
+
|
241
|
+
Then /^'features\/support\/env\.rb' sets up features to use minitest assertions$/ do
|
242
|
+
content = File.read(File.join(@working_dir, @name, 'features', 'support', 'env.rb'))
|
243
|
+
|
244
|
+
assert_match "world.extend(Mini::Test::Assertions)", content
|
245
|
+
end
|
246
|
+
|
247
|
+
Then /^git repository has '(.*)' remote$/ do |remote|
|
248
|
+
remote = @repo.remotes.first
|
249
|
+
|
250
|
+
assert_equal 'origin', remote.name
|
251
|
+
end
|
252
|
+
|
253
|
+
Then /^git repository '(.*)' remote should be '(.*)'/ do |remote, remote_url|
|
254
|
+
remote = @repo.remotes.first
|
255
|
+
|
256
|
+
assert_equal 'git@github.com:technicalpickles/the-perfect-gem.git', remote.url
|
257
|
+
end
|
258
|
+
|
259
|
+
Then /^a commit with the message '(.*)' is made$/ do |message|
|
260
|
+
assert_match message, @repo.log.first.message
|
261
|
+
end
|
262
|
+
|
263
|
+
Then /^'(.*)' was checked in$/ do |file|
|
264
|
+
status = @repo.status[file]
|
265
|
+
|
266
|
+
assert_not_nil status, "wasn't able to get status for #{file}"
|
267
|
+
assert ! status.untracked, "#{file} was untracked"
|
268
|
+
assert_nil status.type, "#{file} had a type. it should have been nil"
|
269
|
+
end
|
270
|
+
|
271
|
+
Then /^no files are (\w+)$/ do |type|
|
272
|
+
assert_equal 0, @repo.status.send(type).size
|
273
|
+
end
|
274
|
+
|
275
|
+
Then /^Rakefile has "(.*)" as the default task$/ do |task|
|
276
|
+
@rakefile_content ||= File.read(File.join(@working_dir, @name, 'Rakefile'))
|
277
|
+
assert_match "task :default => :#{task}", @rakefile_content
|
278
|
+
end
|
279
|
+
|
280
|
+
|
281
|
+
After do
|
282
|
+
ENV['JEWELER_OPTS'] = nil
|
283
|
+
FileUtils.rm_rf @working_dir if @working_dir
|
284
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
2
|
+
require 'jeweler'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'mocha'
|
6
|
+
require 'output_catcher'
|
7
|
+
rescue LoadError => e
|
8
|
+
puts "*" * 80
|
9
|
+
puts "Some dependencies needed to run tests were missing. Run the following command to find them:"
|
10
|
+
puts
|
11
|
+
puts "\trake development_dependencies:check"
|
12
|
+
puts "*" * 80
|
13
|
+
exit 1
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
require 'test/unit/assertions'
|
18
|
+
|
19
|
+
World(Test::Unit::Assertions)
|
20
|
+
|
21
|
+
def yank_task_info(content, task)
|
22
|
+
if content =~ /#{Regexp.escape(task)}.new(\(.*\))? do \|(.*?)\|(.*?)end/m
|
23
|
+
[$2, $3]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def fixture_dir
|
28
|
+
File.expand_path File.join(File.dirname(__FILE__), '..', '..', 'test', 'fixtures')
|
29
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Feature: building gems
|
2
|
+
|
3
|
+
Scenario: default
|
4
|
+
Given a working directory
|
5
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
6
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
7
|
+
And "existing-project-with-version/pkg/existing-project-with-version-1.5.3.gem" does not exist
|
8
|
+
When I run "rake build" in "existing-project-with-version-yaml"
|
9
|
+
Then I can gem install "existing-project-with-version-yaml/pkg/existing-project-with-version-1.5.3.gem"
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Feature: version rake task
|
2
|
+
|
3
|
+
#Scenario: a newly created project without a version
|
4
|
+
# Given a working directory
|
5
|
+
# And I use the jeweler command to generate the "the-perfect-gem" project in the working directory
|
6
|
+
# And "the-perfect-gem/VERSION" does not exist
|
7
|
+
# When I run "rake version" in "the-perfect-gem"
|
8
|
+
# Then the process should not exit cleanly
|
9
|
+
|
10
|
+
Scenario: an existing project with version yaml
|
11
|
+
Given a working directory
|
12
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
13
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
14
|
+
When I run "rake version" in "existing-project-with-version-yaml"
|
15
|
+
Then the process should exit cleanly
|
16
|
+
And the current version, 1.5.3, is displayed
|
17
|
+
|
18
|
+
Scenario: an existing project with version plaintext
|
19
|
+
Given a working directory
|
20
|
+
And I use the existing project "existing-project-with-version-plaintext" as a template
|
21
|
+
And "VERSION" contains "1.5.3"
|
22
|
+
When I run "rake version" in "existing-project-with-version-plaintext"
|
23
|
+
Then the process should exit cleanly
|
24
|
+
And the current version, 1.5.3, is displayed
|
@@ -0,0 +1,33 @@
|
|
1
|
+
Feature: bumping version
|
2
|
+
|
3
|
+
Scenario: major version
|
4
|
+
Given a working directory
|
5
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
6
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
7
|
+
When I run "rake version:bump:major" in "existing-project-with-version-yaml"
|
8
|
+
Then the process should exit cleanly
|
9
|
+
And the updated version, 2.0.0, is displayed
|
10
|
+
|
11
|
+
Scenario: minor version
|
12
|
+
Given a working directory
|
13
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
14
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
15
|
+
When I run "rake version:bump:minor" in "existing-project-with-version-yaml"
|
16
|
+
Then the process should exit cleanly
|
17
|
+
And the updated version, 1.6.0, is displayed
|
18
|
+
|
19
|
+
Scenario: patch version
|
20
|
+
Given a working directory
|
21
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
22
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
23
|
+
When I run "rake version:bump:patch" in "existing-project-with-version-yaml"
|
24
|
+
Then the process should exit cleanly
|
25
|
+
And the updated version, 1.5.4, is displayed
|
26
|
+
|
27
|
+
Scenario: arbitrary version
|
28
|
+
Given a working directory
|
29
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
30
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
31
|
+
When I run "rake version:write MAJOR=3 MINOR=7 PATCH=1" in "existing-project-with-version-yaml"
|
32
|
+
Then the process should exit cleanly
|
33
|
+
And the updated version, 3.7.1, is displayed
|
data/jeweler.gemspec
ADDED
@@ -0,0 +1,225 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{jeweler}
|
8
|
+
s.version = "1.2.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Josh Nichols"]
|
12
|
+
s.date = %q{2009-08-06}
|
13
|
+
s.default_executable = %q{jeweler}
|
14
|
+
s.description = %q{Simple and opinionated helper for creating Rubygem projects on GitHub}
|
15
|
+
s.email = %q{josh@technicalpickles.com}
|
16
|
+
s.executables = ["jeweler"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"ChangeLog.markdown",
|
19
|
+
"LICENSE",
|
20
|
+
"README.markdown"
|
21
|
+
]
|
22
|
+
s.files = [
|
23
|
+
".gitignore",
|
24
|
+
"ChangeLog.markdown",
|
25
|
+
"LICENSE",
|
26
|
+
"README.markdown",
|
27
|
+
"ROADMAP",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION.yml",
|
30
|
+
"bin/jeweler",
|
31
|
+
"features/generator/cucumber.feature",
|
32
|
+
"features/generator/directory_layout.feature",
|
33
|
+
"features/generator/dotdocument.feature",
|
34
|
+
"features/generator/env_options.feature",
|
35
|
+
"features/generator/git.feature",
|
36
|
+
"features/generator/license.feature",
|
37
|
+
"features/generator/rakefile.feature",
|
38
|
+
"features/generator/readme.feature",
|
39
|
+
"features/generator/test.feature",
|
40
|
+
"features/generator/test_helper.feature",
|
41
|
+
"features/placeholder.feature",
|
42
|
+
"features/step_definitions/debug_steps.rb",
|
43
|
+
"features/step_definitions/filesystem_steps.rb",
|
44
|
+
"features/step_definitions/generator_steps.rb",
|
45
|
+
"features/step_definitions/task_steps.rb",
|
46
|
+
"features/support/env.rb",
|
47
|
+
"features/tasks/build_gem.feature",
|
48
|
+
"features/tasks/version.feature",
|
49
|
+
"features/tasks/version_bumping.feature",
|
50
|
+
"jeweler.gemspec",
|
51
|
+
"lib/jeweler.rb",
|
52
|
+
"lib/jeweler/commands.rb",
|
53
|
+
"lib/jeweler/commands/build_gem.rb",
|
54
|
+
"lib/jeweler/commands/check_dependencies.rb",
|
55
|
+
"lib/jeweler/commands/install_gem.rb",
|
56
|
+
"lib/jeweler/commands/release.rb",
|
57
|
+
"lib/jeweler/commands/release_to_rubyforge.rb",
|
58
|
+
"lib/jeweler/commands/setup_rubyforge.rb",
|
59
|
+
"lib/jeweler/commands/validate_gemspec.rb",
|
60
|
+
"lib/jeweler/commands/version/base.rb",
|
61
|
+
"lib/jeweler/commands/version/bump_major.rb",
|
62
|
+
"lib/jeweler/commands/version/bump_minor.rb",
|
63
|
+
"lib/jeweler/commands/version/bump_patch.rb",
|
64
|
+
"lib/jeweler/commands/version/write.rb",
|
65
|
+
"lib/jeweler/commands/write_gemspec.rb",
|
66
|
+
"lib/jeweler/errors.rb",
|
67
|
+
"lib/jeweler/gemspec_helper.rb",
|
68
|
+
"lib/jeweler/generator.rb",
|
69
|
+
"lib/jeweler/generator/application.rb",
|
70
|
+
"lib/jeweler/generator/bacon_mixin.rb",
|
71
|
+
"lib/jeweler/generator/micronaut_mixin.rb",
|
72
|
+
"lib/jeweler/generator/minitest_mixin.rb",
|
73
|
+
"lib/jeweler/generator/options.rb",
|
74
|
+
"lib/jeweler/generator/rdoc_mixin.rb",
|
75
|
+
"lib/jeweler/generator/rspec_mixin.rb",
|
76
|
+
"lib/jeweler/generator/shoulda_mixin.rb",
|
77
|
+
"lib/jeweler/generator/testunit_mixin.rb",
|
78
|
+
"lib/jeweler/generator/yard_mixin.rb",
|
79
|
+
"lib/jeweler/rubyforge_tasks.rb",
|
80
|
+
"lib/jeweler/specification.rb",
|
81
|
+
"lib/jeweler/tasks.rb",
|
82
|
+
"lib/jeweler/templates/.document",
|
83
|
+
"lib/jeweler/templates/.document",
|
84
|
+
"lib/jeweler/templates/.gitignore",
|
85
|
+
"lib/jeweler/templates/.gitignore",
|
86
|
+
"lib/jeweler/templates/LICENSE",
|
87
|
+
"lib/jeweler/templates/README.rdoc",
|
88
|
+
"lib/jeweler/templates/Rakefile",
|
89
|
+
"lib/jeweler/templates/bacon/flunking.rb",
|
90
|
+
"lib/jeweler/templates/bacon/helper.rb",
|
91
|
+
"lib/jeweler/templates/features/default.feature",
|
92
|
+
"lib/jeweler/templates/features/support/env.rb",
|
93
|
+
"lib/jeweler/templates/micronaut/flunking.rb",
|
94
|
+
"lib/jeweler/templates/micronaut/helper.rb",
|
95
|
+
"lib/jeweler/templates/minitest/flunking.rb",
|
96
|
+
"lib/jeweler/templates/minitest/helper.rb",
|
97
|
+
"lib/jeweler/templates/rspec/flunking.rb",
|
98
|
+
"lib/jeweler/templates/rspec/helper.rb",
|
99
|
+
"lib/jeweler/templates/shoulda/flunking.rb",
|
100
|
+
"lib/jeweler/templates/shoulda/helper.rb",
|
101
|
+
"lib/jeweler/templates/testunit/flunking.rb",
|
102
|
+
"lib/jeweler/templates/testunit/helper.rb",
|
103
|
+
"lib/jeweler/version_helper.rb",
|
104
|
+
"test/fixtures/bar/VERSION.yml",
|
105
|
+
"test/fixtures/bar/bin/foo_the_ultimate_bin",
|
106
|
+
"test/fixtures/bar/hey_include_me_in_gemspec",
|
107
|
+
"test/fixtures/bar/lib/foo_the_ultimate_lib.rb",
|
108
|
+
"test/fixtures/existing-project-with-version-plaintext/.document",
|
109
|
+
"test/fixtures/existing-project-with-version-plaintext/.gitignore",
|
110
|
+
"test/fixtures/existing-project-with-version-plaintext/LICENSE",
|
111
|
+
"test/fixtures/existing-project-with-version-plaintext/README.rdoc",
|
112
|
+
"test/fixtures/existing-project-with-version-plaintext/Rakefile",
|
113
|
+
"test/fixtures/existing-project-with-version-plaintext/VERSION",
|
114
|
+
"test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec",
|
115
|
+
"test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb",
|
116
|
+
"test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb",
|
117
|
+
"test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb",
|
118
|
+
"test/fixtures/existing-project-with-version-yaml/.document",
|
119
|
+
"test/fixtures/existing-project-with-version-yaml/.gitignore",
|
120
|
+
"test/fixtures/existing-project-with-version-yaml/LICENSE",
|
121
|
+
"test/fixtures/existing-project-with-version-yaml/README.rdoc",
|
122
|
+
"test/fixtures/existing-project-with-version-yaml/Rakefile",
|
123
|
+
"test/fixtures/existing-project-with-version-yaml/VERSION.yml",
|
124
|
+
"test/fixtures/existing-project-with-version-yaml/bin/foo_the_ultimate_bin",
|
125
|
+
"test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec",
|
126
|
+
"test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb",
|
127
|
+
"test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb",
|
128
|
+
"test/fixtures/existing-project-with-version-yaml/test/test_helper.rb",
|
129
|
+
"test/geminstaller.yml",
|
130
|
+
"test/jeweler/commands/test_build_gem.rb",
|
131
|
+
"test/jeweler/commands/test_install_gem.rb",
|
132
|
+
"test/jeweler/commands/test_release.rb",
|
133
|
+
"test/jeweler/commands/test_release_to_rubyforge.rb",
|
134
|
+
"test/jeweler/commands/test_setup_rubyforge.rb",
|
135
|
+
"test/jeweler/commands/test_validate_gemspec.rb",
|
136
|
+
"test/jeweler/commands/test_write_gemspec.rb",
|
137
|
+
"test/jeweler/commands/version/test_base.rb",
|
138
|
+
"test/jeweler/commands/version/test_bump_major.rb",
|
139
|
+
"test/jeweler/commands/version/test_bump_minor.rb",
|
140
|
+
"test/jeweler/commands/version/test_bump_patch.rb",
|
141
|
+
"test/jeweler/commands/version/test_write.rb",
|
142
|
+
"test/shoulda_macros/jeweler_macros.rb",
|
143
|
+
"test/test_application.rb",
|
144
|
+
"test/test_gemspec_helper.rb",
|
145
|
+
"test/test_generator.rb",
|
146
|
+
"test/test_generator_initialization.rb",
|
147
|
+
"test/test_generator_mixins.rb",
|
148
|
+
"test/test_helper.rb",
|
149
|
+
"test/test_jeweler.rb",
|
150
|
+
"test/test_options.rb",
|
151
|
+
"test/test_specification.rb",
|
152
|
+
"test/test_tasks.rb",
|
153
|
+
"test/test_version_helper.rb"
|
154
|
+
]
|
155
|
+
s.homepage = %q{http://github.com/technicalpickles/jeweler}
|
156
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
157
|
+
s.require_paths = ["lib"]
|
158
|
+
s.rubyforge_project = %q{pickles}
|
159
|
+
s.rubygems_version = %q{1.3.5}
|
160
|
+
s.summary = %q{Simple and opinionated helper for creating Rubygem projects on GitHub}
|
161
|
+
s.test_files = [
|
162
|
+
"test/fixtures/bar/lib/foo_the_ultimate_lib.rb",
|
163
|
+
"test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb",
|
164
|
+
"test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb",
|
165
|
+
"test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb",
|
166
|
+
"test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb",
|
167
|
+
"test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb",
|
168
|
+
"test/fixtures/existing-project-with-version-yaml/test/test_helper.rb",
|
169
|
+
"test/jeweler/commands/test_build_gem.rb",
|
170
|
+
"test/jeweler/commands/test_install_gem.rb",
|
171
|
+
"test/jeweler/commands/test_release.rb",
|
172
|
+
"test/jeweler/commands/test_release_to_rubyforge.rb",
|
173
|
+
"test/jeweler/commands/test_setup_rubyforge.rb",
|
174
|
+
"test/jeweler/commands/test_validate_gemspec.rb",
|
175
|
+
"test/jeweler/commands/test_write_gemspec.rb",
|
176
|
+
"test/jeweler/commands/version/test_base.rb",
|
177
|
+
"test/jeweler/commands/version/test_bump_major.rb",
|
178
|
+
"test/jeweler/commands/version/test_bump_minor.rb",
|
179
|
+
"test/jeweler/commands/version/test_bump_patch.rb",
|
180
|
+
"test/jeweler/commands/version/test_write.rb",
|
181
|
+
"test/shoulda_macros/jeweler_macros.rb",
|
182
|
+
"test/test_application.rb",
|
183
|
+
"test/test_gemspec_helper.rb",
|
184
|
+
"test/test_generator.rb",
|
185
|
+
"test/test_generator_initialization.rb",
|
186
|
+
"test/test_generator_mixins.rb",
|
187
|
+
"test/test_helper.rb",
|
188
|
+
"test/test_jeweler.rb",
|
189
|
+
"test/test_options.rb",
|
190
|
+
"test/test_specification.rb",
|
191
|
+
"test/test_tasks.rb",
|
192
|
+
"test/test_version_helper.rb"
|
193
|
+
]
|
194
|
+
|
195
|
+
if s.respond_to? :specification_version then
|
196
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
197
|
+
s.specification_version = 3
|
198
|
+
|
199
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
200
|
+
s.add_runtime_dependency(%q<git>, [">= 1.2.1"])
|
201
|
+
s.add_runtime_dependency(%q<rubyforge>, [">= 0"])
|
202
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
203
|
+
s.add_development_dependency(%q<mhennemeyer-output_catcher>, [">= 0"])
|
204
|
+
s.add_development_dependency(%q<rr>, [">= 0"])
|
205
|
+
s.add_development_dependency(%q<mocha>, [">= 0"])
|
206
|
+
s.add_development_dependency(%q<redgreen>, [">= 0"])
|
207
|
+
else
|
208
|
+
s.add_dependency(%q<git>, [">= 1.2.1"])
|
209
|
+
s.add_dependency(%q<rubyforge>, [">= 0"])
|
210
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
211
|
+
s.add_dependency(%q<mhennemeyer-output_catcher>, [">= 0"])
|
212
|
+
s.add_dependency(%q<rr>, [">= 0"])
|
213
|
+
s.add_dependency(%q<mocha>, [">= 0"])
|
214
|
+
s.add_dependency(%q<redgreen>, [">= 0"])
|
215
|
+
end
|
216
|
+
else
|
217
|
+
s.add_dependency(%q<git>, [">= 1.2.1"])
|
218
|
+
s.add_dependency(%q<rubyforge>, [">= 0"])
|
219
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
220
|
+
s.add_dependency(%q<mhennemeyer-output_catcher>, [">= 0"])
|
221
|
+
s.add_dependency(%q<rr>, [">= 0"])
|
222
|
+
s.add_dependency(%q<mocha>, [">= 0"])
|
223
|
+
s.add_dependency(%q<redgreen>, [">= 0"])
|
224
|
+
end
|
225
|
+
end
|