jeweler 0.11.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/README.markdown +6 -4
- data/ROADMAP +12 -0
- data/Rakefile +15 -3
- data/VERSION.yml +3 -3
- 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 +110 -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 +65 -0
- data/features/step_definitions/generator_steps.rb +251 -0
- data/features/step_definitions/task_steps.rb +6 -0
- data/features/support/env.rb +19 -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 +204 -0
- data/lib/jeweler/commands/release.rb +35 -11
- data/lib/jeweler/commands/version/base.rb +1 -1
- data/lib/jeweler/gemspec_helper.rb +4 -6
- data/lib/jeweler/generator.rb +12 -6
- data/lib/jeweler/rubyforge_tasks.rb +46 -0
- data/lib/jeweler/specification.rb +3 -2
- data/lib/jeweler/tasks.rb +32 -26
- data/lib/jeweler/templates/Rakefile +4 -27
- data/lib/jeweler/templates/rspec/flunking.rb +1 -1
- data/lib/jeweler/version_helper.rb +78 -33
- data/lib/jeweler.rb +5 -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 → existing-project-with-version-plaintext}/LICENSE +0 -0
- data/test/fixtures/{existing-project-with-version → existing-project-with-version-plaintext}/README.rdoc +0 -0
- data/test/fixtures/{existing-project-with-version → existing-project-with-version-plaintext}/Rakefile +0 -0
- data/test/fixtures/existing-project-with-version-plaintext/VERSION +1 -0
- data/test/fixtures/{existing-project-with-version → existing-project-with-version-plaintext}/existing-project-with-version.gemspec +0 -0
- data/test/fixtures/{existing-project-with-version → existing-project-with-version-plaintext}/lib/existing_project_with_version.rb +0 -0
- data/test/fixtures/{existing-project-with-version → existing-project-with-version-plaintext}/test/existing_project_with_version_test.rb +0 -0
- data/test/fixtures/{existing-project-with-version → existing-project-with-version-plaintext}/test/test_helper.rb +0 -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 → existing-project-with-version-yaml}/VERSION.yml +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/jeweler/commands/test_release.rb +304 -79
- data/test/test_generator.rb +11 -7
- data/test/test_generator_initialization.rb +2 -2
- data/test/test_helper.rb +2 -0
- data/test/test_specification.rb +6 -2
- data/test/test_version_helper.rb +47 -9
- metadata +52 -15
- data/test/version_tmp/VERSION.yml +0 -4
data/test/test_specification.rb
CHANGED
@@ -3,7 +3,10 @@ require 'test_helper'
|
|
3
3
|
class TestSpecification < Test::Unit::TestCase
|
4
4
|
def setup
|
5
5
|
remove_tmpdir!
|
6
|
-
|
6
|
+
path = File.join(FIXTURE_DIR, "existing-project-with-version-yaml")
|
7
|
+
Git.init(path)
|
8
|
+
FileUtils.cp_r path, tmp_dir
|
9
|
+
#breakpoint
|
7
10
|
|
8
11
|
|
9
12
|
@spec = Gem::Specification.new
|
@@ -17,7 +20,8 @@ class TestSpecification < Test::Unit::TestCase
|
|
17
20
|
|
18
21
|
context "Gem::Specification with Jeweler monkey-patches" do
|
19
22
|
context "when setting defaults" do
|
20
|
-
|
23
|
+
should_eventually "should populate `files'" do
|
24
|
+
# this implementation changed to use ruby-git
|
21
25
|
assert_equal %w{Rakefile VERSION.yml bin/foo_the_ultimate_bin lib/foo_the_ultimate_lib.rb }, @spec.files.sort
|
22
26
|
end
|
23
27
|
|
data/test/test_version_helper.rb
CHANGED
@@ -22,10 +22,10 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
22
22
|
assert_equal version_s, @version_helper.to_s
|
23
23
|
end
|
24
24
|
|
25
|
-
version_hash = {:major => major, :minor => minor, :patch => patch}
|
26
|
-
should "render hash as #{version_hash.inspect}" do
|
27
|
-
assert_equal version_hash, @version_helper.to_hash
|
28
|
-
end
|
25
|
+
#version_hash = {:major => major, :minor => minor, :patch => patch}
|
26
|
+
#should "render hash as #{version_hash.inspect}" do
|
27
|
+
#assert_equal version_hash, @version_helper.to_hash
|
28
|
+
#end
|
29
29
|
|
30
30
|
end
|
31
31
|
|
@@ -57,6 +57,34 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
+
context "VERSION with 3.5.4" do
|
61
|
+
setup do
|
62
|
+
FileUtils.rm_rf VERSION_TMP_DIR
|
63
|
+
FileUtils.mkdir_p VERSION_TMP_DIR
|
64
|
+
|
65
|
+
build_version_plaintext VERSION_TMP_DIR, 3, 5, 4
|
66
|
+
|
67
|
+
@version_helper = Jeweler::VersionHelper.new VERSION_TMP_DIR
|
68
|
+
end
|
69
|
+
|
70
|
+
should_have_version 3, 5, 4
|
71
|
+
|
72
|
+
context "bumping major version" do
|
73
|
+
setup { @version_helper.bump_major }
|
74
|
+
should_have_version 4, 0, 0
|
75
|
+
end
|
76
|
+
|
77
|
+
context "bumping the minor version" do
|
78
|
+
setup { @version_helper.bump_minor }
|
79
|
+
should_have_version 3, 6, 0
|
80
|
+
end
|
81
|
+
|
82
|
+
context "bumping the patch version" do
|
83
|
+
setup { @version_helper.bump_patch }
|
84
|
+
should_have_version 3, 5, 5
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
60
88
|
context "Non-existant VERSION.yml" do
|
61
89
|
setup do
|
62
90
|
FileUtils.rm_rf VERSION_TMP_DIR
|
@@ -79,17 +107,20 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
79
107
|
should "not create VERSION.yml" do
|
80
108
|
assert ! File.exists?(File.join(VERSION_TMP_DIR, 'VERSION.yml'))
|
81
109
|
end
|
110
|
+
should "not create VERSION" do
|
111
|
+
assert ! File.exists?(File.join(VERSION_TMP_DIR, 'VERSION'))
|
112
|
+
end
|
82
113
|
|
83
114
|
context "outputting" do
|
84
115
|
setup do
|
85
116
|
@version_helper.write
|
86
117
|
end
|
87
118
|
|
88
|
-
should "create VERSION
|
89
|
-
assert File.exists?(File.join(VERSION_TMP_DIR, 'VERSION
|
119
|
+
should "create VERSION" do
|
120
|
+
assert File.exists?(File.join(VERSION_TMP_DIR, 'VERSION'))
|
90
121
|
end
|
91
122
|
|
92
|
-
context "re-reading VERSION
|
123
|
+
context "re-reading VERSION" do
|
93
124
|
setup do
|
94
125
|
@version_helper = Jeweler::VersionHelper.new(VERSION_TMP_DIR)
|
95
126
|
end
|
@@ -101,9 +132,9 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
101
132
|
end
|
102
133
|
|
103
134
|
def build_version_yml(base_dir, major, minor, patch)
|
104
|
-
|
135
|
+
version_path = File.join(base_dir, 'VERSION.yml')
|
105
136
|
|
106
|
-
File.open(
|
137
|
+
File.open(version_path, 'w+') do |f|
|
107
138
|
version_hash = {
|
108
139
|
'major' => major.to_i,
|
109
140
|
'minor' => minor.to_i,
|
@@ -112,4 +143,11 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
112
143
|
YAML.dump(version_hash, f)
|
113
144
|
end
|
114
145
|
end
|
146
|
+
|
147
|
+
def build_version_plaintext(base_dir, major, minor, patch)
|
148
|
+
version_path = File.join(base_dir, 'VERSION')
|
149
|
+
File.open(version_path, 'w+') do |f|
|
150
|
+
f.puts "#{major}.#{minor}.#{patch}"
|
151
|
+
end
|
152
|
+
end
|
115
153
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jeweler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Nichols
|
@@ -9,11 +9,11 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-05-06 00:00:00 -07:00
|
13
13
|
default_executable: jeweler
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: git
|
17
17
|
type: :runtime
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,12 +43,34 @@ extra_rdoc_files:
|
|
43
43
|
- LICENSE
|
44
44
|
- README.markdown
|
45
45
|
files:
|
46
|
+
- .gitignore
|
46
47
|
- ChangeLog.markdown
|
47
48
|
- LICENSE
|
48
49
|
- README.markdown
|
50
|
+
- ROADMAP
|
49
51
|
- Rakefile
|
50
52
|
- VERSION.yml
|
51
53
|
- bin/jeweler
|
54
|
+
- features/generator/cucumber.feature
|
55
|
+
- features/generator/directory_layout.feature
|
56
|
+
- features/generator/dotdocument.feature
|
57
|
+
- features/generator/env_options.feature
|
58
|
+
- features/generator/git.feature
|
59
|
+
- features/generator/license.feature
|
60
|
+
- features/generator/rakefile.feature
|
61
|
+
- features/generator/readme.feature
|
62
|
+
- features/generator/test.feature
|
63
|
+
- features/generator/test_helper.feature
|
64
|
+
- features/placeholder.feature
|
65
|
+
- features/step_definitions/debug_steps.rb
|
66
|
+
- features/step_definitions/filesystem_steps.rb
|
67
|
+
- features/step_definitions/generator_steps.rb
|
68
|
+
- features/step_definitions/task_steps.rb
|
69
|
+
- features/support/env.rb
|
70
|
+
- features/tasks/build_gem.feature
|
71
|
+
- features/tasks/version.feature
|
72
|
+
- features/tasks/version_bumping.feature
|
73
|
+
- jeweler.gemspec
|
52
74
|
- lib/jeweler.rb
|
53
75
|
- lib/jeweler/commands.rb
|
54
76
|
- lib/jeweler/commands/build_gem.rb
|
@@ -74,6 +96,7 @@ files:
|
|
74
96
|
- lib/jeweler/generator/rspec_mixin.rb
|
75
97
|
- lib/jeweler/generator/shoulda_mixin.rb
|
76
98
|
- lib/jeweler/generator/testunit_mixin.rb
|
99
|
+
- lib/jeweler/rubyforge_tasks.rb
|
77
100
|
- lib/jeweler/specification.rb
|
78
101
|
- lib/jeweler/tasks.rb
|
79
102
|
- lib/jeweler/templates/.document
|
@@ -100,14 +123,26 @@ files:
|
|
100
123
|
- test/fixtures/bar/bin/foo_the_ultimate_bin
|
101
124
|
- test/fixtures/bar/hey_include_me_in_gemspec
|
102
125
|
- test/fixtures/bar/lib/foo_the_ultimate_lib.rb
|
103
|
-
- test/fixtures/existing-project-with-version
|
104
|
-
- test/fixtures/existing-project-with-version
|
105
|
-
- test/fixtures/existing-project-with-version/
|
106
|
-
- test/fixtures/existing-project-with-version/
|
107
|
-
- test/fixtures/existing-project-with-version/
|
108
|
-
- test/fixtures/existing-project-with-version/
|
109
|
-
- test/fixtures/existing-project-with-version/
|
110
|
-
- test/fixtures/existing-project-with-version/
|
126
|
+
- test/fixtures/existing-project-with-version-plaintext/.document
|
127
|
+
- test/fixtures/existing-project-with-version-plaintext/.gitignore
|
128
|
+
- test/fixtures/existing-project-with-version-plaintext/LICENSE
|
129
|
+
- test/fixtures/existing-project-with-version-plaintext/README.rdoc
|
130
|
+
- test/fixtures/existing-project-with-version-plaintext/Rakefile
|
131
|
+
- test/fixtures/existing-project-with-version-plaintext/VERSION
|
132
|
+
- test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec
|
133
|
+
- test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb
|
134
|
+
- test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb
|
135
|
+
- test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb
|
136
|
+
- test/fixtures/existing-project-with-version-yaml/.document
|
137
|
+
- test/fixtures/existing-project-with-version-yaml/.gitignore
|
138
|
+
- test/fixtures/existing-project-with-version-yaml/LICENSE
|
139
|
+
- test/fixtures/existing-project-with-version-yaml/README.rdoc
|
140
|
+
- test/fixtures/existing-project-with-version-yaml/Rakefile
|
141
|
+
- test/fixtures/existing-project-with-version-yaml/VERSION.yml
|
142
|
+
- test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec
|
143
|
+
- test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb
|
144
|
+
- test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb
|
145
|
+
- test/fixtures/existing-project-with-version-yaml/test/test_helper.rb
|
111
146
|
- test/geminstaller.yml
|
112
147
|
- test/jeweler/commands/test_build_gem.rb
|
113
148
|
- test/jeweler/commands/test_install_gem.rb
|
@@ -133,7 +168,6 @@ files:
|
|
133
168
|
- test/test_specification.rb
|
134
169
|
- test/test_tasks.rb
|
135
170
|
- test/test_version_helper.rb
|
136
|
-
- test/version_tmp/VERSION.yml
|
137
171
|
has_rdoc: true
|
138
172
|
homepage: http://github.com/technicalpickles/jeweler
|
139
173
|
post_install_message:
|
@@ -162,9 +196,12 @@ specification_version: 2
|
|
162
196
|
summary: Simple and opinionated helper for creating Rubygem projects on GitHub
|
163
197
|
test_files:
|
164
198
|
- test/fixtures/bar/lib/foo_the_ultimate_lib.rb
|
165
|
-
- test/fixtures/existing-project-with-version/lib/existing_project_with_version.rb
|
166
|
-
- test/fixtures/existing-project-with-version/test/existing_project_with_version_test.rb
|
167
|
-
- test/fixtures/existing-project-with-version/test/test_helper.rb
|
199
|
+
- test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb
|
200
|
+
- test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb
|
201
|
+
- test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb
|
202
|
+
- test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb
|
203
|
+
- test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb
|
204
|
+
- test/fixtures/existing-project-with-version-yaml/test/test_helper.rb
|
168
205
|
- test/jeweler/commands/test_build_gem.rb
|
169
206
|
- test/jeweler/commands/test_install_gem.rb
|
170
207
|
- test/jeweler/commands/test_release.rb
|