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