rubygems-tasks 0.2.6 → 0.3.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.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +7 -3
- data/ChangeLog.md +15 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +1 -1
- data/README.md +112 -79
- data/gemspec.yml +6 -4
- data/lib/rubygems/tasks/build/gem.rb +5 -6
- data/lib/rubygems/tasks/build/tar.rb +5 -6
- data/lib/rubygems/tasks/build/task.rb +4 -2
- data/lib/rubygems/tasks/build/zip.rb +5 -6
- data/lib/rubygems/tasks/build.rb +61 -3
- data/lib/rubygems/tasks/console.rb +12 -9
- data/lib/rubygems/tasks/install.rb +4 -5
- data/lib/rubygems/tasks/printing.rb +2 -0
- data/lib/rubygems/tasks/project.rb +3 -1
- data/lib/rubygems/tasks/push.rb +20 -7
- data/lib/rubygems/tasks/release.rb +4 -5
- data/lib/rubygems/tasks/scm/push.rb +5 -6
- data/lib/rubygems/tasks/scm/status.rb +5 -6
- data/lib/rubygems/tasks/scm/tag.rb +9 -12
- data/lib/rubygems/tasks/scm.rb +52 -3
- data/lib/rubygems/tasks/sign/checksum.rb +21 -14
- data/lib/rubygems/tasks/sign/pgp.rb +5 -6
- data/lib/rubygems/tasks/sign/task.rb +4 -2
- data/lib/rubygems/tasks/sign.rb +42 -2
- data/lib/rubygems/tasks/task.rb +4 -2
- data/lib/rubygems/tasks.rb +67 -66
- data/spec/build_spec.rb +72 -0
- data/spec/console_spec.rb +15 -15
- data/spec/install_spec.rb +1 -1
- data/spec/project_spec.rb +19 -19
- data/spec/push_spec.rb +15 -3
- data/spec/scm/push_spec.rb +6 -6
- data/spec/scm/status_spec.rb +8 -12
- data/spec/scm/tag_spec.rb +18 -28
- data/spec/scm_spec.rb +72 -0
- data/spec/sign/pgp_spec.rb +1 -1
- data/spec/sign_spec.rb +52 -0
- data/spec/tasks_spec.rb +20 -169
- metadata +15 -15
data/spec/tasks_spec.rb
CHANGED
|
@@ -4,238 +4,89 @@ require 'rake_context'
|
|
|
4
4
|
require 'rubygems/tasks'
|
|
5
5
|
|
|
6
6
|
describe Gem::Tasks do
|
|
7
|
-
|
|
8
|
-
context "default options" do
|
|
9
|
-
include_context "rake"
|
|
7
|
+
include_context "rake"
|
|
10
8
|
|
|
9
|
+
describe "#initialize" do
|
|
10
|
+
context "when given no keyword arguments" do
|
|
11
11
|
describe '#build' do
|
|
12
12
|
subject { super().build }
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
describe '#build.gem' do
|
|
16
|
-
subject { super().gem }
|
|
17
|
-
it { is_expected.to be_kind_of(Gem::Tasks::Build::Gem) }
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
describe '#build.tar' do
|
|
21
|
-
subject { super().tar }
|
|
22
|
-
it { is_expected.to be_nil }
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
describe '#build.zip' do
|
|
26
|
-
subject { super().zip }
|
|
27
|
-
it { is_expected.to be_nil }
|
|
28
|
-
end
|
|
13
|
+
|
|
14
|
+
it { is_expected.to be_a(Gem::Tasks::Build) }
|
|
29
15
|
end
|
|
30
16
|
|
|
31
17
|
describe '#scm' do
|
|
32
18
|
subject { super().scm }
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
describe '#scm.status' do
|
|
36
|
-
subject { super().status }
|
|
37
|
-
it { is_expected.to be_kind_of(Gem::Tasks::SCM::Status) }
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
describe '#scm.push' do
|
|
41
|
-
subject { super().push }
|
|
42
|
-
it { is_expected.to be_kind_of(Gem::Tasks::SCM::Push) }
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
describe '#scm.tag' do
|
|
46
|
-
subject { super().tag }
|
|
47
|
-
it { is_expected.to be_kind_of(Gem::Tasks::SCM::Tag) }
|
|
48
|
-
end
|
|
19
|
+
|
|
20
|
+
it { is_expected.to be_a(Gem::Tasks::SCM) }
|
|
49
21
|
end
|
|
50
22
|
|
|
51
23
|
describe '#sign' do
|
|
52
24
|
subject { super().sign }
|
|
53
|
-
it { is_expected.to be_kind_of(OpenStruct) }
|
|
54
|
-
|
|
55
|
-
describe '#checksum' do
|
|
56
|
-
subject { super().checksum }
|
|
57
|
-
it { is_expected.to be_nil }
|
|
58
|
-
end
|
|
59
25
|
|
|
60
|
-
|
|
61
|
-
subject { super().pgp }
|
|
62
|
-
it { is_expected.to be_nil }
|
|
63
|
-
end
|
|
26
|
+
it { is_expected.to be_a(Gem::Tasks::Sign) }
|
|
64
27
|
end
|
|
65
28
|
|
|
66
29
|
describe '#console' do
|
|
67
30
|
subject { super().console }
|
|
31
|
+
|
|
68
32
|
it { is_expected.to be_kind_of(Gem::Tasks::Console) }
|
|
69
33
|
end
|
|
70
34
|
|
|
71
35
|
describe '#install' do
|
|
72
36
|
subject { super().install }
|
|
37
|
+
|
|
73
38
|
it { is_expected.to be_kind_of(Gem::Tasks::Install) }
|
|
74
39
|
end
|
|
75
40
|
|
|
76
41
|
describe '#push' do
|
|
77
42
|
subject { super().push }
|
|
43
|
+
|
|
78
44
|
it { is_expected.to be_kind_of(Gem::Tasks::Push) }
|
|
79
45
|
end
|
|
80
46
|
|
|
81
47
|
describe '#release' do
|
|
82
48
|
subject { super().release }
|
|
83
|
-
it { is_expected.to be_kind_of(Gem::Tasks::Release) }
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
|
|
87
|
-
context "build: {gem: false}" do
|
|
88
|
-
include_context "rake"
|
|
89
|
-
|
|
90
|
-
subject { described_class.new(build: {gem: false}) }
|
|
91
|
-
|
|
92
|
-
describe '#build' do
|
|
93
|
-
subject { super().build }
|
|
94
|
-
describe '#gem' do
|
|
95
|
-
subject { super().gem }
|
|
96
|
-
it { is_expected.to be_nil }
|
|
97
|
-
end
|
|
98
|
-
end
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
context "build: {tar: true}" do
|
|
102
|
-
include_context "rake"
|
|
103
49
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
describe '#build' do
|
|
107
|
-
subject { super().build }
|
|
108
|
-
describe '#tar' do
|
|
109
|
-
subject { super().tar }
|
|
110
|
-
it { is_expected.to be_kind_of(Gem::Tasks::Build::Tar) }
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
|
|
115
|
-
context "build: {zip: true}" do
|
|
116
|
-
include_context "rake"
|
|
117
|
-
|
|
118
|
-
subject { described_class.new(build: {zip: true}) }
|
|
119
|
-
|
|
120
|
-
describe '#build' do
|
|
121
|
-
subject { super().build }
|
|
122
|
-
describe '#zip' do
|
|
123
|
-
subject { super().zip }
|
|
124
|
-
it { is_expected.to be_kind_of(Gem::Tasks::Build::Zip) }
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
context "scm: {status: false}" do
|
|
130
|
-
include_context "rake"
|
|
131
|
-
|
|
132
|
-
subject { described_class.new(scm: {status: false}) }
|
|
133
|
-
|
|
134
|
-
describe '#scm' do
|
|
135
|
-
subject { super().scm }
|
|
136
|
-
describe '#status' do
|
|
137
|
-
subject { super().status }
|
|
138
|
-
it { is_expected.to be_nil }
|
|
139
|
-
end
|
|
140
|
-
end
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
context "scm: {push: false}" do
|
|
144
|
-
include_context "rake"
|
|
145
|
-
|
|
146
|
-
subject { described_class.new(scm: {push: false}) }
|
|
147
|
-
|
|
148
|
-
describe '#scm' do
|
|
149
|
-
subject { super().scm }
|
|
150
|
-
describe '#push' do
|
|
151
|
-
subject { super().push }
|
|
152
|
-
it { is_expected.to be_nil }
|
|
153
|
-
end
|
|
154
|
-
end
|
|
155
|
-
end
|
|
156
|
-
|
|
157
|
-
context "scm: {tag: false}" do
|
|
158
|
-
include_context "rake"
|
|
159
|
-
|
|
160
|
-
subject { described_class.new(scm: {tag: false}) }
|
|
161
|
-
|
|
162
|
-
describe '#scm' do
|
|
163
|
-
subject { super().scm }
|
|
164
|
-
describe '#tag' do
|
|
165
|
-
subject { super().tag }
|
|
166
|
-
it { is_expected.to be_nil }
|
|
167
|
-
end
|
|
168
|
-
end
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
context "sign: {checksum: true}" do
|
|
172
|
-
include_context "rake"
|
|
173
|
-
|
|
174
|
-
subject { described_class.new(sign: {checksum: true}) }
|
|
175
|
-
|
|
176
|
-
describe '#sign' do
|
|
177
|
-
subject { super().sign }
|
|
178
|
-
describe '#checksum' do
|
|
179
|
-
subject { super().checksum }
|
|
180
|
-
it { is_expected.to be_kind_of(Gem::Tasks::Sign::Checksum) }
|
|
181
|
-
end
|
|
182
|
-
end
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
context "sign: {pgp: true}" do
|
|
186
|
-
include_context "rake"
|
|
187
|
-
|
|
188
|
-
subject { described_class.new(sign: {pgp: true}) }
|
|
189
|
-
|
|
190
|
-
describe '#sign' do
|
|
191
|
-
subject { super().sign }
|
|
192
|
-
describe '#pgp' do
|
|
193
|
-
subject { super().pgp }
|
|
194
|
-
it { is_expected.to be_kind_of(Gem::Tasks::Sign::PGP) }
|
|
195
|
-
end
|
|
50
|
+
it { is_expected.to be_kind_of(Gem::Tasks::Release) }
|
|
196
51
|
end
|
|
197
52
|
end
|
|
198
53
|
|
|
199
|
-
context "console: false" do
|
|
200
|
-
include_context "rake"
|
|
201
|
-
|
|
54
|
+
context "when given `console: false`" do
|
|
202
55
|
subject { described_class.new(console: false) }
|
|
203
56
|
|
|
204
57
|
describe '#console' do
|
|
205
58
|
subject { super().console }
|
|
59
|
+
|
|
206
60
|
it { is_expected.to be_nil }
|
|
207
61
|
end
|
|
208
62
|
end
|
|
209
63
|
|
|
210
|
-
context "install: false" do
|
|
211
|
-
include_context "rake"
|
|
212
|
-
|
|
64
|
+
context "when given `install: false`" do
|
|
213
65
|
subject { described_class.new(install: false) }
|
|
214
66
|
|
|
215
67
|
describe '#install' do
|
|
216
68
|
subject { super().install }
|
|
69
|
+
|
|
217
70
|
it { is_expected.to be_nil }
|
|
218
71
|
end
|
|
219
72
|
end
|
|
220
73
|
|
|
221
|
-
context "push: false" do
|
|
222
|
-
include_context "rake"
|
|
223
|
-
|
|
74
|
+
context "when given `push: false`" do
|
|
224
75
|
subject { described_class.new(push: false) }
|
|
225
76
|
|
|
226
77
|
describe '#push' do
|
|
227
78
|
subject { super().push }
|
|
79
|
+
|
|
228
80
|
it { is_expected.to be_nil }
|
|
229
81
|
end
|
|
230
82
|
end
|
|
231
83
|
|
|
232
|
-
context "release: false" do
|
|
233
|
-
include_context "rake"
|
|
234
|
-
|
|
84
|
+
context "when given `release: false`" do
|
|
235
85
|
subject { described_class.new(release: false) }
|
|
236
86
|
|
|
237
87
|
describe '#release' do
|
|
238
88
|
subject { super().release }
|
|
89
|
+
|
|
239
90
|
it { is_expected.to be_nil }
|
|
240
91
|
end
|
|
241
92
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rubygems-tasks
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Postmodern
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rake
|
|
@@ -42,20 +41,20 @@ dependencies:
|
|
|
42
41
|
name: bundler
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
|
-
- - "
|
|
44
|
+
- - ">="
|
|
46
45
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
46
|
+
version: 2.0.0
|
|
48
47
|
type: :development
|
|
49
48
|
prerelease: false
|
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
50
|
requirements:
|
|
52
|
-
- - "
|
|
51
|
+
- - ">="
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
55
|
-
description:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
version: 2.0.0
|
|
54
|
+
description: |
|
|
55
|
+
rubygems-tasks provides agnostic and unobtrusive Rake tasks for building and
|
|
56
|
+
releasing Ruby Gems. rubygems-tasks can be used in any existing Ruby project
|
|
57
|
+
that has a .gemspec file.
|
|
59
58
|
email: postmodern.mod3@gmail.com
|
|
60
59
|
executables: []
|
|
61
60
|
extensions: []
|
|
@@ -98,6 +97,7 @@ files:
|
|
|
98
97
|
- lib/rubygems/tasks/sign/task.rb
|
|
99
98
|
- lib/rubygems/tasks/task.rb
|
|
100
99
|
- rubygems-tasks.gemspec
|
|
100
|
+
- spec/build_spec.rb
|
|
101
101
|
- spec/console_spec.rb
|
|
102
102
|
- spec/install_spec.rb
|
|
103
103
|
- spec/project_spec.rb
|
|
@@ -125,7 +125,9 @@ files:
|
|
|
125
125
|
- spec/scm/push_spec.rb
|
|
126
126
|
- spec/scm/status_spec.rb
|
|
127
127
|
- spec/scm/tag_spec.rb
|
|
128
|
+
- spec/scm_spec.rb
|
|
128
129
|
- spec/sign/pgp_spec.rb
|
|
130
|
+
- spec/sign_spec.rb
|
|
129
131
|
- spec/spec_helper.rb
|
|
130
132
|
- spec/tasks_spec.rb
|
|
131
133
|
homepage: https://github.com/postmodern/rubygems-tasks#readme
|
|
@@ -136,7 +138,6 @@ metadata:
|
|
|
136
138
|
source_code_uri: https://github.com/postmodern/rubygems-tasks
|
|
137
139
|
bug_tracker_uri: https://github.com/postmodern/rubygems-tasks/issues
|
|
138
140
|
changelog_uri: https://github.com/postmodern/rubygems-tasks/blob/master/ChangeLog.md
|
|
139
|
-
post_install_message:
|
|
140
141
|
rdoc_options: []
|
|
141
142
|
require_paths:
|
|
142
143
|
- lib
|
|
@@ -151,8 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
151
152
|
- !ruby/object:Gem::Version
|
|
152
153
|
version: '0'
|
|
153
154
|
requirements: []
|
|
154
|
-
rubygems_version: 3.
|
|
155
|
-
signing_key:
|
|
155
|
+
rubygems_version: 3.6.9
|
|
156
156
|
specification_version: 4
|
|
157
|
-
summary: Rake tasks for
|
|
157
|
+
summary: Rake tasks for building and releasing Ruby Gems.
|
|
158
158
|
test_files: []
|