technicalpickles-jeweler 0.6.5 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog.markdown +12 -2
- data/LICENSE +20 -0
- data/README.markdown +44 -134
- data/Rakefile +12 -20
- data/TODO +1 -4
- data/VERSION.yml +2 -2
- data/bin/jeweler +24 -2
- data/lib/jeweler/generator.rb +9 -6
- data/lib/jeweler/templates/Rakefile +1 -1
- data/lib/jeweler/templates/bacon/spec_helper.rb +3 -0
- data/lib/jeweler/templates/shoulda/test_helper.rb +4 -1
- data/lib/jeweler.rb +4 -0
- data/test/{gemspec_test.rb → test_gemspec.rb} +1 -1
- data/test/{jeweler_generator_test.rb → test_generator.rb} +6 -3
- data/test/{jeweler_test.rb → test_jeweler.rb} +15 -1
- data/test/{tasks_test.rb → test_tasks.rb} +1 -1
- data/test/{version_test.rb → test_version.rb} +1 -2
- metadata +13 -10
data/ChangeLog.markdown
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
+
# jeweler 0.6.6
|
2
|
+
|
3
|
+
* Added support to generator for specifying a description
|
4
|
+
* Condensed README.markdown to be less novel-like
|
5
|
+
* RDoc is now included in your gemspec
|
6
|
+
* Rescue errors that raise in the generator, and display better error message, and exit with a non-zero exit status
|
7
|
+
|
8
|
+
# jeweler 0.6.5
|
9
|
+
|
10
|
+
* `jeweler --create-repo foo` now enables gem creation in addition to creating the repository
|
11
|
+
|
1
12
|
# jeweler 0.6.4
|
2
13
|
|
3
|
-
* Added tasks
|
4
|
-
'gem:install'
|
14
|
+
* Added tasks `build` and `install` as shortcuts for `gem:build` and `gem:install`
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2008 Josh Nichols
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
CHANGED
@@ -1,39 +1,14 @@
|
|
1
|
-
# Jeweler:
|
1
|
+
# Jeweler: Craft the perfect RubyGem
|
2
2
|
|
3
|
-
|
3
|
+
Jeweler provides two things:
|
4
4
|
|
5
|
-
|
5
|
+
* Rake tasks for managing gems and versioning of a <a href="http://github.com">GitHub</a> project
|
6
|
+
* A generator for creating kickstarting a new project
|
6
7
|
|
7
|
-
|
8
|
-
* ... why bother doing something by hand when you can automate it?
|
9
|
-
* Write your own Rake stuff to create the Gem::Specification and output it to a gemspec file, and deal with keeping the Rakefile and gemspec in sync
|
10
|
-
* ... why keep reinventing the wheel?
|
11
|
-
* Use hoe or echoe for generating the gemspec
|
12
|
-
* ... why use utilities made for the days before GitHub existed?
|
13
|
-
* ... why have extra stuff you aren't going to use?
|
8
|
+
## Setting up in an existing project
|
14
9
|
|
15
|
-
Jeweler
|
10
|
+
It's easy to get up and running. Update your instantiate a `Jeweler::Tasks`, and give it a block with details about your project.
|
16
11
|
|
17
|
-
* Only use a Gem::Specification as configuration
|
18
|
-
* Be one command away from version bumping and releasing
|
19
|
-
* Store version information in one place
|
20
|
-
* Only concern itself with git, gems, and versioning
|
21
|
-
* Not be a requirement for using your Rakefile (you just wouldn't be able to use its tasks)
|
22
|
-
* Use Jeweler internally. Oh the meta!
|
23
|
-
|
24
|
-
## Installation
|
25
|
-
|
26
|
-
Run the following if you haven't already:
|
27
|
-
|
28
|
-
gem sources -a http://gems.github.com
|
29
|
-
|
30
|
-
Install the gem:
|
31
|
-
|
32
|
-
sudo gem install technicalpickles-jeweler
|
33
|
-
|
34
|
-
## Configuration for an existing project
|
35
|
-
|
36
|
-
Armed with the gem, we can begin diving into an example. [the-perfect-gem](http://github.com/technicalpickles/the-perfect-gem/tree) was setup as a Jeweler showcase, and a simple example:
|
37
12
|
|
38
13
|
begin
|
39
14
|
require 'jeweler'
|
@@ -49,132 +24,67 @@ Armed with the gem, we can begin diving into an example. [the-perfect-gem](http:
|
|
49
24
|
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
50
25
|
end
|
51
26
|
|
52
|
-
|
53
|
-
|
54
|
-
* Wrap everything in a begin block, and rescue from LoadError
|
55
|
-
* This lets us degrade gracefully if jeweler isn't installed
|
56
|
-
* Make a new `Jeweler::Tasks`
|
57
|
-
* It gets yielded a new `Gem::Specification`
|
58
|
-
* This is where all the configuration happens
|
59
|
-
* Things you definitely need to specify:
|
60
|
-
* `name`
|
61
|
-
* Things you probably want to specify:
|
62
|
-
* `summary`
|
63
|
-
* `email`
|
64
|
-
* `homepage`
|
65
|
-
* `description`
|
66
|
-
* `authors`
|
67
|
-
* Things you can specify, but have defaults
|
68
|
-
* `files`, defaults to `FileList["[A-Z]*.*", "{bin,generators,lib,test,spec}/**/*"]`
|
69
|
-
* Things you shouldn't specify:
|
70
|
-
* `version`, because Jeweler takes care of this for you
|
71
|
-
* Other things of interest
|
72
|
-
* `executables`, if you have any scripts
|
73
|
-
* `add_dependency`, if you have any dependencies
|
74
|
-
* Keep in mind that this is a `Gem::Specification`, so you can do whatever you would need to do to get your gem in shape
|
75
|
-
|
76
|
-
## Bootstrap a new project
|
77
|
-
|
78
|
-
Before proceeding, take a minute to setup your git environment, specifically your name, email address, and GitHub username
|
79
|
-
|
80
|
-
$ git config --global user.email johndoe@example.com
|
81
|
-
$ git config --global user.name 'John Doe'
|
82
|
-
$ git config --global github.user johndoe
|
83
|
-
$ git config --global github.token 55555555555555
|
84
|
-
|
85
|
-
Jeweler provides a generator of sorts, `jeweler`. It requires only argument, the name of a repo you want to create. It also takes a few options: --[shoulda](http://github.com/thoughtbot/shoulda) and --[bacon](http://github.com/chneukirchen/bacon/tree/master). These control what type of tests are created, with the default being shoulda.
|
86
|
-
|
87
|
-
$ jeweler --create-repo the-perfect-gem
|
88
|
-
|
89
|
-
Basically, this does:
|
90
|
-
|
91
|
-
* Creates the the-perfect-gem directory
|
92
|
-
* Seeds it with some basic files:
|
93
|
-
* `.gitignore`, with the usual suspects predefined
|
94
|
-
* `Rakefile`, setup with tasks for jeweler, test, rdoc, and rcov
|
95
|
-
* `README`, with your project name
|
96
|
-
* `LICENSE`, MIT, with your name prefilled
|
97
|
-
* `test/test_helper`, setup with shoulda, mocha, and a re-opened `Test::Unit::TestCase`
|
98
|
-
* `test/the_perfect_gem.rb`, placeholder failing test
|
99
|
-
* `lib/the_perfect_gem.rb`, placeholder library file
|
100
|
-
* Makes it a git repo
|
101
|
-
* Sets up `git@github.com:johndoe/jeweler.git` as the `origin` git remote
|
102
|
-
* Makes an initial commit
|
103
|
-
* Sets up a new repository on GitHub and pushes to it (omit --create-repo to skip this)
|
104
|
-
|
105
|
-
You also probably should [enable RubyGem creation for you repository](http://github.com/blog/51-github-s-rubygem-server): Go to your project's edit page and check the 'RubyGem' box.
|
106
|
-
|
107
|
-
## Overview of Jeweler workflow
|
108
|
-
|
109
|
-
Here's the general idea:
|
27
|
+
In this example, `s` is a Gem::Specification object. See the documentation for what possible values you can set on it.
|
110
28
|
|
111
|
-
|
112
|
-
* Version bump
|
113
|
-
* Release
|
114
|
-
* Have a delicious scotch
|
115
|
-
|
116
|
-
The hacking and the scotch are up to you, but Jeweler provides rake tasks for the rest.
|
117
|
-
|
118
|
-
### Versioning
|
29
|
+
## Kicking off a new project
|
119
30
|
|
120
|
-
|
31
|
+
Jeweler provides a generator. It requires you to [setup your name and email for git](http://github.com/guides/tell-git-your-user-name-and-email-address) and [your username and token for GitHub](http://github.com/guides/local-github-config).
|
121
32
|
|
122
|
-
|
123
|
-
* minor
|
124
|
-
* patch
|
33
|
+
jeweler the-perfect-gem
|
125
34
|
|
126
|
-
|
35
|
+
This will prepare a project in the 'the-perfect-gem' directory, setup to use Jeweler.
|
127
36
|
|
128
|
-
|
129
|
-
* minor = 5
|
130
|
-
* patch = 3
|
37
|
+
It supports a number of options:
|
131
38
|
|
132
|
-
|
39
|
+
* --create-repo: in addition to preparing a project, it create an repo up on GitHub and enable RubyGem generation
|
40
|
+
* --shoulda: generate test_helper.rb and empty test ready for shoulda (this is the default)
|
41
|
+
* --bacon: generate spec_helper.rb and empty spec ready for bacon
|
133
42
|
|
134
|
-
|
43
|
+
## Gemspec
|
135
44
|
|
136
|
-
|
45
|
+
Jeweler handles generating a gemspec file for your project:
|
137
46
|
|
138
|
-
|
139
|
-
* Write `VERSION.yml` by hand (lame)
|
47
|
+
rake gemspec
|
140
48
|
|
49
|
+
This creates a gemspec for your project. It's based on the info you give `Jeweler::Tasks`, the current version of your project, and some defaults that Jeweler provides.
|
141
50
|
|
142
|
-
|
51
|
+
## Gem
|
143
52
|
|
144
|
-
|
53
|
+
Jeweler gives you tasks for building and installing your gem:
|
145
54
|
|
146
|
-
|
147
|
-
|
148
|
-
$ rake version:bump:major # 1.5.1 -> 2.0.0
|
55
|
+
rake build
|
56
|
+
rake install
|
149
57
|
|
150
|
-
|
58
|
+
## Versioning
|
151
59
|
|
152
|
-
|
60
|
+
Jeweler tracks the version of your project. It assumes you will be using a version in the format `x.y.z`. `x` is the 'major' version, `y` is the 'minor' version, and `z` is the patch version.
|
153
61
|
|
154
|
-
|
62
|
+
Initially, your project starts out at 0.0.0. Jeweler provides Rake tasks for bumping the version:
|
155
63
|
|
156
|
-
|
64
|
+
rake version:bump:major
|
65
|
+
rake version:bump:minor
|
66
|
+
rake version:bump:patch
|
157
67
|
|
158
|
-
|
68
|
+
## Releasing
|
159
69
|
|
160
|
-
|
70
|
+
Jeweler handles releasing your gem into the wild:
|
161
71
|
|
162
|
-
|
72
|
+
rake release
|
163
73
|
|
164
|
-
|
165
|
-
* Commit and push the updated `.gemspec`
|
166
|
-
* Create a tag
|
167
|
-
* Push the tag
|
74
|
+
It does the following for you:
|
168
75
|
|
169
|
-
|
76
|
+
* Regenerate the gemspec to the latest version of your project
|
77
|
+
* Push to GitHub (which results in a gem being build)
|
78
|
+
* Tag the version and push to GitHub
|
170
79
|
|
171
|
-
|
80
|
+
## Workflow
|
172
81
|
|
173
|
-
|
174
|
-
|
175
|
-
|
82
|
+
* Hack, commit, hack, commit, etc, etc
|
83
|
+
* `rake version:bump:patch release` to do the actual version bump and release
|
84
|
+
* Have a delicious scotch
|
85
|
+
* Go to [Has My Gem Built Yet](http://hasmygembuiltyet.org) and wait for your gem to be built
|
176
86
|
|
177
|
-
|
178
|
-
$ rake version:bump:patch release
|
87
|
+
## Links
|
179
88
|
|
180
|
-
|
89
|
+
* [Bugs](http://technicalpickles.lighthouseapp.com/projects/23560-jeweler/overview)
|
90
|
+
* [Donate](http://pledgie.org/campaigns/2604)
|
data/Rakefile
CHANGED
@@ -12,27 +12,23 @@ $:.unshift('lib')
|
|
12
12
|
|
13
13
|
begin
|
14
14
|
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
15
|
+
Jeweler::Tasks.new do |s|
|
16
|
+
s.name = "jeweler"
|
17
|
+
s.executables = "jeweler"
|
18
|
+
s.summary = "Simple and opinionated helper for creating Rubygem projects on GitHub"
|
19
|
+
s.email = "josh@technicalpickles.com"
|
20
|
+
s.homepage = "http://github.com/technicalpickles/jeweler"
|
21
|
+
s.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
|
22
|
+
s.authors = ["Josh Nichols"]
|
23
|
+
s.files = FileList["[A-Z]*", "{bin,generators,lib,test}/**/*", 'lib/jeweler/templates/.gitignore']
|
24
|
+
s.add_dependency 'schacon-git'
|
25
25
|
end
|
26
26
|
rescue LoadError
|
27
27
|
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
28
28
|
end
|
29
29
|
|
30
30
|
|
31
|
-
Rake::TestTask.new
|
32
|
-
t.libs << 'lib'
|
33
|
-
t.pattern = 'test/*_test.rb'
|
34
|
-
t.verbose = false
|
35
|
-
end
|
31
|
+
Rake::TestTask.new
|
36
32
|
|
37
33
|
Rake::RDocTask.new do |rdoc|
|
38
34
|
rdoc.rdoc_dir = 'rdoc'
|
@@ -42,10 +38,6 @@ Rake::RDocTask.new do |rdoc|
|
|
42
38
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
43
39
|
end
|
44
40
|
|
45
|
-
Rcov::RcovTask.new
|
46
|
-
t.libs << "test"
|
47
|
-
t.test_files = FileList['test/**/*_test.rb']
|
48
|
-
t.verbose = true
|
49
|
-
end
|
41
|
+
Rcov::RcovTask.new
|
50
42
|
|
51
43
|
task :default => :rcov
|
data/TODO
CHANGED
@@ -1,16 +1,13 @@
|
|
1
1
|
* use some sort of logger instead of stdout and stderr
|
2
2
|
* jeweler --delete-repo
|
3
|
-
* enable rdoc in gemspec by defaul
|
4
3
|
* output gemspec as yaml
|
5
4
|
* move interactions with github into separate class
|
6
5
|
* use Net::HTTP.post_form instead of `` for enabling gem creation
|
7
|
-
* Auto-enable rubygem generation
|
8
6
|
* Generators
|
9
7
|
* Rails generator for making a plugin that's Jeweler enabled
|
10
8
|
* Support rspec?
|
11
9
|
* Support test/unit
|
12
10
|
* Change generated test filename (test_foo not foo_test)
|
13
|
-
* better error handling during generation
|
14
11
|
* Releasing
|
15
|
-
* Create tag based on version
|
16
12
|
* Open hasmygembuiltyet.org
|
13
|
+
* enable runcoderun by default
|
data/VERSION.yml
CHANGED
data/bin/jeweler
CHANGED
@@ -27,6 +27,10 @@ class JewelerOpts < Hash
|
|
27
27
|
o.on('--create-repo', 'create the repository on GitHub') do
|
28
28
|
self[:create_repo] = true
|
29
29
|
end
|
30
|
+
|
31
|
+
o.on('--summary [SUMMARY]', 'specify the summary of the project') do |summary|
|
32
|
+
self[:summary] = summary
|
33
|
+
end
|
30
34
|
|
31
35
|
o.on_tail('-h', '--help', 'display this help and exit') do
|
32
36
|
puts o
|
@@ -46,5 +50,23 @@ unless ARGV.size == 1
|
|
46
50
|
end
|
47
51
|
|
48
52
|
github_repo_name = ARGV.first
|
49
|
-
|
50
|
-
|
53
|
+
|
54
|
+
begin
|
55
|
+
generator = Jeweler::Generator.new github_repo_name, options
|
56
|
+
generator.run
|
57
|
+
rescue Jeweler::NoGitUserName
|
58
|
+
$stderr.puts %Q{No user.name found in ~/.gitconfig. Please tell git about yourself (see http://github.com/guides/tell-git-your-user-name-and-email-address for details). For example: git config --global user.name "mad voo"}
|
59
|
+
exit 1
|
60
|
+
rescue Jeweler::NoGitUserEmail
|
61
|
+
$stderr.puts %Q{No user.email found in ~/.gitconfig. Please tell git about yourself (see http://github.com/guides/tell-git-your-user-name-and-email-address for details). For example: git config --global user.email mad.vooo@gmail.com}
|
62
|
+
exit 1
|
63
|
+
rescue Jeweler::NoGitHubUser
|
64
|
+
$stderr.puts %Q{No github.user found in ~/.gitconfig. Please tell git about your GitHub account (see http://github.com/blog/180-local-github-config for details). For example: git config --global github.user defunkt}
|
65
|
+
exit 1
|
66
|
+
rescue Jeweler::NoGitHubToken
|
67
|
+
$stderr.puts %Q{No github.token found in ~/.gitconfig. Please tell git about your GitHub account (see http://github.com/blog/180-local-github-config for details). For example: git config --global github.token 6ef8395fecf207165f1a82178ae1b984}
|
68
|
+
exit 1
|
69
|
+
rescue Jeweler::FileInTheWay
|
70
|
+
$stderr.puts "The directory #{github_repo_name} already exists. Maybe move it out of the way before continuing?"
|
71
|
+
exit 1
|
72
|
+
end
|
data/lib/jeweler/generator.rb
CHANGED
@@ -21,8 +21,9 @@ class Jeweler
|
|
21
21
|
end
|
22
22
|
|
23
23
|
class Generator
|
24
|
-
attr_accessor :target_dir, :user_name, :user_email,
|
25
|
-
:github_repo_name, :github_remote, :github_url,
|
24
|
+
attr_accessor :target_dir, :user_name, :user_email, :summary,
|
25
|
+
:github_repo_name, :github_remote, :github_url,
|
26
|
+
:github_username, :github_token,
|
26
27
|
:lib_dir, :constant_name, :file_name_prefix, :config, :test_style,
|
27
28
|
:repo, :should_create_repo
|
28
29
|
|
@@ -43,6 +44,7 @@ class Jeweler
|
|
43
44
|
self.constant_name = self.github_repo_name.split(/[-_]/).collect{|each| each.capitalize }.join
|
44
45
|
self.file_name_prefix = self.github_repo_name.gsub('-', '_')
|
45
46
|
self.should_create_repo = options[:create_repo]
|
47
|
+
self.summary = options[:summary] || 'TODO'
|
46
48
|
end
|
47
49
|
|
48
50
|
def run
|
@@ -96,19 +98,19 @@ class Jeweler
|
|
96
98
|
self.config = read_git_config
|
97
99
|
|
98
100
|
unless config.has_key? 'user.name'
|
99
|
-
raise NoGitUserName
|
101
|
+
raise NoGitUserName
|
100
102
|
end
|
101
103
|
|
102
104
|
unless config.has_key? 'user.email'
|
103
|
-
raise NoGitUserEmail
|
105
|
+
raise NoGitUserEmail
|
104
106
|
end
|
105
107
|
|
106
108
|
unless config.has_key? 'github.user'
|
107
|
-
raise NoGitHubUser
|
109
|
+
raise NoGitHubUser
|
108
110
|
end
|
109
111
|
|
110
112
|
unless config.has_key? 'github.token'
|
111
|
-
raise NoGitHubToken
|
113
|
+
raise NoGitHubToken
|
112
114
|
end
|
113
115
|
|
114
116
|
self.user_name = config['user.name']
|
@@ -161,6 +163,7 @@ class Jeweler
|
|
161
163
|
Net::HTTP.post_form URI.parse('http://github.com/repositories'),
|
162
164
|
'login' => github_username,
|
163
165
|
'token' => github_token,
|
166
|
+
'repository[description]' => summary,
|
164
167
|
'repository[name]' => github_repo_name
|
165
168
|
sleep 2
|
166
169
|
@repo.push('origin')
|
data/lib/jeweler.rb
CHANGED
@@ -23,6 +23,10 @@ class Jeweler
|
|
23
23
|
@gemspec.files = FileList["[A-Z]*.*", "{bin,generators,lib,test,spec}/**/*"]
|
24
24
|
end
|
25
25
|
|
26
|
+
@gemspec.has_rdoc = true
|
27
|
+
@gemspec.rdoc_options << '--inline-source' << '--charset=UTF-8'
|
28
|
+
@gemspec.extra_rdoc_files ||= FileList["[A-Z]*.*"]
|
29
|
+
|
26
30
|
if File.exists?(File.join(base_dir, '.git'))
|
27
31
|
@repo = Git.open(base_dir)
|
28
32
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/test_helper'
|
2
2
|
|
3
|
-
class
|
4
|
-
|
3
|
+
class TestGenerator < Test::Unit::TestCase
|
5
4
|
def self.should_create_directory(directory)
|
6
5
|
should "create #{directory} directory" do
|
7
6
|
assert File.exists?(File.join(@tmp_dir, directory))
|
@@ -75,6 +74,10 @@ class JewelerTest < Test::Unit::TestCase
|
|
75
74
|
assert_match 's.email = "bar@example.com"', @content
|
76
75
|
end
|
77
76
|
|
77
|
+
should "include the summary in the gem" do
|
78
|
+
assert_match %Q{s.summary = %Q{zomg, so good}}, @content
|
79
|
+
end
|
80
|
+
|
78
81
|
should "include the github repo's url as the gem's url" do
|
79
82
|
assert_match 's.homepage = "http://github.com/technicalpickles/the-perfect-gem"', @content
|
80
83
|
end
|
@@ -122,7 +125,7 @@ class JewelerTest < Test::Unit::TestCase
|
|
122
125
|
|
123
126
|
context "for generating technicalpickles's the-perfect-gem repo in 'tmp'" do
|
124
127
|
setup do
|
125
|
-
@generator = Jeweler::Generator.new('the-perfect-gem', :directory => @tmp_dir)
|
128
|
+
@generator = Jeweler::Generator.new('the-perfect-gem', :directory => @tmp_dir, :summary => 'zomg, so good')
|
126
129
|
end
|
127
130
|
|
128
131
|
should "use tmp for target directory" do
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/test_helper'
|
2
2
|
|
3
|
-
class
|
3
|
+
class TestJeweler < Test::Unit::TestCase
|
4
4
|
|
5
5
|
def setup
|
6
6
|
@now = Time.now
|
@@ -73,6 +73,20 @@ class JewelerTest < Test::Unit::TestCase
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
+
context "gemsepc's rdoc" do
|
77
|
+
should 'have be enabled' do
|
78
|
+
assert @jeweler.gemspec.has_rdoc
|
79
|
+
end
|
80
|
+
|
81
|
+
should 'do inline source' do
|
82
|
+
assert @jeweler.gemspec.rdoc_options.include?('--inline-source')
|
83
|
+
end
|
84
|
+
|
85
|
+
should 'be utf-8' do
|
86
|
+
assert @jeweler.gemspec.rdoc_options.include?('--charset=UTF-8')
|
87
|
+
end
|
88
|
+
|
89
|
+
end
|
76
90
|
|
77
91
|
context "writing the gemspec" do
|
78
92
|
setup do
|
@@ -1,10 +1,9 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/test_helper'
|
2
2
|
|
3
|
-
class
|
3
|
+
class TestVersion < Test::Unit::TestCase
|
4
4
|
|
5
5
|
VERSION_TMP_DIR = File.dirname(__FILE__) + '/version_tmp'
|
6
6
|
|
7
|
-
|
8
7
|
def self.should_have_version(major, minor, patch)
|
9
8
|
should "have major version #{major}" do
|
10
9
|
assert_equal major, @version.major
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: technicalpickles-jeweler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Nichols
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-01-
|
12
|
+
date: 2009-01-19 00:00:00 -08:00
|
13
13
|
default_executable: jeweler
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -31,6 +31,7 @@ extra_rdoc_files: []
|
|
31
31
|
|
32
32
|
files:
|
33
33
|
- ChangeLog.markdown
|
34
|
+
- LICENSE
|
34
35
|
- Rakefile
|
35
36
|
- README.markdown
|
36
37
|
- TODO
|
@@ -56,24 +57,26 @@ files:
|
|
56
57
|
- test/fixtures
|
57
58
|
- test/fixtures/bar
|
58
59
|
- test/fixtures/bar/VERSION.yml
|
59
|
-
- test/gemspec_test.rb
|
60
60
|
- test/generators
|
61
61
|
- test/generators/initialization_test.rb
|
62
|
-
- test/
|
63
|
-
- test/jeweler_test.rb
|
62
|
+
- test/jeweler
|
64
63
|
- test/shoulda_macros
|
65
64
|
- test/shoulda_macros/jeweler_macros.rb
|
66
|
-
- test/
|
65
|
+
- test/test_gemspec.rb
|
66
|
+
- test/test_generator.rb
|
67
67
|
- test/test_helper.rb
|
68
|
-
- test/
|
68
|
+
- test/test_jeweler.rb
|
69
|
+
- test/test_tasks.rb
|
70
|
+
- test/test_version.rb
|
69
71
|
- test/version_tmp
|
70
72
|
- test/version_tmp/VERSION.yml
|
71
73
|
- lib/jeweler/templates/.gitignore
|
72
|
-
has_rdoc:
|
74
|
+
has_rdoc: true
|
73
75
|
homepage: http://github.com/technicalpickles/jeweler
|
74
76
|
post_install_message:
|
75
|
-
rdoc_options:
|
76
|
-
|
77
|
+
rdoc_options:
|
78
|
+
- --inline-source
|
79
|
+
- --charset=UTF-8
|
77
80
|
require_paths:
|
78
81
|
- lib
|
79
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|