mcornick-jeweler 1.2.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/.gitignore +9 -0
- data/ChangeLog.markdown +111 -0
- data/LICENSE +20 -0
- data/README.markdown +185 -0
- data/ROADMAP +12 -0
- data/Rakefile +103 -0
- data/VERSION.yml +4 -0
- data/bin/jeweler +8 -0
- data/features/generator/cucumber.feature +83 -0
- data/features/generator/directory_layout.feature +76 -0
- data/features/generator/dotdocument.feature +14 -0
- data/features/generator/env_options.feature +9 -0
- data/features/generator/git.feature +94 -0
- data/features/generator/license.feature +11 -0
- data/features/generator/rakefile.feature +151 -0
- data/features/generator/readme.feature +12 -0
- data/features/generator/test.feature +41 -0
- data/features/generator/test_helper.feature +49 -0
- data/features/placeholder.feature +5 -0
- data/features/step_definitions/debug_steps.rb +6 -0
- data/features/step_definitions/filesystem_steps.rb +68 -0
- data/features/step_definitions/generator_steps.rb +284 -0
- data/features/step_definitions/task_steps.rb +6 -0
- data/features/support/env.rb +29 -0
- data/features/tasks/build_gem.feature +9 -0
- data/features/tasks/version.feature +24 -0
- data/features/tasks/version_bumping.feature +33 -0
- data/jeweler.gemspec +225 -0
- data/lib/jeweler.rb +153 -0
- data/lib/jeweler/commands.rb +14 -0
- data/lib/jeweler/commands/build_gem.rb +31 -0
- data/lib/jeweler/commands/check_dependencies.rb +52 -0
- data/lib/jeweler/commands/install_gem.rb +40 -0
- data/lib/jeweler/commands/release.rb +86 -0
- data/lib/jeweler/commands/release_to_rubyforge.rb +51 -0
- data/lib/jeweler/commands/setup_rubyforge.rb +57 -0
- data/lib/jeweler/commands/validate_gemspec.rb +30 -0
- data/lib/jeweler/commands/version/base.rb +41 -0
- data/lib/jeweler/commands/version/bump_major.rb +13 -0
- data/lib/jeweler/commands/version/bump_minor.rb +12 -0
- data/lib/jeweler/commands/version/bump_patch.rb +14 -0
- data/lib/jeweler/commands/version/write.rb +12 -0
- data/lib/jeweler/commands/write_gemspec.rb +39 -0
- data/lib/jeweler/errors.rb +20 -0
- data/lib/jeweler/gemspec_helper.rb +79 -0
- data/lib/jeweler/generator.rb +306 -0
- data/lib/jeweler/generator/application.rb +54 -0
- data/lib/jeweler/generator/bacon_mixin.rb +43 -0
- data/lib/jeweler/generator/micronaut_mixin.rb +41 -0
- data/lib/jeweler/generator/minitest_mixin.rb +42 -0
- data/lib/jeweler/generator/options.rb +102 -0
- data/lib/jeweler/generator/rdoc_mixin.rb +9 -0
- data/lib/jeweler/generator/rspec_mixin.rb +42 -0
- data/lib/jeweler/generator/shoulda_mixin.rb +42 -0
- data/lib/jeweler/generator/testunit_mixin.rb +39 -0
- data/lib/jeweler/generator/yard_mixin.rb +14 -0
- data/lib/jeweler/rubyforge_tasks.rb +98 -0
- data/lib/jeweler/specification.rb +66 -0
- data/lib/jeweler/tasks.rb +135 -0
- data/lib/jeweler/templates/.document +5 -0
- data/lib/jeweler/templates/.gitignore +5 -0
- data/lib/jeweler/templates/LICENSE +20 -0
- data/lib/jeweler/templates/README.rdoc +18 -0
- data/lib/jeweler/templates/Rakefile +153 -0
- data/lib/jeweler/templates/bacon/flunking.rb +7 -0
- data/lib/jeweler/templates/bacon/helper.rb +8 -0
- data/lib/jeweler/templates/features/default.feature +9 -0
- data/lib/jeweler/templates/features/support/env.rb +8 -0
- data/lib/jeweler/templates/micronaut/flunking.rb +7 -0
- data/lib/jeweler/templates/micronaut/helper.rb +17 -0
- data/lib/jeweler/templates/minitest/flunking.rb +7 -0
- data/lib/jeweler/templates/minitest/helper.rb +11 -0
- data/lib/jeweler/templates/rspec/flunking.rb +7 -0
- data/lib/jeweler/templates/rspec/helper.rb +10 -0
- data/lib/jeweler/templates/shoulda/flunking.rb +7 -0
- data/lib/jeweler/templates/shoulda/helper.rb +10 -0
- data/lib/jeweler/templates/testunit/flunking.rb +7 -0
- data/lib/jeweler/templates/testunit/helper.rb +9 -0
- data/lib/jeweler/version_helper.rb +128 -0
- data/test/fixtures/bar/VERSION.yml +4 -0
- data/test/fixtures/bar/bin/foo_the_ultimate_bin +1 -0
- data/test/fixtures/bar/hey_include_me_in_gemspec +0 -0
- data/test/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -0
- data/test/fixtures/existing-project-with-version-plaintext/.document +5 -0
- data/test/fixtures/existing-project-with-version-plaintext/.gitignore +5 -0
- data/test/fixtures/existing-project-with-version-plaintext/LICENSE +20 -0
- data/test/fixtures/existing-project-with-version-plaintext/README.rdoc +7 -0
- data/test/fixtures/existing-project-with-version-plaintext/Rakefile +82 -0
- data/test/fixtures/existing-project-with-version-plaintext/VERSION +1 -0
- data/test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec +29 -0
- data/test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb +0 -0
- data/test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb +7 -0
- data/test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb +10 -0
- data/test/fixtures/existing-project-with-version-yaml/.document +5 -0
- data/test/fixtures/existing-project-with-version-yaml/.gitignore +5 -0
- data/test/fixtures/existing-project-with-version-yaml/LICENSE +20 -0
- data/test/fixtures/existing-project-with-version-yaml/README.rdoc +7 -0
- data/test/fixtures/existing-project-with-version-yaml/Rakefile +82 -0
- data/test/fixtures/existing-project-with-version-yaml/VERSION.yml +4 -0
- data/test/fixtures/existing-project-with-version-yaml/bin/foo_the_ultimate_bin +0 -0
- data/test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec +29 -0
- data/test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb +0 -0
- data/test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb +7 -0
- data/test/fixtures/existing-project-with-version-yaml/test/test_helper.rb +10 -0
- data/test/geminstaller.yml +12 -0
- data/test/jeweler/commands/test_build_gem.rb +72 -0
- data/test/jeweler/commands/test_install_gem.rb +74 -0
- data/test/jeweler/commands/test_release.rb +362 -0
- data/test/jeweler/commands/test_release_to_rubyforge.rb +157 -0
- data/test/jeweler/commands/test_setup_rubyforge.rb +182 -0
- data/test/jeweler/commands/test_validate_gemspec.rb +27 -0
- data/test/jeweler/commands/test_write_gemspec.rb +92 -0
- data/test/jeweler/commands/version/test_base.rb +32 -0
- data/test/jeweler/commands/version/test_bump_major.rb +22 -0
- data/test/jeweler/commands/version/test_bump_minor.rb +19 -0
- data/test/jeweler/commands/version/test_bump_patch.rb +20 -0
- data/test/jeweler/commands/version/test_write.rb +23 -0
- data/test/shoulda_macros/jeweler_macros.rb +35 -0
- data/test/test_application.rb +139 -0
- data/test/test_gemspec_helper.rb +40 -0
- data/test/test_generator.rb +166 -0
- data/test/test_generator_initialization.rb +156 -0
- data/test/test_generator_mixins.rb +18 -0
- data/test/test_helper.rb +159 -0
- data/test/test_jeweler.rb +174 -0
- data/test/test_options.rb +149 -0
- data/test/test_specification.rb +61 -0
- data/test/test_tasks.rb +35 -0
- data/test/test_version_helper.rb +153 -0
- metadata +283 -0
data/.gitignore
ADDED
data/ChangeLog.markdown
ADDED
@@ -0,0 +1,111 @@
|
|
1
|
+
# jeweler 1.2.0 2009-08-06
|
2
|
+
* Generator now adds development dependencies appropriate to your testing framework
|
3
|
+
* Added check_dependencies tasks for verifying gem dependencies are installed
|
4
|
+
* Fixed typo in generated yard task
|
5
|
+
* Fixed generator from having a lot of extra newlines
|
6
|
+
|
7
|
+
# jeweler 1.1.0 2009-08-05
|
8
|
+
|
9
|
+
* Support for generating a project that uses yard instead of rdoc
|
10
|
+
* Generated gemspec now includes comments about it being generated by jeweler
|
11
|
+
* Only use sudo for installing on non-windows platforms [#1]
|
12
|
+
* Fixed rake release to be repeatable on the same version [#16]
|
13
|
+
* Fixed rake rubyforge:setup to not create duplicate packages
|
14
|
+
* Use a more recent version of ruby-git
|
15
|
+
* Fixes various issues with reading values out of ~/.gitconfig [#26] [#21] [#19]
|
16
|
+
* Experimenting with a rake task to check development time dependencies [#22]
|
17
|
+
* Fixed generated rdoc task to load from VERSION instead of VERSION.yml
|
18
|
+
|
19
|
+
# jeweler 1.0.2 2009-07-29
|
20
|
+
|
21
|
+
* Don't include git ignored files for default gemspec's files and test_files
|
22
|
+
* Fixed rspec generator to allow specs to be run directly
|
23
|
+
* Removed misleading docstring for version_required rake task [#17]
|
24
|
+
* Includes some notes about contributed in generated README
|
25
|
+
* Added support for generating a project to use reek and roodi
|
26
|
+
|
27
|
+
# jeweler 1.0.1 2009-05-15
|
28
|
+
|
29
|
+
# jeweler 0.11.1
|
30
|
+
|
31
|
+
* Lots of internal refactorings to how project generation happens
|
32
|
+
* Fixed missing dependency on rubyforge
|
33
|
+
* Depend on a recent version of schacon-git which works on ruby 1.9
|
34
|
+
* Updated cucumber support for 0.3.x
|
35
|
+
* Tested on Ruby 1.9
|
36
|
+
|
37
|
+
# jeweler 0.11.0 2009-04-05
|
38
|
+
|
39
|
+
* generator will respect JEWELER_OPTS, as a way to provide default options
|
40
|
+
(pat-maddox)
|
41
|
+
* Include 'examples' and 'rails' directories by default in gemspec files
|
42
|
+
* generated gemspec now will only include files (not directories). also, they are listed one per line, and sorted.
|
43
|
+
* Jeweler::Tasks's intializer has been improved:
|
44
|
+
* You can now pass it an existing gemspec (othewise a new one will be created)
|
45
|
+
* Jeweler sets its defaults before yielding the gemspec to you. This allows you to append to its defaults, so you aren't forced to entirely overwrite them just to add one value.
|
46
|
+
* Managing a gemspec's files, test_files, and extra_rdoc_files is now more flexible. They are now wrapped in a FileList, so you can easily 'include' or 'exclude' patterns.
|
47
|
+
|
48
|
+
# jeweler 0.10.2 2009-03-26
|
49
|
+
|
50
|
+
* 'rake install' now will 'rake build' first
|
51
|
+
* Support for releasing to RubyForge, thanks to jtrupiano
|
52
|
+
* Steps towards Ruby 1.9 support, thanks to rsanheim
|
53
|
+
|
54
|
+
# jeweler 0.9.1 2009-03-05
|
55
|
+
|
56
|
+
* Tasks:
|
57
|
+
* Fixed populating default spec's extra_rdoc_files
|
58
|
+
* Removed redudant gem building/installing tasks. Use rake build and rake install
|
59
|
+
* Generator:
|
60
|
+
* Added support for micronaut
|
61
|
+
* Generate nicer block variable names in Rakefile
|
62
|
+
* Cucumber generation now places steps in features/step_features, to follow cucumber standards
|
63
|
+
|
64
|
+
* shoulda and test/unit test_helpers no longers require mocha
|
65
|
+
* Rakefile uses more readable block variable names
|
66
|
+
* .gitignore now includes pkg and coverage directories
|
67
|
+
* Avoid puts'ing in Rakefile when LoadError occurs. Instead, define a task that aborts with instructions to install.
|
68
|
+
* Cucumber is now optional. Generate stories using --cucumber
|
69
|
+
* Bacon's 'test' task is now 'spec'
|
70
|
+
* Generate README.rdoc instead of just a plain text README
|
71
|
+
* Updated year in README.rdoc and COPYRIGHT to be based on the current year instead of hardcoded
|
72
|
+
|
73
|
+
# jeweler 0.8.1 2009-02-03
|
74
|
+
|
75
|
+
* Fixed minitest generator
|
76
|
+
|
77
|
+
# jeweler 0.8.0 2009-02-03
|
78
|
+
|
79
|
+
* Generator:
|
80
|
+
* Supports these new testing frameworks:
|
81
|
+
* test/unit
|
82
|
+
* minitest
|
83
|
+
* rspec
|
84
|
+
* Added support for cucumber
|
85
|
+
* Creating a new gem is now more verbose, and will show files/directories created
|
86
|
+
* Binaries will now be automatically detected in 'bin'
|
87
|
+
|
88
|
+
# jeweler 0.7.2 2009-01-29
|
89
|
+
|
90
|
+
* Added rake task 'version:bump' which is shorthand for 'version:bump:patch'
|
91
|
+
* Generated projects no longer assume RCov is installed.
|
92
|
+
|
93
|
+
# jeweler 0.7.1 2009-01-26
|
94
|
+
|
95
|
+
* Fixed yaml not being required
|
96
|
+
* Automatically add files in bin as executables in gemspec
|
97
|
+
|
98
|
+
# jeweler 0.7.0 2009-01-19
|
99
|
+
|
100
|
+
* Added support to generator for specifying a description
|
101
|
+
* Condensed README.markdown to be less novel-like
|
102
|
+
* RDoc is now included in your gemspec
|
103
|
+
* Rescue errors that raise in the generator, and display better error message, and exit with a non-zero exit status
|
104
|
+
|
105
|
+
# jeweler 0.6.5 2009-01-14
|
106
|
+
|
107
|
+
* `jeweler --create-repo foo` now enables gem creation in addition to creating the repository
|
108
|
+
|
109
|
+
# jeweler 0.6.4 2009-01-13
|
110
|
+
|
111
|
+
* 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
ADDED
@@ -0,0 +1,185 @@
|
|
1
|
+
# Jeweler: Craft the perfect RubyGem
|
2
|
+
|
3
|
+
Jeweler provides two things:
|
4
|
+
|
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
|
7
|
+
|
8
|
+
## Quick Links
|
9
|
+
|
10
|
+
* [Wiki](http://wiki.github.com/technicalpickles/jeweler)
|
11
|
+
* [Bugs](http://github.com/technicalpickles/jeweler/issues)
|
12
|
+
* [Donate](http://pledgie.org/campaigns/2604)
|
13
|
+
|
14
|
+
## Installing
|
15
|
+
|
16
|
+
# Install the gem:
|
17
|
+
sudo gem install jeweler
|
18
|
+
|
19
|
+
## Using in an existing project
|
20
|
+
|
21
|
+
It's easy to get up and running. Update your Rakefile to instantiate a `Jeweler::Tasks`, and give it a block with details about your project.
|
22
|
+
|
23
|
+
begin
|
24
|
+
require 'jeweler'
|
25
|
+
Jeweler::Tasks.new do |gemspec|
|
26
|
+
gemspec.name = "the-perfect-gem"
|
27
|
+
gemspec.summary = "Summarize your gem"
|
28
|
+
gemspec.description = "Describe your gem"
|
29
|
+
gemspec.email = "josh@technicalpickles.com"
|
30
|
+
gemspec.homepage = "http://github.com/technicalpickles/the-perfect-gem"
|
31
|
+
gemspec.description = "TODO"
|
32
|
+
gemspec.authors = ["Josh Nichols"]
|
33
|
+
end
|
34
|
+
rescue LoadError
|
35
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
36
|
+
end
|
37
|
+
|
38
|
+
The yield object here, `gemspec`, is a `Gem::Specification` object. See the [Customizing your project's gem specification](http://wiki.github.com/technicalpickles/jeweler/customizing-your-projects-gem-specification) for more details about how you can customize your gemspec.
|
39
|
+
|
40
|
+
## Using to start a new project
|
41
|
+
|
42
|
+
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).
|
43
|
+
|
44
|
+
jeweler the-perfect-gem
|
45
|
+
|
46
|
+
This will prepare a project in the 'the-perfect-gem' directory, setup to use Jeweler.
|
47
|
+
|
48
|
+
It supports a number of options:
|
49
|
+
|
50
|
+
* --create-repo: in addition to preparing a project, it create an repo up on GitHub and enable RubyGem generation
|
51
|
+
* --testunit: generate test_helper.rb and test ready for test/unit
|
52
|
+
* --minitest: generate test_helper.rb and test ready for minitest
|
53
|
+
* --shoulda: generate test_helper.rb and test ready for shoulda (this is the default)
|
54
|
+
* --rspec: generate spec_helper.rb and spec ready for rspec
|
55
|
+
* --bacon: generate spec_helper.rb and spec ready for bacon
|
56
|
+
* --gemcutter: setup releasing to gemcutter
|
57
|
+
* --rubyforge: setup releasing to rubyforge
|
58
|
+
|
59
|
+
### Default options
|
60
|
+
|
61
|
+
Jeweler respects the JEWELER_OPTS environment variable. Want to always use RSpec, and you're using bash? Add this to ~/.bashrc:
|
62
|
+
|
63
|
+
export JEWELER_OPTS="--rspec"
|
64
|
+
|
65
|
+
## Gemspec
|
66
|
+
|
67
|
+
Jeweler handles generating a gemspec file for your project:
|
68
|
+
|
69
|
+
rake gemspec
|
70
|
+
|
71
|
+
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.
|
72
|
+
|
73
|
+
## Gem
|
74
|
+
|
75
|
+
Jeweler gives you tasks for building and installing your gem:
|
76
|
+
|
77
|
+
rake build
|
78
|
+
rake install
|
79
|
+
|
80
|
+
## Versioning
|
81
|
+
|
82
|
+
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.
|
83
|
+
|
84
|
+
Initially, your project starts out at 0.0.0. Jeweler provides Rake tasks for bumping the version:
|
85
|
+
|
86
|
+
rake version:bump:major
|
87
|
+
rake version:bump:minor
|
88
|
+
rake version:bump:patch
|
89
|
+
|
90
|
+
## Releasing to GitHub
|
91
|
+
|
92
|
+
Jeweler handles releasing your gem into the wild:
|
93
|
+
|
94
|
+
rake release
|
95
|
+
|
96
|
+
It does the following for you:
|
97
|
+
|
98
|
+
* Regenerate the gemspec to the latest version of your project
|
99
|
+
* Push to GitHub (which results in a gem being build)
|
100
|
+
* Tag the version and push to GitHub
|
101
|
+
|
102
|
+
## Releasing to Gemcutter
|
103
|
+
|
104
|
+
Jeweler can also handle releasing to [Gemcutter](http://gemcutter.org). There are a few steps you need to do before doing any Gemcutter releases with Jeweler:
|
105
|
+
|
106
|
+
* [Create an account on Gemcutter](http://gemcutter.org/sign_up)
|
107
|
+
* Install the Gemcutter gem: sudo gem install gemcutter
|
108
|
+
* Run 'gemcutter tumble' to set up gemcutter
|
109
|
+
|
110
|
+
With all that setup out of the way, you can now release to Gemcutter with impunity. This would release the current version of your gem.
|
111
|
+
|
112
|
+
$ rake gemcutter:release
|
113
|
+
|
114
|
+
## Releasing to RubyForge
|
115
|
+
|
116
|
+
Jeweler can also handle releasing to [RubyForge](http://rubyforge.org). There are a few steps you need to do before doing any RubyForge releases with Jeweler:
|
117
|
+
|
118
|
+
* [Create an account on RubyForge](http://rubyforge.org/account/register.php)
|
119
|
+
* Request a project on RubyForge. This involves waiting for a project approval, which can take any amount of time from a few hours to a week
|
120
|
+
* You might want to create an umbrella project where you can publish your gems, instead of one project per gem
|
121
|
+
* Install the RubyForge gem: sudo gem install rubyforge
|
122
|
+
* Run 'rubyforge setup' and fill in your username and password for RubyForge
|
123
|
+
* Run 'rubyforge config' to pull down information about your projects
|
124
|
+
* Run 'rubyforge login' to make sure you are able to login
|
125
|
+
|
126
|
+
With this in place, you now update your Jeweler::Tasks to setup `rubyforge_project` with the RubyForge project you've just created. (Note, using `jeweler --rubyforge` when generating the project does this for you automatically.)
|
127
|
+
|
128
|
+
begin
|
129
|
+
require 'jeweler'
|
130
|
+
Jeweler::Tasks.new do |s|
|
131
|
+
s.name = "the-perfect-gem"
|
132
|
+
s.summary = "TODO"
|
133
|
+
s.description = "TODO"
|
134
|
+
s.email = "josh@technicalpickles.com"
|
135
|
+
s.homepage = "http://github.com/technicalpickles/the-perfect-gem"
|
136
|
+
s.description = "TODO"
|
137
|
+
s.authors = ["Josh Nichols"]
|
138
|
+
s.rubyforge_project = 'the-perfect-gem' # This line would be new
|
139
|
+
end
|
140
|
+
rescue LoadError
|
141
|
+
puts "Jeweler not available. Install it with: sudo gem install jeweler"
|
142
|
+
end
|
143
|
+
|
144
|
+
# These are new tasks
|
145
|
+
begin
|
146
|
+
require 'rake/contrib/sshpublisher'
|
147
|
+
namespace :rubyforge do
|
148
|
+
|
149
|
+
desc "Release gem and RDoc documentation to RubyForge"
|
150
|
+
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
|
151
|
+
|
152
|
+
namespace :release do
|
153
|
+
desc "Publish RDoc to RubyForge."
|
154
|
+
task :docs => [:rdoc] do
|
155
|
+
config = YAML.load(
|
156
|
+
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
|
157
|
+
)
|
158
|
+
|
159
|
+
host = "#{config['username']}@rubyforge.org"
|
160
|
+
remote_dir = "/var/www/gforge-projects/the-perfect-gem/"
|
161
|
+
local_dir = 'rdoc'
|
162
|
+
|
163
|
+
Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
rescue LoadError
|
168
|
+
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
169
|
+
end
|
170
|
+
|
171
|
+
Now you must initially create a 'package' for your gem in your 'project':
|
172
|
+
|
173
|
+
$ rake rubyforge:setup
|
174
|
+
|
175
|
+
With all that setup out of the way, you can now release to RubyForge with impunity. This would release the current version of your gem, and upload the rdoc as your project's webpage.
|
176
|
+
|
177
|
+
$ rake rubyforge:release
|
178
|
+
|
179
|
+
## Workflow
|
180
|
+
|
181
|
+
* Hack, commit, hack, commit, etc, etc
|
182
|
+
* `rake version:bump:patch release` to do the actual version bump and release
|
183
|
+
* Have a delicious scotch
|
184
|
+
* Install [gemstalker](http://github.com/technicalpickles/gemstalker), and use it to know when gem is built. It typically builds in a few minutes, but won't be installable for another 15 minutes.
|
185
|
+
|
data/ROADMAP
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
= 1.0
|
2
|
+
|
3
|
+
* Improve documentation on wiki/readme
|
4
|
+
|
5
|
+
= Unscheduled, or waiting for contributions
|
6
|
+
|
7
|
+
* Add command to output the Jeweler::Tasks to help with upgrading/migrating
|
8
|
+
* Support github user/token on generator command line
|
9
|
+
* Support C extensions
|
10
|
+
* Support JRuby gems
|
11
|
+
* Support thor
|
12
|
+
* Dealing with version bumps in other remotes
|
data/Rakefile
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
require 'rake'
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift('lib')
|
4
|
+
|
5
|
+
gem 'git'
|
6
|
+
require 'git'
|
7
|
+
|
8
|
+
begin
|
9
|
+
require 'jeweler'
|
10
|
+
Jeweler::Tasks.new do |gem|
|
11
|
+
gem.name = "jeweler"
|
12
|
+
gem.summary = "Simple and opinionated helper for creating Rubygem projects on GitHub"
|
13
|
+
gem.email = "josh@technicalpickles.com"
|
14
|
+
gem.homepage = "http://github.com/technicalpickles/jeweler"
|
15
|
+
gem.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
|
16
|
+
gem.authors = ["Josh Nichols"]
|
17
|
+
gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
|
18
|
+
|
19
|
+
gem.add_dependency "git", ">= 1.2.1"
|
20
|
+
gem.add_dependency "rubyforge"
|
21
|
+
|
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::GemcutterTasks.new
|
32
|
+
|
33
|
+
Jeweler::RubyforgeTasks.new do |t|
|
34
|
+
t.doc_task = :yardoc
|
35
|
+
end
|
36
|
+
rescue LoadError
|
37
|
+
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
require 'rake/testtask'
|
42
|
+
Rake::TestTask.new(:test) do |test|
|
43
|
+
test.test_files = FileList.new('test/**/test_*.rb') do |list|
|
44
|
+
list.exclude 'test/test_helper.rb'
|
45
|
+
end
|
46
|
+
test.libs << 'test'
|
47
|
+
test.verbose = true
|
48
|
+
end
|
49
|
+
|
50
|
+
begin
|
51
|
+
require 'yard'
|
52
|
+
YARD::Rake::YardocTask.new(:yardoc) do |t|
|
53
|
+
t.files = FileList['lib/**/*.rb'].exclude('lib/jeweler/templates/**/*.rb')
|
54
|
+
end
|
55
|
+
rescue LoadError
|
56
|
+
task :yardoc do
|
57
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
|
62
|
+
begin
|
63
|
+
require 'rcov/rcovtask'
|
64
|
+
Rcov::RcovTask.new(:rcov) do |rcov|
|
65
|
+
rcov.libs << 'test'
|
66
|
+
rcov.pattern = 'test/**/test_*.rb'
|
67
|
+
end
|
68
|
+
rescue LoadError
|
69
|
+
task :rcov do
|
70
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
begin
|
75
|
+
require 'cucumber/rake/task'
|
76
|
+
Cucumber::Rake::Task.new(:features) do |features|
|
77
|
+
features.cucumber_opts = "features --format progress"
|
78
|
+
end
|
79
|
+
namespace :features do
|
80
|
+
Cucumber::Rake::Task.new(:pretty) do |features|
|
81
|
+
features.cucumber_opts = "features --format progress"
|
82
|
+
end
|
83
|
+
end
|
84
|
+
rescue LoadError
|
85
|
+
task :features do
|
86
|
+
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
87
|
+
end
|
88
|
+
namespace :features do
|
89
|
+
task :pretty do
|
90
|
+
abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
if ENV["RUN_CODE_RUN"] == "true"
|
96
|
+
task :default => [:test, :features]
|
97
|
+
else
|
98
|
+
task :default => :test
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
task :test => :check_dependencies
|
103
|
+
task :features => :check_dependencies
|
data/VERSION.yml
ADDED