jeweler 1.5.0.pre5 → 1.5.0.pre6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -2
- data/features/generator/dotdocument.feature +2 -3
- data/features/generator/rakefile.feature +3 -0
- data/features/step_definitions/generator_steps.rb +14 -0
- data/features/support/env.rb +1 -1
- data/jeweler.gemspec +3 -2
- data/lib/jeweler/rubyforge_tasks.rb +1 -0
- data/lib/jeweler/specification.rb +3 -3
- data/lib/jeweler/templates/jeweler_tasks.erb +6 -3
- data/lib/jeweler/version.rb +1 -1
- metadata +6 -6
data/Rakefile
CHANGED
@@ -17,11 +17,12 @@ require 'jeweler'
|
|
17
17
|
Jeweler::Tasks.new do |gem|
|
18
18
|
gem.name = "jeweler"
|
19
19
|
gem.version = Jeweler::Version::STRING
|
20
|
-
gem.summary = "Opinionated tool for creating and managing RubyGem projects"
|
21
|
-
gem.email = "josh@technicalpickles.com"
|
22
20
|
gem.homepage = "http://github.com/technicalpickles/jeweler"
|
21
|
+
gem.summary = "Opinionated tool for creating and managing RubyGem projects"
|
23
22
|
gem.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
|
23
|
+
gem.license = "MIT"
|
24
24
|
gem.authors = ["Josh Nichols"]
|
25
|
+
gem.email = "josh@technicalpickles.com"
|
25
26
|
gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
|
26
27
|
|
27
28
|
# dependencies defined in Gemfile
|
@@ -7,8 +7,7 @@ Feature: generated .document
|
|
7
7
|
Given a working directory
|
8
8
|
And I have configured git sanely
|
9
9
|
When I generate a project named 'the-perfect-gem' that is 'zomg, so good'
|
10
|
-
Then '.document' contains '
|
11
|
-
And '.document' contains 'lib/**/*.rb'
|
10
|
+
Then '.document' contains 'lib/**/*.rb'
|
12
11
|
And '.document' contains 'bin/*'
|
13
12
|
And '.document' contains 'features/**/*.feature'
|
14
|
-
And '.document' contains 'LICENSE'
|
13
|
+
And '.document' contains 'LICENSE.txt'
|
@@ -20,6 +20,7 @@ Feature: generated Rakefile
|
|
20
20
|
And Rakefile has 'zomg, so good' for the Jeweler::Tasks summary
|
21
21
|
And Rakefile has 'Descriptive' for the Jeweler::Tasks description
|
22
22
|
And Rakefile has 'http://github.com/technicalpickles/the-perfect-gem' for the Jeweler::Tasks homepage
|
23
|
+
And Rakefile has 'MIT' for the Jeweler::Tasks license
|
23
24
|
And Rakefile instantiates a Jeweler::RubygemsDotOrgTasks
|
24
25
|
|
25
26
|
Scenario: bacon
|
@@ -145,9 +146,11 @@ Feature: generated Rakefile
|
|
145
146
|
When I generate a project named 'the-perfect-gem' that is 'zomg, so good' and described as 'Descriptive'
|
146
147
|
Then 'Rakefile' requires 'bundler'
|
147
148
|
And 'Rakefile' sets up bundler using the default and development groups
|
149
|
+
And Rakefile does not add 'jeweler' as a development dependency to Jeweler::Tasks
|
148
150
|
|
149
151
|
Scenario: no bundler
|
150
152
|
Given I do not want bundler
|
151
153
|
When I generate a project named 'the-perfect-gem' that is 'zomg, so good' and described as 'Descriptive'
|
152
154
|
Then 'Rakefile' does not require 'bundler'
|
153
155
|
And 'Rakefile' does not setup bundler
|
156
|
+
And Rakefile adds 'jeweler' as a development dependency to Jeweler::Tasks
|
@@ -161,6 +161,20 @@ Then /^Rakefile has '(.*)' for the (.*) (.*)$/ do |value, task_class, field|
|
|
161
161
|
assert_match /#{block_variable}\.#{field} = (%Q\{|"|')#{Regexp.escape(value)}(\}|"|')/, task_block
|
162
162
|
end
|
163
163
|
|
164
|
+
Then /^Rakefile adds '(.*)' as a development dependency to Jeweler::Tasks$/ do |dependency|
|
165
|
+
@rakefile_content ||= File.read(File.join(@working_dir, @name, 'Rakefile'))
|
166
|
+
block_variable, task_block = yank_task_info(@rakefile_content, "Jeweler::Tasks")
|
167
|
+
|
168
|
+
assert_match /#{block_variable}\.add_development_dependency "#{dependency}"/, task_block
|
169
|
+
end
|
170
|
+
|
171
|
+
Then /^Rakefile does not add '(.*)' as a development dependency to Jeweler::Tasks$/ do |dependency|
|
172
|
+
@rakefile_content ||= File.read(File.join(@working_dir, @name, 'Rakefile'))
|
173
|
+
block_variable, task_block = yank_task_info(@rakefile_content, "Jeweler::Tasks")
|
174
|
+
|
175
|
+
assert_no_match /#{block_variable}\.add_development_dependency "#{dependency}"/, task_block
|
176
|
+
end
|
177
|
+
|
164
178
|
Then /^Rakefile has '(.*)' in the Rcov::RcovTask libs$/ do |libs|
|
165
179
|
@rakefile_content ||= File.read(File.join(@working_dir, @name, 'Rakefile'))
|
166
180
|
block_variable, task_block = yank_task_info(@rakefile_content, 'Rcov::RcovTask')
|
data/features/support/env.rb
CHANGED
@@ -22,7 +22,7 @@ require 'construct'
|
|
22
22
|
World(Construct::Helpers)
|
23
23
|
|
24
24
|
def yank_task_info(content, task)
|
25
|
-
if content =~ /#{Regexp.escape(task)}.new(\(.*\))? do \|(.*?)\|(.*?)end
|
25
|
+
if content =~ /#{Regexp.escape(task)}.new(\(.*\))? do \|(.*?)\|(.*?)^end$/m
|
26
26
|
[$2, $3]
|
27
27
|
end
|
28
28
|
end
|
data/jeweler.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{jeweler}
|
8
|
-
s.version = "1.5.0.
|
8
|
+
s.version = "1.5.0.pre6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Josh Nichols"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-11-13}
|
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}
|
@@ -180,6 +180,7 @@ Gem::Specification.new do |s|
|
|
180
180
|
"test/test_jeweler.rb"
|
181
181
|
]
|
182
182
|
s.homepage = %q{http://github.com/technicalpickles/jeweler}
|
183
|
+
s.licenses = ["MIT"]
|
183
184
|
s.require_paths = ["lib"]
|
184
185
|
s.rubygems_version = %q{1.3.7}
|
185
186
|
s.summary = %q{Opinionated tool for creating and managing RubyGem projects}
|
@@ -78,11 +78,11 @@ class Jeweler
|
|
78
78
|
if File.exist?('Gemfile')
|
79
79
|
require 'bundler'
|
80
80
|
bundler = Bundler.load
|
81
|
-
bundler.dependencies_for(:default).each do |dependency|
|
82
|
-
self.add_dependency dependency.name, dependency.requirement.
|
81
|
+
bundler.dependencies_for(:default, :runtime).each do |dependency|
|
82
|
+
self.add_dependency dependency.name, *dependency.requirement.as_list
|
83
83
|
end
|
84
84
|
bundler.dependencies_for(:development).each do |dependency|
|
85
|
-
self.add_development_dependency dependency.name, dependency.requirement.
|
85
|
+
self.add_development_dependency dependency.name, *dependency.requirement.as_list
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
@@ -2,21 +2,24 @@ require 'jeweler'
|
|
2
2
|
Jeweler::Tasks.new do |gem|
|
3
3
|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
4
4
|
gem.name = "<%= project_name %>"
|
5
|
+
gem.homepage = "<%= homepage %>"
|
6
|
+
gem.license = "MIT"
|
5
7
|
gem.summary = %Q{<%= summary %>}
|
6
8
|
gem.description = %Q{<%= description %>}
|
7
9
|
gem.email = "<%= user_email %>"
|
8
|
-
gem.homepage = "<%= homepage %>"
|
9
10
|
gem.authors = ["<%= user_name %>"]
|
10
11
|
<% if should_setup_rubyforge %>
|
11
12
|
gem.rubyforge_project = "<%= project_name %>"
|
12
13
|
<% end %>
|
13
14
|
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
14
15
|
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
15
|
-
#
|
16
|
-
#
|
16
|
+
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
17
|
+
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
18
|
+
<% if ! should_use_bundler %>
|
17
19
|
<% development_dependencies.each do |name, version| %>
|
18
20
|
gem.add_development_dependency "<%= name %>", "<%= version %>"
|
19
21
|
<% end %>
|
22
|
+
<% end %>
|
20
23
|
end
|
21
24
|
Jeweler::RubygemsDotOrgTasks.new
|
22
25
|
<% if should_setup_rubyforge %>
|
data/lib/jeweler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jeweler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -1876988219
|
5
5
|
prerelease: true
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 1.5.0.
|
10
|
+
- pre6
|
11
|
+
version: 1.5.0.pre6
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Josh Nichols
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-
|
19
|
+
date: 2010-11-13 00:00:00 -06:00
|
20
20
|
default_executable: jeweler
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -422,8 +422,8 @@ files:
|
|
422
422
|
- test/test_jeweler.rb
|
423
423
|
has_rdoc: true
|
424
424
|
homepage: http://github.com/technicalpickles/jeweler
|
425
|
-
licenses:
|
426
|
-
|
425
|
+
licenses:
|
426
|
+
- MIT
|
427
427
|
post_install_message:
|
428
428
|
rdoc_options: []
|
429
429
|
|