jeweler 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,7 +1,9 @@
1
1
  coverage
2
2
  pkg
3
+ doc
3
4
  rdoc
4
5
  tags
5
6
  test/tmp
6
7
  test/version_tmp
7
8
  tmp
9
+ .yardoc
data/ChangeLog.markdown CHANGED
@@ -1,3 +1,25 @@
1
+ # jeweler 1.1.0 2009-08-05
2
+
3
+ * Support for generating a project that uses yard instead of rdoc
4
+ * Generated gemspec now includes comments about it being generated by jeweler
5
+ * Only use sudo for installing on non-windows platforms [#1]
6
+ * Fixed rake release to be repeatable on the same version [#16]
7
+ * Fixed rake rubyforge:setup to not create duplicate packages
8
+ * Use a more recent version of ruby-git
9
+ * Fixes various issues with reading values out of ~/.gitconfig [#26] [#21] [#19]
10
+ * Experimenting with a rake task to check development time dependencies [#22]
11
+ * Fixed generated rdoc task to load from VERSION instead of VERSION.yml
12
+
13
+ # jeweler 1.0.2 2009-07-29
14
+
15
+ * Don't include git ignored files for default gemspec's files and test_files
16
+ * Fixed rspec generator to allow specs to be run directly
17
+ * Removed misleading docstring for version_required rake task [#17]
18
+ * Includes some notes about contributed in generated README
19
+ * Added support for generating a project to use reek and roodi
20
+
21
+ # jeweler 1.0.1 2009-05-15
22
+
1
23
  # jeweler 0.11.1
2
24
 
3
25
  * Lots of internal refactorings to how project generation happens
data/Rakefile CHANGED
@@ -15,14 +15,27 @@ begin
15
15
  gem.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
16
16
  gem.authors = ["Josh Nichols"]
17
17
  gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
18
- gem.add_dependency "git", ">= 1.1.1"
18
+
19
+ gem.add_dependency "git", ">= 1.2.1"
19
20
  gem.add_dependency "rubyforge"
21
+
20
22
  gem.rubyforge_project = "pickles"
23
+
24
+ gem.add_development_dependency "thoughtbot-shoulda"
25
+ gem.add_development_dependency "mhennemeyer-output_catcher"
26
+ gem.add_development_dependency "rr"
27
+ gem.add_development_dependency "mocha"
28
+ gem.add_development_dependency "redgreen"
29
+ end
30
+
31
+ Jeweler::RubyforgeTasks.new do |t|
32
+ t.doc_task = :yardoc
21
33
  end
22
34
  rescue LoadError
23
35
  puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
24
36
  end
25
37
 
38
+
26
39
  require 'rake/testtask'
27
40
  Rake::TestTask.new(:test) do |test|
28
41
  test.test_files = FileList.new('test/**/test_*.rb') do |list|
@@ -32,14 +45,18 @@ Rake::TestTask.new(:test) do |test|
32
45
  test.verbose = true
33
46
  end
34
47
 
35
- require 'rake/rdoctask'
36
- Rake::RDocTask.new do |rdoc|
37
- rdoc.rdoc_dir = 'rdoc'
38
- rdoc.title = 'jeweler'
39
- rdoc.rdoc_files.include('README.markdown')
40
- rdoc.rdoc_files.include('lib/**/*.rb')
48
+ begin
49
+ require 'yard'
50
+ YARD::Rake::YardocTask.new(:yardoc) do |t|
51
+ t.files = FileList['lib/**/*.rb'].exclude('lib/jeweler/templates/**/*.rb')
52
+ end
53
+ rescue LoadError
54
+ task :yardoc do
55
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
56
+ end
41
57
  end
42
58
 
59
+
43
60
  begin
44
61
  require 'rcov/rcovtask'
45
62
  Rcov::RcovTask.new(:rcov) do |rcov|
@@ -73,34 +90,37 @@ rescue LoadError
73
90
  end
74
91
  end
75
92
 
76
- begin
77
- require 'rake/contrib/sshpublisher'
78
- namespace :rubyforge do
79
-
80
- desc "Release gem and RDoc documentation to RubyForge"
81
- task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
82
-
83
- namespace :release do
84
- desc "Publish RDoc to RubyForge."
85
- task :docs => [:rdoc] do
86
- config = YAML.load(
87
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
88
- )
89
-
90
- host = "#{config['username']}@rubyforge.org"
91
- remote_dir = "/var/www/gforge-projects/pickles"
92
- local_dir = 'rdoc'
93
-
94
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
95
- end
96
- end
97
- end
98
- rescue LoadError
99
- puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
100
- end
101
-
102
93
  if ENV["RUN_CODE_RUN"] == "true"
103
94
  task :default => [:test, :features]
104
95
  else
105
96
  task :default => :test
106
97
  end
98
+
99
+ namespace :development_dependencies do
100
+ task :check do
101
+ missing_dependencies = Rake.application.jeweler.gemspec.development_dependencies.select do |dependency|
102
+ begin
103
+ Gem.activate dependency.name, dependency.version_requirements.to_s
104
+ false
105
+ rescue LoadError => e
106
+ true
107
+ end
108
+ end
109
+
110
+ #require 'ruby-debug'; breakpoint
111
+
112
+ if missing_dependencies.empty?
113
+ puts "Development dependencies seem to be installed."
114
+ else
115
+ puts "Missing some dependencies. Install them with the following commands:"
116
+ missing_dependencies.each do |dependency|
117
+ puts %Q{\tgem install #{dependency.name} --version "#{dependency.version_requirements}"}
118
+ end
119
+ abort "Run the specified gem commands before trying to run this again: #{$0} #{ARGV.join(' ')}"
120
+ end
121
+
122
+ end
123
+ end
124
+
125
+ task :test => 'development_dependencies:check'
126
+ task :features => 'development_dependencies:check'
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
- :patch: 2
4
- :minor: 0
3
+ :patch: 0
4
+ :minor: 1
@@ -3,9 +3,11 @@ Feature: generated Rakefile
3
3
  A user should be able to
4
4
  generate a Rakefile
5
5
 
6
- Scenario: shared
6
+ Background:
7
7
  Given a working directory
8
8
  And I have configured git sanely
9
+
10
+ Scenario: shared
9
11
  When I generate a project named 'the-perfect-gem' that is 'zomg, so good' and described as 'Descriptive'
10
12
 
11
13
  Then 'Rakefile' requires 'rubygems'
@@ -18,8 +20,6 @@ Feature: generated Rakefile
18
20
  And Rakefile has 'http://github.com/technicalpickles/the-perfect-gem' for the Jeweler::Tasks homepage
19
21
 
20
22
  Scenario: bacon
21
- Given a working directory
22
- And I have configured git sanely
23
23
  When I generate a bacon project named 'the-perfect-gem' that is 'zomg, so good'
24
24
 
25
25
 
@@ -30,8 +30,6 @@ Feature: generated Rakefile
30
30
  And Rakefile has "spec" as the default task
31
31
 
32
32
  Scenario: minitest
33
- Given a working directory
34
- And I have configured git sanely
35
33
  When I generate a minitest project named 'the-perfect-gem' that is 'zomg, so good'
36
34
 
37
35
  Then 'Rakefile' requires 'rcov/rcovtask'
@@ -41,8 +39,6 @@ Feature: generated Rakefile
41
39
  And Rakefile has "test" as the default task
42
40
 
43
41
  Scenario: rspec
44
- Given a working directory
45
- And I have configured git sanely
46
42
  When I generate a rspec project named 'the-perfect-gem' that is 'zomg, so good'
47
43
 
48
44
  Then 'Rakefile' requires 'spec/rake/spectask'
@@ -50,8 +46,6 @@ Feature: generated Rakefile
50
46
  And Rakefile has "spec" as the default task
51
47
 
52
48
  Scenario: shoulda
53
- Given a working directory
54
- And I have configured git sanely
55
49
  When I generate a shoulda project named 'the-perfect-gem' that is 'zomg, so good'
56
50
 
57
51
  Then 'Rakefile' requires 'rcov/rcovtask'
@@ -61,8 +55,6 @@ Feature: generated Rakefile
61
55
  And Rakefile has "test" as the default task
62
56
 
63
57
  Scenario: micronaut
64
- Given a working directory
65
- And I have configured git sanely
66
58
  When I generate a micronaut project named 'the-perfect-gem' that is 'zomg, so good'
67
59
 
68
60
  Then 'Rakefile' requires 'micronaut/rake_task'
@@ -70,8 +62,6 @@ Feature: generated Rakefile
70
62
  And Rakefile has "examples" as the default task
71
63
 
72
64
  Scenario: testunit
73
- Given a working directory
74
- And I have configured git sanely
75
65
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
76
66
 
77
67
  Then 'Rakefile' requires 'rcov/rcovtask'
@@ -81,65 +71,81 @@ Feature: generated Rakefile
81
71
  And Rakefile has "test" as the default task
82
72
 
83
73
  Scenario: no cucumber
84
- Given a working directory
85
- And I have configured git sanely
86
- And I do not want cucumber stories
74
+ Given I do not want cucumber stories
87
75
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
88
76
  Then Rakefile does not require 'cucumber/rake/task'
89
77
  And Rakefile does not instantiate a Cucumber::Rake::Task
90
78
 
91
79
  Scenario: cucumber
92
- Given a working directory
93
- And I have configured git sanely
94
- And I want cucumber stories
80
+ Given I want cucumber stories
95
81
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
96
82
  Then Rakefile requires 'cucumber/rake/task'
97
83
  And Rakefile instantiates a Cucumber::Rake::Task
98
84
 
99
85
  Scenario: no reek
100
- Given a working directory
101
- And I have configured git sanely
102
- And I do not want reek
86
+ Given I do not want reek
103
87
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
104
88
  Then Rakefile does not require 'reek/rake_task'
105
89
  And Rakefile does not instantiate a Reek::RakeTask
106
90
 
107
91
  Scenario: reek
108
- Given a working directory
109
- And I have configured git sanely
110
- And I want reek
92
+ Given I want reek
111
93
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
112
94
  Then Rakefile requires 'reek/rake_task'
113
95
  And Rakefile instantiates a Reek::RakeTask
114
96
 
115
97
  Scenario: no roodi
116
- Given a working directory
117
- And I have configured git sanely
118
- And I do not want roodi
98
+ Given I do not want roodi
119
99
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
120
100
  Then Rakefile does not require 'roodi'
121
101
  And Rakefile does not require 'roodi_task'
122
102
  And Rakefile does not instantiate a RoodiTask
123
103
 
124
104
  Scenario: roodi
125
- Given a working directory
126
- And I have configured git sanely
127
- And I want roodi
105
+ Given I want roodi
128
106
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
129
107
  Then Rakefile requires 'roodi'
130
108
  And Rakefile requires 'roodi_task'
131
109
  And Rakefile instantiates a RoodiTask
132
110
 
133
111
  Scenario: no rubyforge
134
- Given a working directory
135
- And I have configured git sanely
136
- And I do not want rubyforge setup
112
+ Given I do not want rubyforge setup
137
113
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
138
114
  Then Rakefile does not instantiate a Jeweler::RubyforgeTasks
139
115
 
140
116
  Scenario: rubyforge
141
- Given a working directory
142
- And I have configured git sanely
117
+ Given I want rubyforge setup
118
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
119
+ Then Rakefile instantiates a Jeweler::RubyforgeTasks
120
+
121
+ Scenario: yard
122
+ Given I want to use yard instead of rdoc
123
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
124
+
125
+ Then 'Rakefile' does not require 'rake/rdoctask'
126
+ And 'Rakefile' requires 'yard'
127
+ And Rakefile instantiates a YARD::Rake::YardocTask
128
+
129
+ Scenario: rdoc
130
+ Given I want to use rdoc instead of yard
131
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
132
+
133
+ Then 'Rakefile' does not require 'yard'
134
+ And 'Rakefile' requires 'rake/rdoctask'
135
+ And Rakefile does not instantiate a YARD::Rake::YardocTask
136
+ And Rakefile instantiates a Rake::RDocTask.new
137
+
138
+ Scenario: rubyforge and yard
139
+ Given I want to use yard instead of rdoc
140
+ And I want rubyforge setup
141
+ When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
142
+ Then Rakefile instantiates a Jeweler::RubyforgeTasks
143
+ And Rakefile has 'yardoc' for the Jeweler::RubyforgeTasks doc_task
144
+
145
+ Scenario: rubyfoge and doc
146
+ Given I want to use rdoc instead of yard
147
+ And I want rubyforge setup
143
148
  And I want rubyforge setup
144
149
  When I generate a testunit project named 'the-perfect-gem' that is 'zomg, so good'
145
150
  Then Rakefile instantiates a Jeweler::RubyforgeTasks
151
+ And Rakefile has 'rdoc' for the Jeweler::RubyforgeTasks doc_task
@@ -25,6 +25,9 @@ end
25
25
  When /^I run "([^"]+)" in "([^"]+)"$/ do |command, directory|
26
26
  full_path = File.join(@working_dir, directory)
27
27
 
28
+ lib_path = File.expand_path 'lib'
29
+ command.gsub!(/^rake /, "rake -I#{lib_path} ")
30
+
28
31
  assert File.directory?(full_path), "#{full_path} is not a directory"
29
32
 
30
33
  @stdout = `cd #{full_path} && #{command}`
@@ -30,6 +30,14 @@ And /^I want rubyforge setup$/ do
30
30
  @use_rubyforge = true
31
31
  end
32
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
+
33
41
 
34
42
  Given /^I intend to test with (\w+)$/ do |testing_framework|
35
43
  @testing_framework = testing_framework.to_sym
@@ -77,6 +85,7 @@ When /^I generate a (.*)project named '((?:\w|-|_)+)' that is '([^']*)' and desc
77
85
  @use_rubyforge ? '--rubyforge' : nil,
78
86
  @use_roodi ? '--roodi' : nil,
79
87
  @use_reek ? '--reek' : nil,
88
+ @documentation_framework ? "--#{@documentation_framework}" : nil,
80
89
  @name].compact
81
90
 
82
91
  @stdout = OutputCatcher.catch_out do
@@ -1,8 +1,18 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
2
2
  require 'jeweler'
3
3
 
4
- require 'mocha'
5
- require 'output_catcher'
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
+
6
16
 
7
17
  require 'test/unit/assertions'
8
18
 
data/jeweler.gemspec CHANGED
@@ -1,12 +1,15 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
1
4
  # -*- encoding: utf-8 -*-
2
5
 
3
6
  Gem::Specification.new do |s|
4
7
  s.name = %q{jeweler}
5
- s.version = "1.0.2"
8
+ s.version = "1.1.0"
6
9
 
7
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
11
  s.authors = ["Josh Nichols"]
9
- s.date = %q{2009-07-29}
12
+ s.date = %q{2009-08-05}
10
13
  s.default_executable = %q{jeweler}
11
14
  s.description = %q{Simple and opinionated helper for creating Rubygem projects on GitHub}
12
15
  s.email = %q{josh@technicalpickles.com}
@@ -150,7 +153,7 @@ Gem::Specification.new do |s|
150
153
  s.rdoc_options = ["--charset=UTF-8"]
151
154
  s.require_paths = ["lib"]
152
155
  s.rubyforge_project = %q{pickles}
153
- s.rubygems_version = %q{1.3.4}
156
+ s.rubygems_version = %q{1.3.5}
154
157
  s.summary = %q{Simple and opinionated helper for creating Rubygem projects on GitHub}
155
158
  s.test_files = [
156
159
  "test/fixtures/bar/lib/foo_the_ultimate_lib.rb",
@@ -191,14 +194,29 @@ Gem::Specification.new do |s|
191
194
  s.specification_version = 3
192
195
 
193
196
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
194
- s.add_runtime_dependency(%q<git>, [">= 1.1.1"])
197
+ s.add_runtime_dependency(%q<git>, [">= 1.2.1"])
195
198
  s.add_runtime_dependency(%q<rubyforge>, [">= 0"])
199
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
200
+ s.add_development_dependency(%q<mhennemeyer-output_catcher>, [">= 0"])
201
+ s.add_development_dependency(%q<rr>, [">= 0"])
202
+ s.add_development_dependency(%q<mocha>, [">= 0"])
203
+ s.add_development_dependency(%q<redgreen>, [">= 0"])
196
204
  else
197
- s.add_dependency(%q<git>, [">= 1.1.1"])
205
+ s.add_dependency(%q<git>, [">= 1.2.1"])
198
206
  s.add_dependency(%q<rubyforge>, [">= 0"])
207
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
208
+ s.add_dependency(%q<mhennemeyer-output_catcher>, [">= 0"])
209
+ s.add_dependency(%q<rr>, [">= 0"])
210
+ s.add_dependency(%q<mocha>, [">= 0"])
211
+ s.add_dependency(%q<redgreen>, [">= 0"])
199
212
  end
200
213
  else
201
- s.add_dependency(%q<git>, [">= 1.1.1"])
214
+ s.add_dependency(%q<git>, [">= 1.2.1"])
202
215
  s.add_dependency(%q<rubyforge>, [">= 0"])
216
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
217
+ s.add_dependency(%q<mhennemeyer-output_catcher>, [">= 0"])
218
+ s.add_dependency(%q<rr>, [">= 0"])
219
+ s.add_dependency(%q<mocha>, [">= 0"])
220
+ s.add_dependency(%q<redgreen>, [">= 0"])
203
221
  end
204
222
  end