juwelier 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +2 -0
- data/.document +8 -0
- data/.semver +5 -0
- data/.travis.yml +7 -0
- data/.yardopts +2 -0
- data/ChangeLog.markdown +230 -0
- data/Gemfile +40 -0
- data/LICENSE.txt +20 -0
- data/README.markdown +252 -0
- data/Rakefile +78 -0
- data/bin/juwelier +9 -0
- data/features/generator/cucumber.feature +103 -0
- data/features/generator/directory_layout.feature +86 -0
- data/features/generator/dotdocument.feature +13 -0
- data/features/generator/env_options.feature +9 -0
- data/features/generator/gemfile.feature +81 -0
- data/features/generator/git.feature +102 -0
- data/features/generator/license.feature +20 -0
- data/features/generator/rakefile.feature +158 -0
- data/features/generator/readme.feature +12 -0
- data/features/generator/test.feature +54 -0
- data/features/generator/test_helper.feature +149 -0
- data/features/placeholder.feature +5 -0
- data/features/step_definitions/debug_steps.rb +6 -0
- data/features/step_definitions/filesystem_steps.rb +70 -0
- data/features/step_definitions/generator_steps.rb +387 -0
- data/features/step_definitions/task_steps.rb +6 -0
- data/features/support/env.rb +41 -0
- data/features/tasks/build_gem.feature +9 -0
- data/features/tasks/version.feature +31 -0
- data/features/tasks/version_bumping.feature +49 -0
- data/juwelier.gemspec +241 -0
- data/lib/juwelier.rb +178 -0
- data/lib/juwelier/commands.rb +20 -0
- data/lib/juwelier/commands/build_gem.rb +40 -0
- data/lib/juwelier/commands/check_dependencies.rb +66 -0
- data/lib/juwelier/commands/install_gem.rb +31 -0
- data/lib/juwelier/commands/release_gemspec.rb +87 -0
- data/lib/juwelier/commands/release_to_git.rb +64 -0
- data/lib/juwelier/commands/release_to_rubygems.rb +28 -0
- data/lib/juwelier/commands/validate_gemspec.rb +30 -0
- data/lib/juwelier/commands/version/base.rb +55 -0
- data/lib/juwelier/commands/version/bump_major.rb +13 -0
- data/lib/juwelier/commands/version/bump_minor.rb +12 -0
- data/lib/juwelier/commands/version/bump_patch.rb +14 -0
- data/lib/juwelier/commands/version/write.rb +12 -0
- data/lib/juwelier/commands/write_gemspec.rb +39 -0
- data/lib/juwelier/errors.rb +8 -0
- data/lib/juwelier/gemcutter_tasks.rb +8 -0
- data/lib/juwelier/gemspec_helper.rb +87 -0
- data/lib/juwelier/generator.rb +304 -0
- data/lib/juwelier/generator/application.rb +63 -0
- data/lib/juwelier/generator/bacon_mixin.rb +43 -0
- data/lib/juwelier/generator/github_mixin.rb +22 -0
- data/lib/juwelier/generator/micronaut_mixin.rb +41 -0
- data/lib/juwelier/generator/minitest_mixin.rb +42 -0
- data/lib/juwelier/generator/options.rb +172 -0
- data/lib/juwelier/generator/rdoc_mixin.rb +13 -0
- data/lib/juwelier/generator/riot_mixin.rb +42 -0
- data/lib/juwelier/generator/rspec_mixin.rb +42 -0
- data/lib/juwelier/generator/shindo_mixin.rb +44 -0
- data/lib/juwelier/generator/shoulda_mixin.rb +42 -0
- data/lib/juwelier/generator/testspec_mixin.rb +42 -0
- data/lib/juwelier/generator/testunit_mixin.rb +39 -0
- data/lib/juwelier/generator/yard_mixin.rb +15 -0
- data/lib/juwelier/rubyforge_tasks.rb +95 -0
- data/lib/juwelier/rubygems_dot_org_tasks.rb +38 -0
- data/lib/juwelier/rubygems_tasks.rb +38 -0
- data/lib/juwelier/specification.rb +110 -0
- data/lib/juwelier/tasks.rb +239 -0
- data/lib/juwelier/templates/.document +5 -0
- data/lib/juwelier/templates/.gitignore +49 -0
- data/lib/juwelier/templates/Gemfile +12 -0
- data/lib/juwelier/templates/LICENSE.txt +20 -0
- data/lib/juwelier/templates/README.rdoc +19 -0
- data/lib/juwelier/templates/Rakefile +9 -0
- data/lib/juwelier/templates/bacon/flunking.rb +7 -0
- data/lib/juwelier/templates/bacon/helper.rb +10 -0
- data/lib/juwelier/templates/bundler_setup.erb +10 -0
- data/lib/juwelier/templates/features/default.feature +9 -0
- data/lib/juwelier/templates/features/support/env.rb +11 -0
- data/lib/juwelier/templates/juwelier_tasks.erb +31 -0
- data/lib/juwelier/templates/micronaut/flunking.rb +7 -0
- data/lib/juwelier/templates/micronaut/helper.rb +19 -0
- data/lib/juwelier/templates/minitest/flunking.rb +7 -0
- data/lib/juwelier/templates/minitest/helper.rb +13 -0
- data/lib/juwelier/templates/other_tasks.erb +70 -0
- data/lib/juwelier/templates/riot/flunking.rb +11 -0
- data/lib/juwelier/templates/riot/helper.rb +5 -0
- data/lib/juwelier/templates/rspec/.rspec +1 -0
- data/lib/juwelier/templates/rspec/flunking.rb +7 -0
- data/lib/juwelier/templates/rspec/helper.rb +14 -0
- data/lib/juwelier/templates/shindo/flunking.rb +8 -0
- data/lib/juwelier/templates/shindo/helper.rb +7 -0
- data/lib/juwelier/templates/shoulda/flunking.rb +7 -0
- data/lib/juwelier/templates/shoulda/helper.rb +12 -0
- data/lib/juwelier/templates/simplecov.erb +16 -0
- data/lib/juwelier/templates/testspec/flunking.rb +7 -0
- data/lib/juwelier/templates/testspec/helper.rb +7 -0
- data/lib/juwelier/templates/testunit/flunking.rb +7 -0
- data/lib/juwelier/templates/testunit/helper.rb +11 -0
- data/lib/juwelier/version.rb +10 -0
- data/lib/juwelier/version_helper.rb +141 -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-constant/.document +5 -0
- data/test/fixtures/existing-project-with-version-constant/.gitignore +5 -0
- data/test/fixtures/existing-project-with-version-constant/LICENSE.txt +20 -0
- data/test/fixtures/existing-project-with-version-constant/README.rdoc +7 -0
- data/test/fixtures/existing-project-with-version-constant/Rakefile +85 -0
- data/test/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec +29 -0
- data/test/fixtures/existing-project-with-version-constant/lib/existing_project_with_version.rb +0 -0
- data/test/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb +7 -0
- data/test/fixtures/existing-project-with-version-constant/test/test_helper.rb +10 -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.txt +20 -0
- data/test/fixtures/existing-project-with-version-plaintext/README.rdoc +7 -0
- data/test/fixtures/existing-project-with-version-plaintext/Rakefile +84 -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.txt +20 -0
- data/test/fixtures/existing-project-with-version-yaml/README.rdoc +7 -0
- data/test/fixtures/existing-project-with-version-yaml/Rakefile +84 -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/juwelier/commands/test_build_gem.rb +112 -0
- data/test/juwelier/commands/test_install_gem.rb +35 -0
- data/test/juwelier/commands/test_release_to_gemcutter.rb +39 -0
- data/test/juwelier/commands/test_release_to_git.rb +271 -0
- data/test/juwelier/commands/test_release_to_github.rb +477 -0
- data/test/juwelier/commands/test_validate_gemspec.rb +27 -0
- data/test/juwelier/commands/test_write_gemspec.rb +103 -0
- data/test/juwelier/commands/version/test_base.rb +53 -0
- data/test/juwelier/commands/version/test_bump_major.rb +22 -0
- data/test/juwelier/commands/version/test_bump_minor.rb +19 -0
- data/test/juwelier/commands/version/test_bump_patch.rb +20 -0
- data/test/juwelier/commands/version/test_write.rb +22 -0
- data/test/juwelier/generator/test_application.rb +142 -0
- data/test/juwelier/generator/test_options.rb +227 -0
- data/test/juwelier/test_gemspec_helper.rb +44 -0
- data/test/juwelier/test_generator.rb +140 -0
- data/test/juwelier/test_generator_initialization.rb +150 -0
- data/test/juwelier/test_generator_mixins.rb +23 -0
- data/test/juwelier/test_specification.rb +245 -0
- data/test/juwelier/test_tasks.rb +50 -0
- data/test/juwelier/test_version_helper.rb +214 -0
- data/test/shoulda_macros/juwelier_macros.rb +35 -0
- data/test/test_helper.rb +174 -0
- data/test/test_juwelier.rb +177 -0
- metadata +396 -0
@@ -0,0 +1,49 @@
|
|
1
|
+
Feature: bumping version
|
2
|
+
|
3
|
+
Scenario: major version
|
4
|
+
Given a working directory
|
5
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
6
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
7
|
+
When I run "rake version:bump:major" in "existing-project-with-version-yaml"
|
8
|
+
Then the process should exit cleanly
|
9
|
+
And the updated version, 2.0.0, is displayed
|
10
|
+
|
11
|
+
Scenario: minor version
|
12
|
+
Given a working directory
|
13
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
14
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
15
|
+
When I run "rake version:bump:minor" in "existing-project-with-version-yaml"
|
16
|
+
Then the process should exit cleanly
|
17
|
+
And the updated version, 1.6.0, is displayed
|
18
|
+
|
19
|
+
Scenario: patch version
|
20
|
+
Given a working directory
|
21
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
22
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
23
|
+
When I run "rake version:bump:patch" in "existing-project-with-version-yaml"
|
24
|
+
Then the process should exit cleanly
|
25
|
+
And the updated version, 1.5.4, is displayed
|
26
|
+
|
27
|
+
Scenario: arbitrary version
|
28
|
+
Given a working directory
|
29
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
30
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
31
|
+
When I run "rake version:write MAJOR=3 MINOR=7 PATCH=1" in "existing-project-with-version-yaml"
|
32
|
+
Then the process should exit cleanly
|
33
|
+
And the updated version, 3.7.1, is displayed
|
34
|
+
|
35
|
+
Scenario: arbitrary version with a build version yaml
|
36
|
+
Given a working directory
|
37
|
+
And I use the existing project "existing-project-with-version-yaml" as a template
|
38
|
+
And "VERSION.yml" contains hash "{ :major => 1, :minor => 5, :patch => 3}"
|
39
|
+
When I run "rake version:write MAJOR=3 MINOR=7 PATCH=1 BUILD=2" in "existing-project-with-version-yaml"
|
40
|
+
Then the process should exit cleanly
|
41
|
+
And the updated version, 3.7.1.2, is displayed
|
42
|
+
|
43
|
+
Scenario: arbitrary version with a build version plaintext
|
44
|
+
Given a working directory
|
45
|
+
And I use the existing project "existing-project-with-version-plaintext" as a template
|
46
|
+
And "VERSION" contains "1.5.3"
|
47
|
+
When I run "rake version:write MAJOR=3 MINOR=7 PATCH=1 BUILD=2" in "existing-project-with-version-plaintext"
|
48
|
+
Then the process should exit cleanly
|
49
|
+
And the updated version, 3.7.1.2, is displayed
|
data/juwelier.gemspec
ADDED
@@ -0,0 +1,241 @@
|
|
1
|
+
# Generated by juwelier
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: juwelier 2.1.0 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "juwelier"
|
9
|
+
s.version = "2.1.0"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Fred Mitchell", "Josh Nichols", "Yusuke Murata"]
|
14
|
+
s.date = "2016-02-06"
|
15
|
+
s.description = "Simple and opinionated helper for creating Rubygem projects on GitHub"
|
16
|
+
s.email = ["fred.mitchell@gmx.de", "fred.mitchell@gmx.com", "info@muratayusuke.com"]
|
17
|
+
s.executables = ["juwelier"]
|
18
|
+
s.extra_rdoc_files = [
|
19
|
+
"ChangeLog.markdown",
|
20
|
+
"LICENSE.txt",
|
21
|
+
"README.markdown"
|
22
|
+
]
|
23
|
+
s.files = [
|
24
|
+
".coveralls.yml",
|
25
|
+
".document",
|
26
|
+
".semver",
|
27
|
+
".travis.yml",
|
28
|
+
".yardopts",
|
29
|
+
"ChangeLog.markdown",
|
30
|
+
"Gemfile",
|
31
|
+
"LICENSE.txt",
|
32
|
+
"README.markdown",
|
33
|
+
"Rakefile",
|
34
|
+
"bin/juwelier",
|
35
|
+
"features/generator/cucumber.feature",
|
36
|
+
"features/generator/directory_layout.feature",
|
37
|
+
"features/generator/dotdocument.feature",
|
38
|
+
"features/generator/env_options.feature",
|
39
|
+
"features/generator/gemfile.feature",
|
40
|
+
"features/generator/git.feature",
|
41
|
+
"features/generator/license.feature",
|
42
|
+
"features/generator/rakefile.feature",
|
43
|
+
"features/generator/readme.feature",
|
44
|
+
"features/generator/test.feature",
|
45
|
+
"features/generator/test_helper.feature",
|
46
|
+
"features/placeholder.feature",
|
47
|
+
"features/step_definitions/debug_steps.rb",
|
48
|
+
"features/step_definitions/filesystem_steps.rb",
|
49
|
+
"features/step_definitions/generator_steps.rb",
|
50
|
+
"features/step_definitions/task_steps.rb",
|
51
|
+
"features/support/env.rb",
|
52
|
+
"features/tasks/build_gem.feature",
|
53
|
+
"features/tasks/version.feature",
|
54
|
+
"features/tasks/version_bumping.feature",
|
55
|
+
"juwelier.gemspec",
|
56
|
+
"lib/juwelier.rb",
|
57
|
+
"lib/juwelier/commands.rb",
|
58
|
+
"lib/juwelier/commands/build_gem.rb",
|
59
|
+
"lib/juwelier/commands/check_dependencies.rb",
|
60
|
+
"lib/juwelier/commands/install_gem.rb",
|
61
|
+
"lib/juwelier/commands/release_gemspec.rb",
|
62
|
+
"lib/juwelier/commands/release_to_git.rb",
|
63
|
+
"lib/juwelier/commands/release_to_rubygems.rb",
|
64
|
+
"lib/juwelier/commands/validate_gemspec.rb",
|
65
|
+
"lib/juwelier/commands/version/base.rb",
|
66
|
+
"lib/juwelier/commands/version/bump_major.rb",
|
67
|
+
"lib/juwelier/commands/version/bump_minor.rb",
|
68
|
+
"lib/juwelier/commands/version/bump_patch.rb",
|
69
|
+
"lib/juwelier/commands/version/write.rb",
|
70
|
+
"lib/juwelier/commands/write_gemspec.rb",
|
71
|
+
"lib/juwelier/errors.rb",
|
72
|
+
"lib/juwelier/gemcutter_tasks.rb",
|
73
|
+
"lib/juwelier/gemspec_helper.rb",
|
74
|
+
"lib/juwelier/generator.rb",
|
75
|
+
"lib/juwelier/generator/application.rb",
|
76
|
+
"lib/juwelier/generator/bacon_mixin.rb",
|
77
|
+
"lib/juwelier/generator/github_mixin.rb",
|
78
|
+
"lib/juwelier/generator/micronaut_mixin.rb",
|
79
|
+
"lib/juwelier/generator/minitest_mixin.rb",
|
80
|
+
"lib/juwelier/generator/options.rb",
|
81
|
+
"lib/juwelier/generator/rdoc_mixin.rb",
|
82
|
+
"lib/juwelier/generator/riot_mixin.rb",
|
83
|
+
"lib/juwelier/generator/rspec_mixin.rb",
|
84
|
+
"lib/juwelier/generator/shindo_mixin.rb",
|
85
|
+
"lib/juwelier/generator/shoulda_mixin.rb",
|
86
|
+
"lib/juwelier/generator/testspec_mixin.rb",
|
87
|
+
"lib/juwelier/generator/testunit_mixin.rb",
|
88
|
+
"lib/juwelier/generator/yard_mixin.rb",
|
89
|
+
"lib/juwelier/rubyforge_tasks.rb",
|
90
|
+
"lib/juwelier/rubygems_dot_org_tasks.rb",
|
91
|
+
"lib/juwelier/rubygems_tasks.rb",
|
92
|
+
"lib/juwelier/specification.rb",
|
93
|
+
"lib/juwelier/tasks.rb",
|
94
|
+
"lib/juwelier/templates/.document",
|
95
|
+
"lib/juwelier/templates/.gitignore",
|
96
|
+
"lib/juwelier/templates/Gemfile",
|
97
|
+
"lib/juwelier/templates/LICENSE.txt",
|
98
|
+
"lib/juwelier/templates/README.rdoc",
|
99
|
+
"lib/juwelier/templates/Rakefile",
|
100
|
+
"lib/juwelier/templates/bacon/flunking.rb",
|
101
|
+
"lib/juwelier/templates/bacon/helper.rb",
|
102
|
+
"lib/juwelier/templates/bundler_setup.erb",
|
103
|
+
"lib/juwelier/templates/features/default.feature",
|
104
|
+
"lib/juwelier/templates/features/support/env.rb",
|
105
|
+
"lib/juwelier/templates/juwelier_tasks.erb",
|
106
|
+
"lib/juwelier/templates/micronaut/flunking.rb",
|
107
|
+
"lib/juwelier/templates/micronaut/helper.rb",
|
108
|
+
"lib/juwelier/templates/minitest/flunking.rb",
|
109
|
+
"lib/juwelier/templates/minitest/helper.rb",
|
110
|
+
"lib/juwelier/templates/other_tasks.erb",
|
111
|
+
"lib/juwelier/templates/riot/flunking.rb",
|
112
|
+
"lib/juwelier/templates/riot/helper.rb",
|
113
|
+
"lib/juwelier/templates/rspec/.rspec",
|
114
|
+
"lib/juwelier/templates/rspec/flunking.rb",
|
115
|
+
"lib/juwelier/templates/rspec/helper.rb",
|
116
|
+
"lib/juwelier/templates/shindo/flunking.rb",
|
117
|
+
"lib/juwelier/templates/shindo/helper.rb",
|
118
|
+
"lib/juwelier/templates/shoulda/flunking.rb",
|
119
|
+
"lib/juwelier/templates/shoulda/helper.rb",
|
120
|
+
"lib/juwelier/templates/simplecov.erb",
|
121
|
+
"lib/juwelier/templates/testspec/flunking.rb",
|
122
|
+
"lib/juwelier/templates/testspec/helper.rb",
|
123
|
+
"lib/juwelier/templates/testunit/flunking.rb",
|
124
|
+
"lib/juwelier/templates/testunit/helper.rb",
|
125
|
+
"lib/juwelier/version.rb",
|
126
|
+
"lib/juwelier/version_helper.rb",
|
127
|
+
"test/fixtures/bar/VERSION.yml",
|
128
|
+
"test/fixtures/bar/bin/foo_the_ultimate_bin",
|
129
|
+
"test/fixtures/bar/hey_include_me_in_gemspec",
|
130
|
+
"test/fixtures/bar/lib/foo_the_ultimate_lib.rb",
|
131
|
+
"test/fixtures/existing-project-with-version-constant/.document",
|
132
|
+
"test/fixtures/existing-project-with-version-constant/.gitignore",
|
133
|
+
"test/fixtures/existing-project-with-version-constant/LICENSE.txt",
|
134
|
+
"test/fixtures/existing-project-with-version-constant/README.rdoc",
|
135
|
+
"test/fixtures/existing-project-with-version-constant/Rakefile",
|
136
|
+
"test/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec",
|
137
|
+
"test/fixtures/existing-project-with-version-constant/lib/existing_project_with_version.rb",
|
138
|
+
"test/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb",
|
139
|
+
"test/fixtures/existing-project-with-version-constant/test/test_helper.rb",
|
140
|
+
"test/fixtures/existing-project-with-version-plaintext/.document",
|
141
|
+
"test/fixtures/existing-project-with-version-plaintext/.gitignore",
|
142
|
+
"test/fixtures/existing-project-with-version-plaintext/LICENSE.txt",
|
143
|
+
"test/fixtures/existing-project-with-version-plaintext/README.rdoc",
|
144
|
+
"test/fixtures/existing-project-with-version-plaintext/Rakefile",
|
145
|
+
"test/fixtures/existing-project-with-version-plaintext/VERSION",
|
146
|
+
"test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec",
|
147
|
+
"test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb",
|
148
|
+
"test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb",
|
149
|
+
"test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb",
|
150
|
+
"test/fixtures/existing-project-with-version-yaml/.document",
|
151
|
+
"test/fixtures/existing-project-with-version-yaml/.gitignore",
|
152
|
+
"test/fixtures/existing-project-with-version-yaml/LICENSE.txt",
|
153
|
+
"test/fixtures/existing-project-with-version-yaml/README.rdoc",
|
154
|
+
"test/fixtures/existing-project-with-version-yaml/Rakefile",
|
155
|
+
"test/fixtures/existing-project-with-version-yaml/VERSION.yml",
|
156
|
+
"test/fixtures/existing-project-with-version-yaml/bin/foo_the_ultimate_bin",
|
157
|
+
"test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec",
|
158
|
+
"test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb",
|
159
|
+
"test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb",
|
160
|
+
"test/fixtures/existing-project-with-version-yaml/test/test_helper.rb",
|
161
|
+
"test/geminstaller.yml",
|
162
|
+
"test/juwelier/commands/test_build_gem.rb",
|
163
|
+
"test/juwelier/commands/test_install_gem.rb",
|
164
|
+
"test/juwelier/commands/test_release_to_gemcutter.rb",
|
165
|
+
"test/juwelier/commands/test_release_to_git.rb",
|
166
|
+
"test/juwelier/commands/test_release_to_github.rb",
|
167
|
+
"test/juwelier/commands/test_validate_gemspec.rb",
|
168
|
+
"test/juwelier/commands/test_write_gemspec.rb",
|
169
|
+
"test/juwelier/commands/version/test_base.rb",
|
170
|
+
"test/juwelier/commands/version/test_bump_major.rb",
|
171
|
+
"test/juwelier/commands/version/test_bump_minor.rb",
|
172
|
+
"test/juwelier/commands/version/test_bump_patch.rb",
|
173
|
+
"test/juwelier/commands/version/test_write.rb",
|
174
|
+
"test/juwelier/generator/test_application.rb",
|
175
|
+
"test/juwelier/generator/test_options.rb",
|
176
|
+
"test/juwelier/test_gemspec_helper.rb",
|
177
|
+
"test/juwelier/test_generator.rb",
|
178
|
+
"test/juwelier/test_generator_initialization.rb",
|
179
|
+
"test/juwelier/test_generator_mixins.rb",
|
180
|
+
"test/juwelier/test_specification.rb",
|
181
|
+
"test/juwelier/test_tasks.rb",
|
182
|
+
"test/juwelier/test_version_helper.rb",
|
183
|
+
"test/shoulda_macros/juwelier_macros.rb",
|
184
|
+
"test/test_helper.rb",
|
185
|
+
"test/test_juwelier.rb"
|
186
|
+
]
|
187
|
+
s.homepage = "http://github.com/flajann2/juwelier"
|
188
|
+
s.licenses = ["MIT"]
|
189
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.0")
|
190
|
+
s.rubygems_version = "2.5.1"
|
191
|
+
s.summary = "Powerful and Opinionated tool for creating and managing RubyGem projects"
|
192
|
+
|
193
|
+
if s.respond_to? :specification_version then
|
194
|
+
s.specification_version = 4
|
195
|
+
|
196
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
197
|
+
s.add_runtime_dependency(%q<rake>, [">= 0"])
|
198
|
+
s.add_runtime_dependency(%q<git>, [">= 1.2.5"])
|
199
|
+
s.add_runtime_dependency(%q<nokogiri>, [">= 1.5.10"])
|
200
|
+
s.add_runtime_dependency(%q<github_api>, [">= 0"])
|
201
|
+
s.add_runtime_dependency(%q<highline>, [">= 1.6.15"])
|
202
|
+
s.add_runtime_dependency(%q<bundler>, [">= 1.0"])
|
203
|
+
s.add_runtime_dependency(%q<rdoc>, [">= 0"])
|
204
|
+
s.add_runtime_dependency(%q<builder>, [">= 0"])
|
205
|
+
s.add_development_dependency(%q<yard>, [">= 0.8.5"])
|
206
|
+
s.add_development_dependency(%q<bluecloth>, [">= 0"])
|
207
|
+
s.add_development_dependency(%q<cucumber>, [">= 1.1.4"])
|
208
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
209
|
+
s.add_development_dependency(%q<semver>, [">= 0"])
|
210
|
+
else
|
211
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
212
|
+
s.add_dependency(%q<git>, [">= 1.2.5"])
|
213
|
+
s.add_dependency(%q<nokogiri>, [">= 1.5.10"])
|
214
|
+
s.add_dependency(%q<github_api>, [">= 0"])
|
215
|
+
s.add_dependency(%q<highline>, [">= 1.6.15"])
|
216
|
+
s.add_dependency(%q<bundler>, [">= 1.0"])
|
217
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
218
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
219
|
+
s.add_dependency(%q<yard>, [">= 0.8.5"])
|
220
|
+
s.add_dependency(%q<bluecloth>, [">= 0"])
|
221
|
+
s.add_dependency(%q<cucumber>, [">= 1.1.4"])
|
222
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
223
|
+
s.add_dependency(%q<semver>, [">= 0"])
|
224
|
+
end
|
225
|
+
else
|
226
|
+
s.add_dependency(%q<rake>, [">= 0"])
|
227
|
+
s.add_dependency(%q<git>, [">= 1.2.5"])
|
228
|
+
s.add_dependency(%q<nokogiri>, [">= 1.5.10"])
|
229
|
+
s.add_dependency(%q<github_api>, [">= 0"])
|
230
|
+
s.add_dependency(%q<highline>, [">= 1.6.15"])
|
231
|
+
s.add_dependency(%q<bundler>, [">= 1.0"])
|
232
|
+
s.add_dependency(%q<rdoc>, [">= 0"])
|
233
|
+
s.add_dependency(%q<builder>, [">= 0"])
|
234
|
+
s.add_dependency(%q<yard>, [">= 0.8.5"])
|
235
|
+
s.add_dependency(%q<bluecloth>, [">= 0"])
|
236
|
+
s.add_dependency(%q<cucumber>, [">= 1.1.4"])
|
237
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
238
|
+
s.add_dependency(%q<semver>, [">= 0"])
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
data/lib/juwelier.rb
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
require 'pathname'
|
2
|
+
require 'date'
|
3
|
+
require 'juwelier/version'
|
4
|
+
|
5
|
+
# A Juwelier helps you craft the perfect Rubygem. Give him a gemspec, and he takes care of the rest.
|
6
|
+
#
|
7
|
+
# See Juwelier::Tasks for examples of how to get started. Additionally, resources are available on the wiki:
|
8
|
+
#
|
9
|
+
# * http://wiki.github.com/flajann2/juwelier/create-a-new-project
|
10
|
+
# * http://wiki.github.com/flajann2/juwelier/configure-an-existing-project
|
11
|
+
class Juwelier
|
12
|
+
require 'juwelier/errors'
|
13
|
+
require 'rubygems/user_interaction'
|
14
|
+
require 'rubygems/package'
|
15
|
+
|
16
|
+
autoload :Generator, 'juwelier/generator'
|
17
|
+
|
18
|
+
autoload :Commands, 'juwelier/commands'
|
19
|
+
|
20
|
+
autoload :VersionHelper, 'juwelier/version_helper'
|
21
|
+
autoload :GemSpecHelper, 'juwelier/gemspec_helper'
|
22
|
+
|
23
|
+
autoload :Tasks, 'juwelier/tasks'
|
24
|
+
autoload :RubygemsDotOrgTasks, 'juwelier/rubygems_dot_org_tasks'
|
25
|
+
autoload :GemcutterTasks, 'juwelier/gemcutter_tasks'
|
26
|
+
autoload :RubyforgeTasks, 'juwelier/rubyforge_tasks'
|
27
|
+
autoload :Specification, 'juwelier/specification'
|
28
|
+
|
29
|
+
attr_reader :gemspec, :gemspec_helper, :version_helper
|
30
|
+
attr_accessor :base_dir, :output, :repo, :commit
|
31
|
+
|
32
|
+
def initialize(gemspec, base_dir = '.')
|
33
|
+
raise(GemspecError, "Can't create a Juwelier with a nil gemspec") if gemspec.nil?
|
34
|
+
|
35
|
+
@gemspec = gemspec
|
36
|
+
@gemspec.extend(Specification)
|
37
|
+
@gemspec.set_juwelier_defaults(base_dir, git_base_dir)
|
38
|
+
|
39
|
+
@base_dir = base_dir
|
40
|
+
@repo = Git.open(git_base_dir) if in_git_repo?
|
41
|
+
@version_helper = Juwelier::VersionHelper.new(base_dir)
|
42
|
+
@output = $stdout
|
43
|
+
@commit = true
|
44
|
+
@gemspec_helper = GemSpecHelper.new(gemspec, base_dir)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Major version, as defined by the gemspec's Version module.
|
48
|
+
# For 1.5.3, this would return 1.
|
49
|
+
def major_version
|
50
|
+
@version_helper.major
|
51
|
+
end
|
52
|
+
|
53
|
+
# Minor version, as defined by the gemspec's Version module.
|
54
|
+
# For 1.5.3, this would return 5.
|
55
|
+
def minor_version
|
56
|
+
@version_helper.minor
|
57
|
+
end
|
58
|
+
|
59
|
+
# Patch version, as defined by the gemspec's Version module.
|
60
|
+
# For 1.5.3, this would return 5.
|
61
|
+
def patch_version
|
62
|
+
@version_helper.patch
|
63
|
+
end
|
64
|
+
|
65
|
+
# Human readable version, which is used in the gemspec.
|
66
|
+
def version
|
67
|
+
@gemspec.version || @version_helper.to_s
|
68
|
+
end
|
69
|
+
|
70
|
+
# Writes out the gemspec
|
71
|
+
def write_gemspec
|
72
|
+
Juwelier::Commands::WriteGemspec.build_for(self).run
|
73
|
+
end
|
74
|
+
|
75
|
+
# Validates the project's gemspec from disk in an environment similar to how
|
76
|
+
# GitHub would build from it. See http://gist.github.com/16215
|
77
|
+
def validate_gemspec
|
78
|
+
Juwelier::Commands::ValidateGemspec.build_for(self).run
|
79
|
+
end
|
80
|
+
|
81
|
+
# is the project's gemspec from disk valid?
|
82
|
+
def valid_gemspec?
|
83
|
+
gemspec_helper.valid?
|
84
|
+
end
|
85
|
+
|
86
|
+
# Build a gem using the project's latest Gem::Specification
|
87
|
+
def build_gem
|
88
|
+
Juwelier::Commands::BuildGem.build_for(self).run
|
89
|
+
end
|
90
|
+
|
91
|
+
# Install a previously built gem
|
92
|
+
def install_gem
|
93
|
+
Juwelier::Commands::InstallGem.build_for(self).run
|
94
|
+
end
|
95
|
+
|
96
|
+
# Bumps the patch version.
|
97
|
+
#
|
98
|
+
# 1.5.1 -> 1.5.2
|
99
|
+
def bump_patch_version()
|
100
|
+
Juwelier::Commands::Version::BumpPatch.build_for(self).run
|
101
|
+
end
|
102
|
+
|
103
|
+
# Bumps the minor version.
|
104
|
+
#
|
105
|
+
# 1.5.1 -> 1.6.0
|
106
|
+
def bump_minor_version()
|
107
|
+
Juwelier::Commands::Version::BumpMinor.build_for(self).run
|
108
|
+
end
|
109
|
+
|
110
|
+
# Bumps the major version.
|
111
|
+
#
|
112
|
+
# 1.5.1 -> 2.0.0
|
113
|
+
def bump_major_version()
|
114
|
+
Juwelier::Commands::Version::BumpMajor.build_for(self).run
|
115
|
+
end
|
116
|
+
|
117
|
+
# Bumps the version, to the specific major/minor/patch version, writing out the appropriate version.rb, and then reloads it.
|
118
|
+
def write_version(major, minor, patch, build, options = {})
|
119
|
+
command = Juwelier::Commands::Version::Write.build_for(self)
|
120
|
+
command.major = major
|
121
|
+
command.minor = minor
|
122
|
+
command.patch = patch
|
123
|
+
command.build = build
|
124
|
+
|
125
|
+
command.run
|
126
|
+
end
|
127
|
+
|
128
|
+
def release_gemspec(args)
|
129
|
+
Juwelier::Commands::ReleaseGemspec.build_for(self).run(args)
|
130
|
+
end
|
131
|
+
|
132
|
+
def release_to_git(args)
|
133
|
+
Juwelier::Commands::ReleaseToGit.build_for(self).run(args)
|
134
|
+
end
|
135
|
+
|
136
|
+
def release_gem_to_rubygems
|
137
|
+
Juwelier::Commands::ReleaseToRubygems.build_for(self).run
|
138
|
+
end
|
139
|
+
|
140
|
+
def release_gem_to_rubyforge
|
141
|
+
# no-op
|
142
|
+
end
|
143
|
+
|
144
|
+
def setup_rubyforge
|
145
|
+
# no-op
|
146
|
+
end
|
147
|
+
|
148
|
+
def check_dependencies(type = nil)
|
149
|
+
command = Juwelier::Commands::CheckDependencies.build_for(self)
|
150
|
+
command.type = type
|
151
|
+
|
152
|
+
command.run
|
153
|
+
end
|
154
|
+
|
155
|
+
def git_base_dir(base_dir = nil)
|
156
|
+
if base_dir
|
157
|
+
base_dir = File.dirname(base_dir)
|
158
|
+
else
|
159
|
+
base_dir = File.expand_path(self.base_dir || ".")
|
160
|
+
end
|
161
|
+
return nil if base_dir==File.dirname("/")
|
162
|
+
return base_dir if File.exists?(File.join(base_dir, '.git'))
|
163
|
+
return git_base_dir(base_dir)
|
164
|
+
end
|
165
|
+
|
166
|
+
def in_git_repo?
|
167
|
+
git_base_dir
|
168
|
+
end
|
169
|
+
|
170
|
+
def version_file_exists?
|
171
|
+
File.exists?(@version_helper.plaintext_path) || File.exists?(@version_helper.yaml_path)
|
172
|
+
end
|
173
|
+
|
174
|
+
def expects_version_file?
|
175
|
+
gemspec.version.nil?
|
176
|
+
end
|
177
|
+
|
178
|
+
end
|