jeweler 1.7.0 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ --exclude /templates/
2
+ lib/**/*.rb
@@ -1,3 +1,10 @@
1
+ # jeweler 1.8.0, 2012-01-23
2
+
3
+ * Generator now has a --version flag #217
4
+ * Generated Gemfile now includes rdoc gem when using rdoc
5
+ * Fixed jeweler's yardoc task #216
6
+ * Updated version of yard used for new projects, and include rdoc compatability
7
+
1
8
  # jeweler 1.7.0, 2012-01-23
2
9
 
3
10
  * Better grammars in README!
data/Gemfile CHANGED
@@ -13,7 +13,8 @@ group :development do
13
13
  gem "mocha"
14
14
  gem "redgreen"
15
15
  gem "test-construct"
16
- gem "yard", "~> 0.6.0"
16
+ gem "yard", "~> 0.6"
17
+ gem "rdoc"
17
18
  gem "bluecloth"
18
19
  gem "cucumber", "~> 1.1.4"
19
20
  gem "rcov"
@@ -36,7 +36,7 @@ GEM
36
36
  term-ansicolor (1.0.7)
37
37
  test-construct (1.2.0)
38
38
  timecop (0.3.5)
39
- yard (0.6.1)
39
+ yard (0.7.4)
40
40
 
41
41
  PLATFORMS
42
42
  ruby
@@ -58,4 +58,4 @@ DEPENDENCIES
58
58
  shoulda
59
59
  test-construct
60
60
  timecop
61
- yard (~> 0.6.0)
61
+ yard (~> 0.6)
@@ -24,6 +24,8 @@ Feature: generated Gemfiel
24
24
  And 'Gemfile' has a development dependency on 'bundler'
25
25
  And 'Gemfile' has a development dependency on the current version of jeweler
26
26
  And 'Gemfile' has a development dependency on 'rcov'
27
+ And 'Gemfile' has a development dependency on 'rdoc'
28
+ And 'Gemfile' does not have a development dependency on 'yard'
27
29
 
28
30
  Scenario: bacon
29
31
  When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
@@ -61,10 +63,17 @@ Feature: generated Gemfiel
61
63
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
62
64
  Then 'Gemfile' has a development dependency on 'roodi'
63
65
 
66
+ Scenario: rdoc
67
+ Given I want to use rdoc instead of yard
68
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
69
+ Then 'Gemfile' has a development dependency on 'rdoc'
70
+ And 'Gemfile' does not have a development dependency on 'yard'
71
+
64
72
  Scenario: yard
65
73
  Given I want to use yard instead of rdoc
66
74
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
67
75
  Then 'Gemfile' has a development dependency on 'yard'
76
+ Then 'Gemfile' has a development dependency on 'rdoc'
68
77
 
69
78
  Scenario: shindo
70
79
  When I generate a shindo project named 'the-perfect-gem' that is 'zomg, so good'
@@ -347,6 +347,14 @@ Then /^'Gemfile' has a (\w+) dependency on '(.*)'$/ do |group, name|
347
347
  assert_match name, group_block
348
348
  end
349
349
 
350
+ Then /^'Gemfile' does not have a (\w+) dependency on '(.*)'$/ do |group, name|
351
+ @gemfile_content ||= File.read(File.join(@working_dir, @name, 'Gemfile'))
352
+
353
+ group_block = yank_group_info(@gemfile_content, group)
354
+
355
+ assert_no_match Regexp.new(Regexp.escape(name)), group_block
356
+ end
357
+
350
358
  Then /^'Gemfile' has a development dependency on the current version of jeweler$/ do
351
359
  @gemfile_content ||= File.read(File.join(@working_dir, @name, 'Gemfile'))
352
360
  group_block = yank_group_info(@gemfile_content, 'development')
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "jeweler"
8
- s.version = "1.7.0"
8
+ s.version = "1.8.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Josh Nichols"]
12
- s.date = "2012-01-23"
12
+ s.date = "2012-01-24"
13
13
  s.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
14
14
  s.email = "josh@technicalpickles.com"
