jeweler 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/.travis.yml +5 -1
- data/ChangeLog.markdown +4 -0
- data/Gemfile +23 -23
- data/Gemfile.lock +142 -0
- data/Gemfile.orig +54 -0
- data/README.markdown +3 -0
- data/Rakefile +13 -14
- data/Rakefile.orig +88 -0
- data/features/generator/test.feature +2 -2
- data/features/step_definitions/debug_steps.rb +0 -1
- data/features/step_definitions/filesystem_steps.rb +2 -3
- data/features/step_definitions/generator_steps.rb +44 -64
- data/features/step_definitions/task_steps.rb +1 -2
- data/features/support/env.rb +21 -7
- data/jeweler.gemspec +11 -6
- data/jeweler.gemspec.orig +464 -0
- data/lib/jeweler.rb +18 -19
- data/lib/jeweler/commands/build_gem.rb +2 -2
- data/lib/jeweler/commands/check_dependencies.rb +3 -3
- data/lib/jeweler/commands/install_gem.rb +1 -1
- data/lib/jeweler/commands/release_gemspec.rb +8 -10
- data/lib/jeweler/commands/release_to_git.rb +9 -5
- data/lib/jeweler/commands/validate_gemspec.rb +5 -7
- data/lib/jeweler/commands/version/base.rb +8 -13
- data/lib/jeweler/commands/version/bump_major.rb +1 -3
- data/lib/jeweler/commands/version/bump_minor.rb +1 -2
- data/lib/jeweler/commands/version/bump_patch.rb +1 -4
- data/lib/jeweler/commands/write_gemspec.rb +4 -3
- data/lib/jeweler/gemspec_helper.rb +15 -15
- data/lib/jeweler/gemspec_helper.rb.orig +91 -0
- data/lib/jeweler/generator.rb +39 -41
- data/lib/jeweler/generator/application.rb +5 -7
- data/lib/jeweler/generator/bacon_mixin.rb +2 -4
- data/lib/jeweler/generator/github_mixin.rb +1 -3
- data/lib/jeweler/generator/micronaut_mixin.rb +3 -3
- data/lib/jeweler/generator/minitest_mixin.rb +2 -3
- data/lib/jeweler/generator/options.rb +15 -19
- data/lib/jeweler/generator/rdoc_mixin.rb +1 -1
- data/lib/jeweler/generator/riot_mixin.rb +2 -3
- data/lib/jeweler/generator/rspec_mixin.rb +2 -3
- data/lib/jeweler/generator/shindo_mixin.rb +2 -3
- data/lib/jeweler/generator/shoulda_mixin.rb +2 -3
- data/lib/jeweler/generator/testspec_mixin.rb +2 -3
- data/lib/jeweler/generator/testunit_mixin.rb +1 -3
- data/lib/jeweler/generator/yard_mixin.rb +3 -4
- data/lib/jeweler/rubyforge_tasks.rb +13 -13
- data/lib/jeweler/rubygems_dot_org_tasks.rb +3 -3
- data/lib/jeweler/rubygems_tasks.rb +3 -3
- data/lib/jeweler/specification.rb +22 -11
- data/lib/jeweler/tasks.rb +57 -57
- data/lib/jeweler/templates/bacon/flunking.rb +3 -3
- data/lib/jeweler/templates/micronaut/flunking.rb +3 -3
- data/lib/jeweler/templates/minitest/flunking.rb +1 -1
- data/lib/jeweler/templates/minitest/helper.rb +3 -3
- data/lib/jeweler/templates/riot/flunking.rb +1 -1
- data/lib/jeweler/templates/rspec/flunking.rb +3 -3
- data/lib/jeweler/templates/shindo/flunking.rb +3 -3
- data/lib/jeweler/templates/testspec/flunking.rb +3 -3
- data/lib/jeweler/version_helper.rb +18 -15
- data/test/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -1
- data/test/fixtures/existing-project-with-version-constant/Rakefile +18 -20
- data/test/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec +15 -17
- data/test/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb +2 -2
- data/test/fixtures/existing-project-with-version-plaintext/Rakefile +17 -19
- data/test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec +15 -17
- data/test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb +2 -2
- data/test/fixtures/existing-project-with-version-yaml/Rakefile +17 -19
- data/test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec +15 -17
- data/test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb +2 -2
- data/test/jeweler/commands/test_build_gem.rb +25 -28
- data/test/jeweler/commands/test_install_gem.rb +7 -7
- data/test/jeweler/commands/test_release_to_gemcutter.rb +6 -7
- data/test/jeweler/commands/test_release_to_git.rb +52 -57
- data/test/jeweler/commands/test_release_to_github.rb +112 -119
- data/test/jeweler/commands/test_validate_gemspec.rb +4 -6
- data/test/jeweler/commands/test_write_gemspec.rb +21 -24
- data/test/jeweler/commands/version/test_base.rb +9 -10
- data/test/jeweler/commands/version/test_bump_major.rb +1 -5
- data/test/jeweler/commands/version/test_bump_minor.rb +1 -2
- data/test/jeweler/commands/version/test_bump_patch.rb +1 -3
- data/test/jeweler/commands/version/test_write.rb +1 -3
- data/test/jeweler/generator/test_application.rb +22 -26
- data/test/jeweler/generator/test_options.rb +26 -27
- data/test/jeweler/test_gemspec_helper.rb +7 -7
- data/test/jeweler/test_generator.rb +31 -32
- data/test/jeweler/test_generator_initialization.rb +40 -43
- data/test/jeweler/test_generator_mixins.rb +6 -7
- data/test/jeweler/test_specification.rb +36 -43
- data/test/jeweler/test_tasks.rb +2 -3
- data/test/jeweler/test_version_helper.rb +33 -35
- data/test/shoulda_macros/jeweler_macros.rb +5 -5
- data/test/test_helper.rb +23 -25
- data/test/test_jeweler.rb +22 -25
- metadata +11 -6
data/test/jeweler/test_tasks.rb
CHANGED
@@ -6,8 +6,8 @@ class TestTasks < Test::Unit::TestCase
|
|
6
6
|
|
7
7
|
context 'instantiating Jeweler::Tasks' do
|
8
8
|
setup do
|
9
|
-
@gemspec_building_block =
|
10
|
-
@tasks = Jeweler::Tasks.new
|
9
|
+
@gemspec_building_block = ->(gemspec) {}
|
10
|
+
@tasks = Jeweler::Tasks.new(&@gemspec_building_block)
|
11
11
|
end
|
12
12
|
|
13
13
|
teardown do
|
@@ -45,6 +45,5 @@ class TestTasks < Test::Unit::TestCase
|
|
45
45
|
@tasks = Jeweler::Tasks.new { |s| spec = s }
|
46
46
|
assert_not_nil @tasks.jeweler.gemspec
|
47
47
|
end
|
48
|
-
|
49
48
|
end
|
50
49
|
end
|
@@ -1,10 +1,9 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class TestVersionHelper < Test::Unit::TestCase
|
4
|
-
|
5
4
|
VERSION_TMP_DIR = File.dirname(__FILE__) + '/version_tmp'
|
6
5
|
|
7
|
-
def self.should_have_version(major, minor, patch, build=nil)
|
6
|
+
def self.should_have_version(major, minor, patch, build = nil)
|
8
7
|
should "have major version #{major}" do
|
9
8
|
assert_equal major, @version_helper.major
|
10
9
|
end
|
@@ -26,14 +25,13 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
26
25
|
assert_equal version_s, @version_helper.to_s
|
27
26
|
end
|
28
27
|
|
29
|
-
#version_hash = {:major => major, :minor => minor, :patch => patch}
|
30
|
-
#should "render hash as #{version_hash.inspect}" do
|
31
|
-
|
32
|
-
#end
|
33
|
-
|
28
|
+
# version_hash = {:major => major, :minor => minor, :patch => patch}
|
29
|
+
# should "render hash as #{version_hash.inspect}" do
|
30
|
+
# assert_equal version_hash, @version_helper.to_hash
|
31
|
+
# end
|
34
32
|
end
|
35
33
|
|
36
|
-
context
|
34
|
+
context 'VERSION.yml with 3.5.4' do
|
37
35
|
setup do
|
38
36
|
FileUtils.rm_rf VERSION_TMP_DIR
|
39
37
|
FileUtils.mkdir_p VERSION_TMP_DIR
|
@@ -45,23 +43,23 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
45
43
|
|
46
44
|
should_have_version 3, 5, 4
|
47
45
|
|
48
|
-
context
|
46
|
+
context 'bumping major version' do
|
49
47
|
setup { @version_helper.bump_major }
|
50
48
|
should_have_version 4, 0, 0
|
51
49
|
end
|
52
50
|
|
53
|
-
context
|
51
|
+
context 'bumping the minor version' do
|
54
52
|
setup { @version_helper.bump_minor }
|
55
53
|
should_have_version 3, 6, 0
|
56
54
|
end
|
57
55
|
|
58
|
-
context
|
56
|
+
context 'bumping the patch version' do
|
59
57
|
setup { @version_helper.bump_patch }
|
60
58
|
should_have_version 3, 5, 5
|
61
59
|
end
|
62
60
|
end
|
63
61
|
|
64
|
-
context
|
62
|
+
context 'VERSION.yml with 3.5.4.a1' do
|
65
63
|
setup do
|
66
64
|
FileUtils.rm_rf VERSION_TMP_DIR
|
67
65
|
FileUtils.mkdir_p VERSION_TMP_DIR
|
@@ -73,23 +71,23 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
73
71
|
|
74
72
|
should_have_version 3, 5, 4, 'a1'
|
75
73
|
|
76
|
-
context
|
74
|
+
context 'bumping major version' do
|
77
75
|
setup { @version_helper.bump_major }
|
78
76
|
should_have_version 4, 0, 0, nil
|
79
77
|
end
|
80
78
|
|
81
|
-
context
|
79
|
+
context 'bumping the minor version' do
|
82
80
|
setup { @version_helper.bump_minor }
|
83
81
|
should_have_version 3, 6, 0, nil
|
84
82
|
end
|
85
83
|
|
86
|
-
context
|
84
|
+
context 'bumping the patch version' do
|
87
85
|
setup { @version_helper.bump_patch }
|
88
86
|
should_have_version 3, 5, 5, nil
|
89
87
|
end
|
90
88
|
end
|
91
89
|
|
92
|
-
context
|
90
|
+
context 'VERSION with 3.5.4' do
|
93
91
|
setup do
|
94
92
|
FileUtils.rm_rf VERSION_TMP_DIR
|
95
93
|
FileUtils.mkdir_p VERSION_TMP_DIR
|
@@ -101,23 +99,23 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
101
99
|
|
102
100
|
should_have_version 3, 5, 4
|
103
101
|
|
104
|
-
context
|
102
|
+
context 'bumping major version' do
|
105
103
|
setup { @version_helper.bump_major }
|
106
104
|
should_have_version 4, 0, 0
|
107
105
|
end
|
108
106
|
|
109
|
-
context
|
107
|
+
context 'bumping the minor version' do
|
110
108
|
setup { @version_helper.bump_minor }
|
111
109
|
should_have_version 3, 6, 0
|
112
110
|
end
|
113
111
|
|
114
|
-
context
|
112
|
+
context 'bumping the patch version' do
|
115
113
|
setup { @version_helper.bump_patch }
|
116
114
|
should_have_version 3, 5, 5
|
117
115
|
end
|
118
116
|
end
|
119
117
|
|
120
|
-
context
|
118
|
+
context 'VERSION with 3.5.4.a1' do
|
121
119
|
setup do
|
122
120
|
FileUtils.rm_rf VERSION_TMP_DIR
|
123
121
|
FileUtils.mkdir_p VERSION_TMP_DIR
|
@@ -129,23 +127,23 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
129
127
|
|
130
128
|
should_have_version 3, 5, 4, 'a1'
|
131
129
|
|
132
|
-
context
|
130
|
+
context 'bumping major version' do
|
133
131
|
setup { @version_helper.bump_major }
|
134
132
|
should_have_version 4, 0, 0, nil
|
135
133
|
end
|
136
134
|
|
137
|
-
context
|
135
|
+
context 'bumping the minor version' do
|
138
136
|
setup { @version_helper.bump_minor }
|
139
137
|
should_have_version 3, 6, 0, nil
|
140
138
|
end
|
141
139
|
|
142
|
-
context
|
140
|
+
context 'bumping the patch version' do
|
143
141
|
setup { @version_helper.bump_patch }
|
144
142
|
should_have_version 3, 5, 5, nil
|
145
143
|
end
|
146
144
|
end
|
147
145
|
|
148
|
-
context
|
146
|
+
context 'Non-existant VERSION.yml' do
|
149
147
|
setup do
|
150
148
|
FileUtils.rm_rf VERSION_TMP_DIR
|
151
149
|
FileUtils.mkdir_p VERSION_TMP_DIR
|
@@ -157,30 +155,30 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
157
155
|
end
|
158
156
|
end
|
159
157
|
|
160
|
-
context
|
158
|
+
context 'setting an initial version' do
|
161
159
|
setup do
|
162
160
|
@version_helper = Jeweler::VersionHelper.new(VERSION_TMP_DIR)
|
163
161
|
@version_helper.update_to 0, 0, 1
|
164
162
|
end
|
165
163
|
|
166
164
|
should_have_version 0, 0, 1
|
167
|
-
should
|
168
|
-
assert !
|
165
|
+
should 'not create VERSION.yml' do
|
166
|
+
assert !File.exist?(File.join(VERSION_TMP_DIR, 'VERSION.yml'))
|
169
167
|
end
|
170
|
-
should
|
171
|
-
assert !
|
168
|
+
should 'not create VERSION' do
|
169
|
+
assert !File.exist?(File.join(VERSION_TMP_DIR, 'VERSION'))
|
172
170
|
end
|
173
171
|
|
174
|
-
context
|
172
|
+
context 'outputting' do
|
175
173
|
setup do
|
176
174
|
@version_helper.write
|
177
175
|
end
|
178
176
|
|
179
|
-
should
|
180
|
-
assert File.
|
177
|
+
should 'create VERSION' do
|
178
|
+
assert File.exist?(File.join(VERSION_TMP_DIR, 'VERSION'))
|
181
179
|
end
|
182
180
|
|
183
|
-
context
|
181
|
+
context 're-reading VERSION' do
|
184
182
|
setup do
|
185
183
|
@version_helper = Jeweler::VersionHelper.new(VERSION_TMP_DIR)
|
186
184
|
end
|
@@ -191,7 +189,7 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
191
189
|
end
|
192
190
|
end
|
193
191
|
|
194
|
-
def build_version_yml(base_dir, major, minor, patch, build=nil)
|
192
|
+
def build_version_yml(base_dir, major, minor, patch, build = nil)
|
195
193
|
version_path = File.join(base_dir, 'VERSION.yml')
|
196
194
|
|
197
195
|
File.open(version_path, 'w+') do |f|
|
@@ -205,7 +203,7 @@ class TestVersionHelper < Test::Unit::TestCase
|
|
205
203
|
end
|
206
204
|
end
|
207
205
|
|
208
|
-
def build_version_plaintext(base_dir, major, minor, patch, build=nil)
|
206
|
+
def build_version_plaintext(base_dir, major, minor, patch, build = nil)
|
209
207
|
version_path = File.join(base_dir, 'VERSION')
|
210
208
|
File.open(version_path, 'w+') do |f|
|
211
209
|
f.puts [major, minor, patch, build].compact.join('.')
|
@@ -1,29 +1,29 @@
|
|
1
1
|
class Test::Unit::TestCase
|
2
2
|
class << self
|
3
3
|
def should_have_major_version(version)
|
4
|
-
should "have major version of #{version}" do
|
4
|
+
should "have major version of #{version}" do
|
5
5
|
assert_equal version, @jeweler.major_version
|
6
6
|
end
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
def should_have_minor_version(version)
|
10
10
|
should "have minor version of #{version}" do
|
11
11
|
assert_equal version, @jeweler.minor_version
|
12
12
|
end
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
def should_have_patch_version(version)
|
16
16
|
should "have patch version of #{version}" do
|
17
17
|
assert_equal version, @jeweler.patch_version
|
18
18
|
end
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
def should_be_version(version)
|
22
22
|
should "be version #{version}" do
|
23
23
|
assert_equal version, @jeweler.version
|
24
24
|
end
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
def should_bump_version(major, minor, patch)
|
28
28
|
version = "#{major}.#{minor}.#{patch}"
|
29
29
|
should_have_major_version major
|
data/test/test_helper.rb
CHANGED
@@ -1,23 +1,24 @@
|
|
1
|
-
require 'test/unit'
|
2
1
|
require 'rubygems'
|
3
2
|
|
4
3
|
require 'bundler'
|
5
|
-
require 'coveralls'
|
6
|
-
Coveralls.wear!
|
7
|
-
|
8
4
|
begin
|
9
5
|
Bundler.setup(:default, :xzibit, :test)
|
10
6
|
rescue Bundler::BundlerError => e
|
11
7
|
$stderr.puts e.message
|
12
|
-
$stderr.puts
|
8
|
+
$stderr.puts 'Run `bundle install` to install missing gems'
|
13
9
|
exit e.status_code
|
14
10
|
end
|
11
|
+
require 'test/unit/rr'
|
12
|
+
require 'coveralls'
|
13
|
+
Coveralls.wear!
|
14
|
+
|
15
|
+
# prevent GIT_* environment leakage from affecting tests
|
16
|
+
ENV.delete_if { |name, _| name.start_with?('GIT') }
|
15
17
|
|
16
18
|
require 'rake'
|
17
19
|
require 'shoulda'
|
18
|
-
require '
|
19
|
-
|
20
|
-
require 'construct'
|
20
|
+
# require 'redgreen'
|
21
|
+
require 'test_construct'
|
21
22
|
require 'git'
|
22
23
|
require 'time'
|
23
24
|
|
@@ -26,7 +27,7 @@ require 'jeweler'
|
|
26
27
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
27
28
|
require 'shoulda_macros/jeweler_macros'
|
28
29
|
|
29
|
-
TMP_DIR = '/tmp/jeweler_test'
|
30
|
+
TMP_DIR = '/tmp/jeweler_test'.freeze
|
30
31
|
FIXTURE_DIR = File.expand_path('../fixtures', __FILE__)
|
31
32
|
|
32
33
|
class RubyForgeStub
|
@@ -38,8 +39,7 @@ class RubyForgeStub
|
|
38
39
|
end
|
39
40
|
|
40
41
|
class Test::Unit::TestCase
|
41
|
-
include
|
42
|
-
include Construct::Helpers
|
42
|
+
include TestConstruct::Helpers
|
43
43
|
|
44
44
|
def tmp_dir
|
45
45
|
TMP_DIR
|
@@ -59,12 +59,12 @@ class Test::Unit::TestCase
|
|
59
59
|
|
60
60
|
def build_spec(*files)
|
61
61
|
Gem::Specification.new do |s|
|
62
|
-
s.name =
|
63
|
-
s.summary =
|
64
|
-
s.email =
|
65
|
-
s.homepage =
|
66
|
-
s.description =
|
67
|
-
s.authors = [
|
62
|
+
s.name = 'bar'
|
63
|
+
s.summary = 'Simple and opinionated helper for creating Rubygem projects on GitHub'
|
64
|
+
s.email = 'josh@technicalpickles.com'
|
65
|
+
s.homepage = 'http://github.com/technicalpickles/jeweler'
|
66
|
+
s.description = 'Simple and opinionated helper for creating Rubygem projects on GitHub'
|
67
|
+
s.authors = ['Josh Nichols']
|
68
68
|
s.files = FileList[*files] unless files.empty?
|
69
69
|
s.version = '0.1.1'
|
70
70
|
end
|
@@ -86,7 +86,7 @@ class Test::Unit::TestCase
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
|
-
context
|
89
|
+
context '', &block
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
@@ -117,18 +117,17 @@ class Test::Unit::TestCase
|
|
117
117
|
|
118
118
|
if @command.respond_to? :repo
|
119
119
|
@repo = Object.new
|
120
|
-
@command.repo = @repo
|
120
|
+
@command.repo = @repo
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
|
-
context
|
124
|
+
context '', &block
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
128
|
def self.build_command_context(description, &block)
|
129
129
|
context description do
|
130
130
|
setup do
|
131
|
-
|
132
131
|
@repo = Object.new
|
133
132
|
@version_helper = Object.new
|
134
133
|
@gemspec = Object.new
|
@@ -149,16 +148,15 @@ class Test::Unit::TestCase
|
|
149
148
|
stub(@jeweler).output { @output }
|
150
149
|
stub(@jeweler).gemspec_helper { @gemspec_helper }
|
151
150
|
stub(@jeweler).base_dir { @base_dir }
|
152
|
-
stub(@jeweler).rubyforge
|
151
|
+
stub(@jeweler).rubyforge { @rubyforge }
|
153
152
|
end
|
154
153
|
|
155
|
-
context
|
154
|
+
context '', &block
|
156
155
|
end
|
157
|
-
|
158
156
|
end
|
159
157
|
|
160
158
|
def stub_git_config(options = {})
|
161
|
-
stub(Git).global_config
|
159
|
+
stub(Git).global_config { options }
|
162
160
|
end
|
163
161
|
|
164
162
|
def set_default_git_config
|
data/test/test_jeweler.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class TestJeweler < Test::Unit::TestCase
|
4
|
-
|
5
4
|
def build_jeweler(base_dir = nil)
|
6
5
|
base_dir ||= git_dir_path
|
7
6
|
FileUtils.mkdir_p base_dir
|
@@ -18,7 +17,6 @@ class TestJeweler < Test::Unit::TestCase
|
|
18
17
|
end
|
19
18
|
|
20
19
|
def build_git_dir
|
21
|
-
|
22
20
|
FileUtils.mkdir_p git_dir_path
|
23
21
|
Dir.chdir git_dir_path do
|
24
22
|
Git.init
|
@@ -29,31 +27,31 @@ class TestJeweler < Test::Unit::TestCase
|
|
29
27
|
FileUtils.mkdir_p non_git_dir_path
|
30
28
|
end
|
31
29
|
|
32
|
-
should
|
30
|
+
should 'raise an error if a nil gemspec is given' do
|
33
31
|
assert_raises Jeweler::GemspecError do
|
34
32
|
Jeweler.new(nil)
|
35
33
|
end
|
36
34
|
end
|
37
35
|
|
38
|
-
should
|
36
|
+
should 'know if it is in a git repo' do
|
39
37
|
build_git_dir
|
40
38
|
|
41
39
|
assert build_jeweler(git_dir_path).in_git_repo?
|
42
40
|
end
|
43
41
|
|
44
|
-
should
|
42
|
+
should 'know if it is not in a git repo' do
|
45
43
|
build_non_git_dir
|
46
44
|
|
47
45
|
jeweler = build_jeweler(non_git_dir_path)
|
48
|
-
assert !
|
46
|
+
assert !jeweler.in_git_repo?, "jeweler doesn't know that #{jeweler.base_dir} is not a git repository"
|
49
47
|
end
|
50
48
|
|
51
|
-
should
|
49
|
+
should 'find the base repo' do
|
52
50
|
jeweler = build_jeweler(File.dirname(File.expand_path(__FILE__)))
|
53
51
|
assert_equal File.dirname(File.dirname(File.expand_path(__FILE__))), jeweler.git_base_dir
|
54
52
|
end
|
55
53
|
|
56
|
-
should
|
54
|
+
should 'build and run write gemspec command when writing gemspec' do
|
57
55
|
jeweler = build_jeweler
|
58
56
|
|
59
57
|
command = Object.new
|
@@ -64,7 +62,7 @@ class TestJeweler < Test::Unit::TestCase
|
|
64
62
|
jeweler.write_gemspec
|
65
63
|
end
|
66
64
|
|
67
|
-
should
|
65
|
+
should 'build and run validate gemspec command when validating gemspec' do
|
68
66
|
jeweler = build_jeweler
|
69
67
|
|
70
68
|
command = Object.new
|
@@ -75,7 +73,7 @@ class TestJeweler < Test::Unit::TestCase
|
|
75
73
|
jeweler.validate_gemspec
|
76
74
|
end
|
77
75
|
|
78
|
-
should
|
76
|
+
should 'build and run build gem command when building gem' do
|
79
77
|
jeweler = build_jeweler
|
80
78
|
|
81
79
|
command = Object.new
|
@@ -86,7 +84,7 @@ class TestJeweler < Test::Unit::TestCase
|
|
86
84
|
jeweler.build_gem
|
87
85
|
end
|
88
86
|
|
89
|
-
should
|
87
|
+
should 'build and run build gem command when installing gem' do
|
90
88
|
jeweler = build_jeweler
|
91
89
|
|
92
90
|
command = Object.new
|
@@ -97,7 +95,7 @@ class TestJeweler < Test::Unit::TestCase
|
|
97
95
|
jeweler.install_gem
|
98
96
|
end
|
99
97
|
|
100
|
-
should
|
98
|
+
should 'build and run bump major version command when bumping major version' do
|
101
99
|
jeweler = build_jeweler
|
102
100
|
|
103
101
|
command = Object.new
|
@@ -108,7 +106,7 @@ class TestJeweler < Test::Unit::TestCase
|
|
108
106
|
jeweler.bump_major_version
|
109
107
|
end
|
110
108
|
|
111
|
-
should
|
109
|
+
should 'build and run bump minor version command when bumping minor version' do
|
112
110
|
jeweler = build_jeweler
|
113
111
|
|
114
112
|
command = Object.new
|
@@ -119,22 +117,22 @@ class TestJeweler < Test::Unit::TestCase
|
|
119
117
|
jeweler.bump_minor_version
|
120
118
|
end
|
121
119
|
|
122
|
-
should
|
120
|
+
should 'build and run write version command when writing version' do
|
123
121
|
jeweler = build_jeweler
|
124
122
|
|
125
123
|
command = Object.new
|
126
124
|
mock(command).run
|
127
|
-
mock(command).major=
|
128
|
-
mock(command).minor=
|
129
|
-
mock(command).patch=
|
130
|
-
mock(command).build=
|
125
|
+
mock(command).major = 1
|
126
|
+
mock(command).minor = 5
|
127
|
+
mock(command).patch = 2
|
128
|
+
mock(command).build = 'a1'
|
131
129
|
|
132
130
|
mock(Jeweler::Commands::Version::Write).build_for(jeweler) { command }
|
133
131
|
|
134
132
|
jeweler.write_version(1, 5, 2, 'a1')
|
135
133
|
end
|
136
134
|
|
137
|
-
should
|
135
|
+
should 'build and run release to github command when running release_gemspec' do
|
138
136
|
jeweler = build_jeweler
|
139
137
|
args = {}
|
140
138
|
|
@@ -146,7 +144,7 @@ class TestJeweler < Test::Unit::TestCase
|
|
146
144
|
jeweler.release_gemspec(args)
|
147
145
|
end
|
148
146
|
|
149
|
-
should
|
147
|
+
should 'build and run release to git command when running release_to_git' do
|
150
148
|
jeweler = build_jeweler
|
151
149
|
args = {}
|
152
150
|
|
@@ -158,20 +156,19 @@ class TestJeweler < Test::Unit::TestCase
|
|
158
156
|
jeweler.release_to_git(args)
|
159
157
|
end
|
160
158
|
|
161
|
-
should
|
159
|
+
should 'respond to gemspec_helper' do
|
162
160
|
assert_respond_to build_jeweler, :gemspec_helper
|
163
161
|
end
|
164
162
|
|
165
|
-
should
|
163
|
+
should 'respond to version_helper' do
|
166
164
|
assert_respond_to build_jeweler, :version_helper
|
167
165
|
end
|
168
166
|
|
169
|
-
should
|
167
|
+
should 'respond to repo' do
|
170
168
|
assert_respond_to build_jeweler, :repo
|
171
169
|
end
|
172
170
|
|
173
|
-
should
|
171
|
+
should 'respond to commit' do
|
174
172
|
assert_respond_to build_jeweler, :commit
|
175
173
|
end
|
176
|
-
|
177
174
|
end
|