jeweler 1.6.3 → 1.6.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,12 @@
1
+ # jeweler 1.6.4, 2011-07-07
2
+
3
+ * Generator can now take an path to generate into, rather than just the name of the directory, ie `jeweler /path/to/awesomeness', not `jeweler --directory /path/to awesomeness`. Thanks invadersmustdie! #187
4
+ * Generator's --directory is deprecated and will be removed for 2.0.0
5
+
1
6
  # jeweler 1.6.3
2
7
 
3
- * Fix typo in Rake tasks
4
- * Fix deprecation warnings for `Gem.activate`
8
+ * Fix typo in Rake tasks, thanks yehezkielbs! #193
9
+ * Fix deprecation warnings for `Gem.activate`, thanks tickmichaeledgar! #191
5
10
 
6
11
  # jeweler 1.6.2
7
12
 
@@ -86,9 +86,7 @@ When /^I generate a (.*)project named '((?:\w|-|_)+)' that is '([^']*)' and desc
86
86
  end
87
87
 
88
88
 
89
- arguments = ['--directory',
90
- "#{@working_dir}/#{@name}",
91
- '--summary', @summary,
89
+ arguments = [ '--summary', @summary,
92
90
  '--description', @description,
93
91
  @use_cucumber ? '--cucumber' : nil,
94
92
  @testing_framework ? "--#{@testing_framework}" : nil,
@@ -101,7 +99,7 @@ When /^I generate a (.*)project named '((?:\w|-|_)+)' that is '([^']*)' and desc
101
99
  else nil
102
100
  end,
103
101
  @documentation_framework ? "--#{@documentation_framework}" : nil,
104
- @name].compact
102
+ "#{@working_dir}/#{@name}"].compact
105
103
 
106
104
 
107
105
  @stdout = OutputCatcher.catch_out do
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{jeweler}
8
- s.version = "1.6.3"
8
+ s.version = "1.6.4"
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 = %q{2011-07-01}
12
+ s.date = %q{2011-07-07}
13
13
  s.default_executable = %q{jeweler}
14
14
  s.description = %q{Simple and opinionated helper for creating Rubygem projects on GitHub}
15
15
  s.email = %q{josh@technicalpickles.com}
@@ -182,11 +182,10 @@ Gem::Specification.new do |s|
182
182
  s.homepage = %q{http://github.com/technicalpickles/jeweler}
183
183
  s.licenses = ["MIT"]
184
184
  s.require_paths = ["lib"]
185
- s.rubygems_version = %q{1.3.7}
185
+ s.rubygems_version = %q{1.4.2}
186
186
  s.summary = %q{Opinionated tool for creating and managing RubyGem projects}
187
187
 
188
188
  if s.respond_to? :specification_version then
189
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
190
189
  s.specification_version = 3
191
190
 
192
191
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -57,10 +57,18 @@ class Jeweler
57
57
 
58
58
  def initialize(options = {})
59
59
  self.options = options
60
+ extracted_directory = nil
60
61
 
61
62
  self.project_name = options[:project_name]
62
63
  if self.project_name.nil? || self.project_name.squeeze.strip == ""
63
64
  raise NoGitHubRepoNameGiven
65
+ else
66
+ path = File.split(self.project_name)
67
+
68
+ if path.size > 1
69
+ extracted_directory = File.join(path[0..-1])
70
+ self.project_name = path.last
71
+ end
64
72
  end
65
73
 
66
74
  self.development_dependencies = []
@@ -82,7 +90,7 @@ class Jeweler
82
90
  raise ArgumentError, "Unsupported documentation framework (#{documentation_framework})"
83
91
  end
84
92
 
85
- self.target_dir = options[:directory] || self.project_name
93
+ self.target_dir = options[:directory] || extracted_directory || self.project_name
86
94
 
87
95
  self.summary = options[:summary] || 'TODO: one-line summary of your gem'
88
96
  self.description = options[:description] || 'TODO: longer description of your gem'
@@ -25,7 +25,8 @@ class Jeweler
25
25
  @opts = OptionParser.new do |o|
26
26
  o.banner = "Usage: #{File.basename($0)} [options] reponame\ne.g. #{File.basename($0)} the-perfect-gem"
27
27
 
28
- o.on('--directory [DIRECTORY]', 'specify the directory to generate into') do |directory|
28
+ o.on('--directory [DIRECTORY]', 'specify the directory to generate into (deprecated)') do |directory|
29
+ warn "--directory is deprecated and will be removed in 2.0.0. Please specify an absolute path to a directoy as the last argument instead" # DEPRECATE
29
30
  self[:directory] = directory
30
31
  end
31
32
 
@@ -2,7 +2,7 @@ class Jeweler
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 6
5
- PATCH = 3
5
+ PATCH = 4
6
6
  BUILD = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
@@ -2,12 +2,14 @@ require 'test_helper'
2
2
 
3
3
  class TestGenerator < Test::Unit::TestCase
4
4
  def build_generator(testing_framework = :shoulda, options = {})
5
- options = options.merge :project_name => 'the-perfect-gem',
6
- :user_name => 'John Doe',
7
- :user_email => 'john@example.com',
8
- :github_username => 'johndoe',
9
- :github_token => 'yyz',
10
- :documentation_framework => :rdoc
5
+ options = {
6
+ :project_name => 'the-perfect-gem',
7
+ :user_name => 'John Doe',
8
+ :user_email => 'john@example.com',
9
+ :github_username => 'johndoe',
10
+ :github_token => 'yyz',
11
+ :documentation_framework => :rdoc
12
+ }.merge(options)
11
13
 
12
14
  options[:testing_framework] = testing_framework
13
15
  Jeweler::Generator.new(options)
@@ -34,6 +36,18 @@ class TestGenerator < Test::Unit::TestCase
34
36
  assert_equal 'git@github.com:johndoe/the-perfect-gem.git', build_generator.git_remote
35
37
  end
36
38
 
39
+ should "extract project name from absolut path" do
40
+ assert_equal "my-project", build_generator(:shoulda, {:project_name => "/tmp/my-project"}).project_name
41
+ end
42
+
43
+ should "extract project name from relative path" do
44
+ assert_equal "my-project", build_generator(:shoulda, {:project_name => "../my-project"}).project_name
45
+ end
46
+
47
+ should "extract project name from direct path" do
48
+ assert_equal "my-project", build_generator(:shoulda, {:project_name => "my-project"}).project_name
49
+ end
50
+
37
51
  def self.should_have_generator_attribute(attribute, value)
38
52
  should "have #{value} for #{attribute}" do
39
53
  assert_equal value, build_generator(@framework).send(attribute)
@@ -101,7 +101,7 @@ class TestGeneratorInitialization < Test::Unit::TestCase
101
101
  end
102
102
 
103
103
  should "set target directory to the project name" do
104
- assert_equal @project_name, @generator.target_dir
104
+ assert_equal @project_name, File.split(@generator.target_dir).last
105
105
  end
106
106
 
107
107
  should "set user's name from git config" 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: 9
5
- prerelease: false
4
+ hash: 7
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 3
10
- version: 1.6.3
9
+ - 4
10
+ version: 1.6.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Nichols
@@ -15,12 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-01 00:00:00 -04:00
18
+ date: 2011-07-07 00:00:00 -04:00
19
19
  default_executable: jeweler
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- prerelease: false
23
- type: :runtime
24
22
  version_requirements: &id001 !ruby/object:Gem::Requirement
25
23
  none: false
26
24
  requirements:
@@ -30,11 +28,11 @@ dependencies:
30
28
  segments:
31
29
  - 0
32
30
  version: "0"
31
+ prerelease: false
32
+ type: :runtime
33
33
  requirement: *id001
34
34
  name: rake
35
35
  - !ruby/object:Gem::Dependency
36
- prerelease: false
37
- type: :runtime
38
36
  version_requirements: &id002 !ruby/object:Gem::Requirement
39
37
  none: false
40
38
  requirements:
@@ -46,11 +44,11 @@ dependencies:
46
44
  - 2
47
45
  - 5
48
46
  version: 1.2.5
47
+ prerelease: false
48
+ type: :runtime
49
49
  requirement: *id002
50
50
  name: git
51
51
  - !ruby/object:Gem::Dependency
52
- prerelease: false
53
- type: :runtime
54
52
  version_requirements: &id003 !ruby/object:Gem::Requirement
55
53
  none: false
56
54
  requirements:
@@ -61,11 +59,11 @@ dependencies:
61
59
  - 1
62
60
  - 0
63
61
  version: "1.0"
62
+ prerelease: false
63
+ type: :runtime
64
64
  requirement: *id003
65
65
  name: bundler
66
66
  - !ruby/object:Gem::Dependency
67
- prerelease: false
68
- type: :development
69
67
  version_requirements: &id004 !ruby/object:Gem::Requirement
70
68
  none: false
71
69
  requirements:
@@ -75,11 +73,11 @@ dependencies:
75
73
  segments:
76
74
  - 0
77
75
  version: "0"
76
+ prerelease: false
77
+ type: :development
78
78
  requirement: *id004
79
79
  name: shoulda
80
80
  - !ruby/object:Gem::Dependency
81
- prerelease: false
82
- type: :development
83
81
  version_requirements: &id005 !ruby/object:Gem::Requirement
84
82
  none: false
85
83
  requirements:
@@ -89,11 +87,11 @@ dependencies:
89
87
  segments:
90
88
  - 0
91
89
  version: "0"
90
+ prerelease: false
91
+ type: :development
92
92
  requirement: *id005
93
93
  name: mhennemeyer-output_catcher
94
94
  - !ruby/object:Gem::Dependency
95
- prerelease: false
96
- type: :development
97
95
  version_requirements: &id006 !ruby/object:Gem::Requirement
98
96
  none: false
99
97
  requirements:
@@ -103,11 +101,11 @@ dependencies:
103
101
  segments:
104
102
  - 0
105
103
  version: "0"
104
+ prerelease: false
105
+ type: :development
106
106
  requirement: *id006
107
107
  name: rr
108
108
  - !ruby/object:Gem::Dependency
109
- prerelease: false
110
- type: :development
111
109
  version_requirements: &id007 !ruby/object:Gem::Requirement
112
110
  none: false
113
111
  requirements:
@@ -117,11 +115,11 @@ dependencies:
117
115
  segments:
118
116
  - 0
119
117
  version: "0"
118
+ prerelease: false
119
+ type: :development
120
120
  requirement: *id007
121
121
  name: mocha
122
122
  - !ruby/object:Gem::Dependency
123
- prerelease: false
124
- type: :development
125
123
  version_requirements: &id008 !ruby/object:Gem::Requirement
126
124
  none: false
127
125
  requirements:
@@ -131,11 +129,11 @@ dependencies:
131
129
  segments:
132
130
  - 0
133
131
  version: "0"
132
+ prerelease: false
133
+ type: :development
134
134
  requirement: *id008
135
135
  name: redgreen
136
136
  - !ruby/object:Gem::Dependency
137
- prerelease: false
138
- type: :development
139
137
  version_requirements: &id009 !ruby/object:Gem::Requirement
140
138
  none: false
141
139
  requirements:
@@ -145,11 +143,11 @@ dependencies:
145
143
  segments:
146
144
  - 0
147
145
  version: "0"
146
+ prerelease: false
147
+ type: :development
148
148
  requirement: *id009
149
149
  name: test-construct
150
150
  - !ruby/object:Gem::Dependency
151
- prerelease: false
152
- type: :development
153
151
  version_requirements: &id010 !ruby/object:Gem::Requirement
154
152
  none: false
155
153
  requirements:
@@ -161,11 +159,11 @@ dependencies:
161
159
  - 6
162
160
  - 0
163
161
  version: 0.6.0
162
+ prerelease: false
163
+ type: :development
164
164
  requirement: *id010
165
165
  name: yard
166
166
  - !ruby/object:Gem::Dependency
167
- prerelease: false
168
- type: :development
169
167
  version_requirements: &id011 !ruby/object:Gem::Requirement
170
168
  none: false
171
169
  requirements:
@@ -175,11 +173,11 @@ dependencies:
175
173
  segments:
176
174
  - 0
177
175
  version: "0"
176
+ prerelease: false
177
+ type: :development
178
178
  requirement: *id011
179
179
  name: bluecloth
180
180
  - !ruby/object:Gem::Dependency
181
- prerelease: false
182
- type: :development
183
181
  version_requirements: &id012 !ruby/object:Gem::Requirement
184
182
  none: false
185
183
  requirements:
@@ -189,11 +187,11 @@ dependencies:
189
187
  segments:
190
188
  - 0
191
189
  version: "0"
190
+ prerelease: false
191
+ type: :development
192
192
  requirement: *id012
193
193
  name: cucumber
194
194
  - !ruby/object:Gem::Dependency
195
- prerelease: false
196
- type: :development
197
195
  version_requirements: &id013 !ruby/object:Gem::Requirement
198
196
  none: false
199
197
  requirements:
@@ -203,11 +201,11 @@ dependencies:
203
201
  segments:
204
202
  - 0
205
203
  version: "0"
204
+ prerelease: false
205
+ type: :development
206
206
  requirement: *id013
207
207
  name: rcov
208
208
  - !ruby/object:Gem::Dependency
209
- prerelease: false
210
- type: :development
211
209
  version_requirements: &id014 !ruby/object:Gem::Requirement
212
210
  none: false
213
211
  requirements:
@@ -217,11 +215,11 @@ dependencies:
217
215
  segments:
218
216
  - 0
219
217
  version: "0"
218
+ prerelease: false
219
+ type: :development
220
220
  requirement: *id014
221
221
  name: timecop
222
222
  - !ruby/object:Gem::Dependency
223
- prerelease: false
224
- type: :development
225
223
  version_requirements: &id015 !ruby/object:Gem::Requirement
226
224
  none: false
227
225
  requirements:
@@ -233,11 +231,11 @@ dependencies:
233
231
  - 3
234
232
  - 5
235
233
  version: 2.3.5
234
+ prerelease: false
235
+ type: :development
236
236
  requirement: *id015
237
237
  name: activesupport
238
238
  - !ruby/object:Gem::Dependency
239
- prerelease: false
240
- type: :development
241
239
  version_requirements: &id016 !ruby/object:Gem::Requirement
242
240
  none: false
243
241
  requirements:
@@ -247,6 +245,8 @@ dependencies:
247
245
  segments:
248
246
  - 0
249
247
  version: "0"
248
+ prerelease: false
249
+ type: :development
250
250
  requirement: *id016
251
251
  name: ruby-debug
252
252
  description: Simple and opinionated helper for creating Rubygem projects on GitHub
@@ -448,7 +448,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
448
448
  requirements: []
449
449
 
450
450
  rubyforge_project:
451
- rubygems_version: 1.3.7
451
+ rubygems_version: 1.4.2
452
452
  signing_key:
453
453
  specification_version: 3
454
454
  summary: Opinionated tool for creating and managing RubyGem projects