15
15
  s.executables = ["jeweler"]
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  ]
21
21
  s.files = [
22
22
  ".document",
23
+ ".yardopts",
23
24
  "ChangeLog.markdown",
24
25
  "Gemfile",
25
26
  "Gemfile.lock",
@@ -198,7 +199,8 @@ Gem::Specification.new do |s|
198
199
  s.add_development_dependency(%q<mocha>, [">= 0"])
199
200
  s.add_development_dependency(%q<redgreen>, [">= 0"])
200
201
  s.add_development_dependency(%q<test-construct>, [">= 0"])
201
- s.add_development_dependency(%q<yard>, ["~> 0.6.0"])
202
+ s.add_development_dependency(%q<yard>, ["~> 0.6"])
203
+ s.add_development_dependency(%q<rdoc>, [">= 0"])
202
204
  s.add_development_dependency(%q<bluecloth>, [">= 0"])
203
205
  s.add_development_dependency(%q<cucumber>, ["~> 1.1.4"])
204
206
  s.add_development_dependency(%q<rcov>, [">= 0"])
@@ -216,7 +218,8 @@ Gem::Specification.new do |s|
216
218
  s.add_dependency(%q<mocha>, [">= 0"])
217
219
  s.add_dependency(%q<redgreen>, [">= 0"])
218
220
  s.add_dependency(%q<test-construct>, [">= 0"])
219
- s.add_dependency(%q<yard>, ["~> 0.6.0"])
221
+ s.add_dependency(%q<yard>, ["~> 0.6"])
222
+ s.add_dependency(%q<rdoc>, [">= 0"])
220
223
  s.add_dependency(%q<bluecloth>, [">= 0"])
221
224
  s.add_dependency(%q<cucumber>, ["~> 1.1.4"])
222
225
  s.add_dependency(%q<rcov>, [">= 0"])
@@ -235,7 +238,8 @@ Gem::Specification.new do |s|
235
238
  s.add_dependency(%q<mocha>, [">= 0"])
236
239
  s.add_dependency(%q<redgreen>, [">= 0"])
237
240
  s.add_dependency(%q<test-construct>, [">= 0"])
238
- s.add_dependency(%q<yard>, ["~> 0.6.0"])
241
+ s.add_dependency(%q<yard>, ["~> 0.6"])
242
+ s.add_dependency(%q<rdoc>, [">= 0"])
239
243
  s.add_dependency(%q<bluecloth>, [">= 0"])
240
244
  s.add_dependency(%q<cucumber>, ["~> 1.1.4"])
241
245
  s.add_dependency(%q<rcov>, [">= 0"])
@@ -14,6 +14,11 @@ class Jeweler
14
14
  options[:show_help] = true
15
15
  end
16
16
 
17
+ if options[:show_version]
18
+ $stderr.puts "Version: #{Jeweler::Version::STRING}"
19
+ return 1
20
+ end
21
+
17
22
  if options[:show_help]
18
23
  $stderr.puts options.opts
19
24
  return 1
@@ -140,6 +140,10 @@ class Jeweler
140
140
  o.on('--rdoc', 'use rdoc for documentation') do
141
141
  self[:documentation_framework] = :rdoc
142
142
  end
143
+
144
+ o.on('-v', '--version', 'show version') do
145
+ self[:show_version] = true
146
+ end
143
147
 
144
148
  o.on_tail('-h', '--help', 'display this help and exit') do
145
149
  self[:show_help] = true
@@ -1,6 +1,10 @@
1
1
  class Jeweler
2
2
  class Generator
3
3
  module RdocMixin
4
+ def self.extended(generator)
5
+ generator.development_dependencies << ["rdoc", "~> 3.12"]
6
+ end
7
+
4
8
  def doc_task
5
9
  'rdoc'
6
10
  end
@@ -2,7 +2,8 @@ class Jeweler
2
2
  class Generator
3
3
  module YardMixin
4
4
  def self.extended(generator)
5
- generator.development_dependencies << ["yard", "~> 0.6.0"]
5
+ generator.development_dependencies << ["yard", "~> 0.7"]
6
+ generator.development_dependencies << ["rdoc", "~> 3.12"]
6
7
  end
7
8
 
8
9
  def doc_task
@@ -1,7 +1,7 @@
1
1
  class Jeweler
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 7
4
+ MINOR = 8
5
5
  PATCH = 0
6
6
  BUILD = nil
7
7
 
@@ -37,6 +37,28 @@ class TestApplication < Test::Unit::TestCase
37
37
  end
38
38
  end
39
39
 
40
+
41
+ context "when options indicate version" do
42
+ setup do
43
+ stub(Jeweler::Generator::Application).build_opts do
44
+ stub_options(:show_version => true)
45
+ end
46
+
47
+ stub(Jeweler::Generator).new { raise "Shouldn't have made this far"}
48
+
49
+ assert_nothing_raised do
50
+ @result = run_application("-v")
51
+ end
52
+ end
53
+
54
+ should_exit_with_code 1
55
+
56
+ should 'should puts option version' do
57
+ assert_match 'Version:', @stderr
58
+ end
59
+ end
60
+
61
+
40
62
  context "when options indicate help usage" do
41
63
  setup do
42
64
  stub(Jeweler::Generator::Application).build_opts do
@@ -141,6 +141,18 @@ class TestOptions < Test::Unit::TestCase
141
141
  assert_equal 'foo', @options[:directory]
142
142
  end
143
143
  end
144
+
145
+ for_options '--version' do
146
+ should 'show version' do
147
+ assert @options[:show_version]
148
+ end
149
+ end
150
+
151
+ for_options '-v' do
152
+ should 'show version' do
153
+ assert @options[:show_version]
154
+ end
155
+ end
144
156
 
145
157
  for_options '--help' do
146
158
  should 'show help' do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jeweler
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 7
8
+ - 8
9
9
  - 0
10
- version: 1.7.0
10
+ version: 1.8.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Nichols
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-23 00:00:00 Z
18
+ date: 2012-01-24 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement
@@ -170,8 +170,7 @@ dependencies:
170
170
  segments:
171
171
  - 0
172
172
  - 6
173
- - 0
174
- version: 0.6.0
173
+ version: "0.6"
175
174
  requirement: *id011
176
175
  prerelease: false
177
176
  name: yard
@@ -188,10 +187,24 @@ dependencies:
188
187
  version: "0"
189
188
  requirement: *id012
190
189
  prerelease: false
191
- name: bluecloth
190
+ name: rdoc
192
191
  type: :development
193
192
  - !ruby/object:Gem::Dependency
194
193
  version_requirements: &id013 !ruby/object:Gem::Requirement
194
+ none: false
195
+ requirements:
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ hash: 3
199
+ segments:
200
+ - 0
201
+ version: "0"
202
+ requirement: *id013
203
+ prerelease: false
204
+ name: bluecloth
205
+ type: :development
206
+ - !ruby/object:Gem::Dependency
207
+ version_requirements: &id014 !ruby/object:Gem::Requirement
195
208
  none: false
196
209
  requirements:
197
210
  - - ~>
@@ -202,12 +215,12 @@ dependencies:
202
215
  - 1
203
216
  - 4
204
217
  version: 1.1.4
205
- requirement: *id013
218
+ requirement: *id014
206
219
  prerelease: false
207
220
  name: cucumber
208
221
  type: :development
209
222
  - !ruby/object:Gem::Dependency
210
- version_requirements: &id014 !ruby/object:Gem::Requirement
223
+ version_requirements: &id015 !ruby/object:Gem::Requirement
211
224
  none: false
212
225
  requirements:
213
226
  - - ">="
@@ -216,12 +229,12 @@ dependencies:
216
229
  segments:
217
230
  - 0
218
231
  version: "0"
219
- requirement: *id014
232
+ requirement: *id015
220
233
  prerelease: false
221
234
  name: rcov
222
235
  type: :development
223
236
  - !ruby/object:Gem::Dependency
224
- version_requirements: &id015 !ruby/object:Gem::Requirement
237
+ version_requirements: &id016 !ruby/object:Gem::Requirement
225
238
  none: false
226
239
  requirements:
227
240
  - - ">="
@@ -230,12 +243,12 @@ dependencies:
230
243
  segments:
231
244
  - 0
232
245
  version: "0"
233
- requirement: *id015
246
+ requirement: *id016
234
247
  prerelease: false
235
248
  name: timecop
236
249
  type: :development
237
250
  - !ruby/object:Gem::Dependency
238
- version_requirements: &id016 !ruby/object:Gem::Requirement
251
+ version_requirements: &id017 !ruby/object:Gem::Requirement
239
252
  none: false
240
253
  requirements:
241
254
  - - ~>
@@ -246,12 +259,12 @@ dependencies:
246
259
  - 3
247
260
  - 5
248
261
  version: 2.3.5
249
- requirement: *id016
262
+ requirement: *id017
250
263
  prerelease: false
251
264
  name: activesupport
252
265
  type: :development
253
266
  - !ruby/object:Gem::Dependency
254
- version_requirements: &id017 !ruby/object:Gem::Requirement
267
+ version_requirements: &id018 !ruby/object:Gem::Requirement
255
268
  none: false
256
269
  requirements:
257
270
  - - ">="
@@ -260,7 +273,7 @@ dependencies:
260
273
  segments:
261
274
  - 0
262
275
  version: "0"
263
- requirement: *id017
276
+ requirement: *id018
264
277
  prerelease: false
265
278
  name: ruby-debug
266
279
  type: :development
@@ -276,6 +289,7 @@ extra_rdoc_files:
276
289
  - README.markdown
277
290
  files:
278
291
  - .document
292
+ - .yardopts
279
293
  - ChangeLog.markdown
280
294
  - Gemfile
281
295
  - Gemfile.lock