rubysmith 6.9.0 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.adoc +46 -57
- data/lib/rubysmith/builder.rb +9 -9
- data/lib/rubysmith/builders/abstract.rb +4 -4
- data/lib/rubysmith/builders/bundler.rb +2 -2
- data/lib/rubysmith/builders/caliber.rb +4 -4
- data/lib/rubysmith/builders/circle_ci.rb +3 -3
- data/lib/rubysmith/builders/console.rb +3 -3
- data/lib/rubysmith/builders/core.rb +6 -6
- data/lib/rubysmith/builders/documentation/citation.rb +3 -3
- data/lib/rubysmith/builders/documentation/license.rb +8 -9
- data/lib/rubysmith/builders/documentation/readme.rb +4 -4
- data/lib/rubysmith/builders/documentation/version.rb +4 -5
- data/lib/rubysmith/builders/git/commit.rb +4 -8
- data/lib/rubysmith/builders/git/ignore.rb +3 -3
- data/lib/rubysmith/builders/git/safe.rb +3 -3
- data/lib/rubysmith/builders/git/setup.rb +3 -3
- data/lib/rubysmith/builders/git_hub/ci.rb +27 -0
- data/lib/rubysmith/builders/git_hub/funding.rb +23 -0
- data/lib/rubysmith/builders/git_hub/template.rb +32 -0
- data/lib/rubysmith/builders/guard.rb +4 -4
- data/lib/rubysmith/builders/init.rb +2 -2
- data/lib/rubysmith/builders/rake/binstub.rb +24 -0
- data/lib/rubysmith/builders/rake/configuration.rb +29 -0
- data/lib/rubysmith/builders/reek.rb +3 -3
- data/lib/rubysmith/builders/rspec/binstub.rb +3 -3
- data/lib/rubysmith/builders/rspec/context.rb +6 -6
- data/lib/rubysmith/builders/rspec/helper.rb +3 -3
- data/lib/rubysmith/builders/setup.rb +3 -3
- data/lib/rubysmith/builders/version.rb +2 -2
- data/lib/rubysmith/cli/actions/amazing_print.rb +3 -3
- data/lib/rubysmith/cli/actions/caliber.rb +3 -3
- data/lib/rubysmith/cli/actions/circle_ci.rb +4 -4
- data/lib/rubysmith/cli/actions/citation.rb +3 -3
- data/lib/rubysmith/cli/actions/community.rb +3 -3
- data/lib/rubysmith/cli/actions/conduct.rb +3 -3
- data/lib/rubysmith/cli/actions/console.rb +3 -3
- data/lib/rubysmith/cli/actions/contributions.rb +3 -3
- data/lib/rubysmith/cli/actions/debug.rb +3 -3
- data/lib/rubysmith/cli/actions/funding.rb +4 -4
- data/lib/rubysmith/cli/actions/git.rb +3 -3
- data/lib/rubysmith/cli/actions/git_hub.rb +3 -3
- data/lib/rubysmith/cli/actions/git_hub_ci.rb +3 -3
- data/lib/rubysmith/cli/actions/git_lint.rb +3 -3
- data/lib/rubysmith/cli/actions/guard.rb +3 -3
- data/lib/rubysmith/cli/actions/irb_kit.rb +3 -3
- data/lib/rubysmith/cli/actions/license.rb +3 -3
- data/lib/rubysmith/cli/actions/maximum.rb +4 -4
- data/lib/rubysmith/cli/actions/minimum.rb +4 -4
- data/lib/rubysmith/cli/actions/name.rb +2 -2
- data/lib/rubysmith/cli/actions/rake.rb +3 -3
- data/lib/rubysmith/cli/actions/readme.rb +3 -3
- data/lib/rubysmith/cli/actions/reek.rb +3 -3
- data/lib/rubysmith/cli/actions/refinements.rb +3 -3
- data/lib/rubysmith/cli/actions/rspec.rb +3 -3
- data/lib/rubysmith/cli/actions/rtc.rb +3 -3
- data/lib/rubysmith/cli/actions/security.rb +3 -3
- data/lib/rubysmith/cli/actions/setup.rb +3 -3
- data/lib/rubysmith/cli/actions/simple_cov.rb +3 -3
- data/lib/rubysmith/cli/actions/versions.rb +3 -3
- data/lib/rubysmith/cli/actions/zeitwerk.rb +3 -3
- data/lib/rubysmith/cli/commands/build.rb +33 -31
- data/lib/rubysmith/cli/shell.rb +0 -1
- data/lib/rubysmith/configuration/contract.rb +16 -14
- data/lib/rubysmith/configuration/defaults.yml +21 -1
- data/lib/rubysmith/configuration/model.rb +30 -28
- data/lib/rubysmith/configuration/transformers/git_hub_user.rb +2 -2
- data/lib/rubysmith/container.rb +19 -9
- data/lib/rubysmith/extensions/bundler.rb +7 -7
- data/lib/rubysmith/extensions/pragmater.rb +10 -10
- data/lib/rubysmith/extensions/rubocop.rb +7 -7
- data/lib/rubysmith/extensions/tocer.rb +8 -8
- data/lib/rubysmith/renderers/erb.rb +4 -4
- data/lib/rubysmith/templates/%project_name%/.circleci/config.yml.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/.github/FUNDING.yml.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/.github/workflows/ci.yml.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/CITATION.cff.erb +12 -12
- data/lib/rubysmith/templates/%project_name%/Gemfile.erb +19 -19
- data/lib/rubysmith/templates/%project_name%/LICENSE-apache.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/LICENSE-apache.md.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/LICENSE-mit.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/LICENSE-mit.md.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/README.adoc.erb +21 -21
- data/lib/rubysmith/templates/%project_name%/README.md.erb +21 -21
- data/lib/rubysmith/templates/%project_name%/Rakefile.erb +10 -10
- data/lib/rubysmith/templates/%project_name%/VERSIONS.adoc.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/VERSIONS.md.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/bin/console.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/bin/setup.erb +1 -1
- data/lib/rubysmith/templates/%project_name%/lib/%project_path%.rb.erb +7 -7
- data/lib/rubysmith/templates/%project_name%/spec/lib/%project_path%_spec.rb.erb +2 -2
- data/lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb +4 -4
- data/lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb +3 -3
- data/lib/rubysmith.rb +1 -0
- data/rubysmith.gemspec +12 -13
- data.tar.gz.sig +0 -0
- metadata +30 -45
- metadata.gz.sig +4 -3
- data/lib/rubysmith/builders/git_hub.rb +0 -39
- data/lib/rubysmith/builders/git_hub_ci.rb +0 -25
- data/lib/rubysmith/builders/rake.rb +0 -39
- data/lib/rubysmith/cli/actions/publish.rb +0 -35
- data/lib/rubysmith/configuration/transformers/target_root.rb +0 -18
- data/lib/rubysmith/extensions/milestoner.rb +0 -23
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubysmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-
|
38
|
+
date: 2024-07-10 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
@@ -43,28 +43,28 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
46
|
+
version: '0.21'
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
53
|
+
version: '0.21'
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
55
|
name: containable
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
60
|
+
version: '0.2'
|
61
61
|
type: :runtime
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0.
|
67
|
+
version: '0.2'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: dry-monads
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,126 +99,112 @@ dependencies:
|
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '1
|
102
|
+
version: '2.1'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '1
|
109
|
+
version: '2.1'
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: gitt
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '3.
|
116
|
+
version: '3.6'
|
117
117
|
type: :runtime
|
118
118
|
prerelease: false
|
119
119
|
version_requirements: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '3.
|
123
|
+
version: '3.6'
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: infusible
|
126
126
|
requirement: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '3.
|
131
|
-
type: :runtime
|
132
|
-
prerelease: false
|
133
|
-
version_requirements: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '3.5'
|
138
|
-
- !ruby/object:Gem::Dependency
|
139
|
-
name: milestoner
|
140
|
-
requirement: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '17.8'
|
130
|
+
version: '3.8'
|
145
131
|
type: :runtime
|
146
132
|
prerelease: false
|
147
133
|
version_requirements: !ruby/object:Gem::Requirement
|
148
134
|
requirements:
|
149
135
|
- - "~>"
|
150
136
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
137
|
+
version: '3.8'
|
152
138
|
- !ruby/object:Gem::Dependency
|
153
139
|
name: pragmater
|
154
140
|
requirement: !ruby/object:Gem::Requirement
|
155
141
|
requirements:
|
156
142
|
- - "~>"
|
157
143
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
144
|
+
version: '15.0'
|
159
145
|
type: :runtime
|
160
146
|
prerelease: false
|
161
147
|
version_requirements: !ruby/object:Gem::Requirement
|
162
148
|
requirements:
|
163
149
|
- - "~>"
|
164
150
|
- !ruby/object:Gem::Version
|
165
|
-
version: '
|
151
|
+
version: '15.0'
|
166
152
|
- !ruby/object:Gem::Dependency
|
167
153
|
name: refinements
|
168
154
|
requirement: !ruby/object:Gem::Requirement
|
169
155
|
requirements:
|
170
156
|
- - "~>"
|
171
157
|
- !ruby/object:Gem::Version
|
172
|
-
version: '12.
|
158
|
+
version: '12.5'
|
173
159
|
type: :runtime
|
174
160
|
prerelease: false
|
175
161
|
version_requirements: !ruby/object:Gem::Requirement
|
176
162
|
requirements:
|
177
163
|
- - "~>"
|
178
164
|
- !ruby/object:Gem::Version
|
179
|
-
version: '12.
|
165
|
+
version: '12.5'
|
180
166
|
- !ruby/object:Gem::Dependency
|
181
167
|
name: rubocop
|
182
168
|
requirement: !ruby/object:Gem::Requirement
|
183
169
|
requirements:
|
184
170
|
- - "~>"
|
185
171
|
- !ruby/object:Gem::Version
|
186
|
-
version: '1.
|
172
|
+
version: '1.65'
|
187
173
|
type: :runtime
|
188
174
|
prerelease: false
|
189
175
|
version_requirements: !ruby/object:Gem::Requirement
|
190
176
|
requirements:
|
191
177
|
- - "~>"
|
192
178
|
- !ruby/object:Gem::Version
|
193
|
-
version: '1.
|
179
|
+
version: '1.65'
|
194
180
|
- !ruby/object:Gem::Dependency
|
195
181
|
name: runcom
|
196
182
|
requirement: !ruby/object:Gem::Requirement
|
197
183
|
requirements:
|
198
184
|
- - "~>"
|
199
185
|
- !ruby/object:Gem::Version
|
200
|
-
version: '11.
|
186
|
+
version: '11.5'
|
201
187
|
type: :runtime
|
202
188
|
prerelease: false
|
203
189
|
version_requirements: !ruby/object:Gem::Requirement
|
204
190
|
requirements:
|
205
191
|
- - "~>"
|
206
192
|
- !ruby/object:Gem::Version
|
207
|
-
version: '11.
|
193
|
+
version: '11.5'
|
208
194
|
- !ruby/object:Gem::Dependency
|
209
195
|
name: sod
|
210
196
|
requirement: !ruby/object:Gem::Requirement
|
211
197
|
requirements:
|
212
198
|
- - "~>"
|
213
199
|
- !ruby/object:Gem::Version
|
214
|
-
version: '0.
|
200
|
+
version: '0.12'
|
215
201
|
type: :runtime
|
216
202
|
prerelease: false
|
217
203
|
version_requirements: !ruby/object:Gem::Requirement
|
218
204
|
requirements:
|
219
205
|
- - "~>"
|
220
206
|
- !ruby/object:Gem::Version
|
221
|
-
version: '0.
|
207
|
+
version: '0.12'
|
222
208
|
- !ruby/object:Gem::Dependency
|
223
209
|
name: spek
|
224
210
|
requirement: !ruby/object:Gem::Requirement
|
@@ -239,14 +225,14 @@ dependencies:
|
|
239
225
|
requirements:
|
240
226
|
- - "~>"
|
241
227
|
- !ruby/object:Gem::Version
|
242
|
-
version: '
|
228
|
+
version: '18.0'
|
243
229
|
type: :runtime
|
244
230
|
prerelease: false
|
245
231
|
version_requirements: !ruby/object:Gem::Requirement
|
246
232
|
requirements:
|
247
233
|
- - "~>"
|
248
234
|
- !ruby/object:Gem::Version
|
249
|
-
version: '
|
235
|
+
version: '18.0'
|
250
236
|
- !ruby/object:Gem::Dependency
|
251
237
|
name: tone
|
252
238
|
requirement: !ruby/object:Gem::Requirement
|
@@ -304,11 +290,13 @@ files:
|
|
304
290
|
- lib/rubysmith/builders/git/ignore.rb
|
305
291
|
- lib/rubysmith/builders/git/safe.rb
|
306
292
|
- lib/rubysmith/builders/git/setup.rb
|
307
|
-
- lib/rubysmith/builders/git_hub.rb
|
308
|
-
- lib/rubysmith/builders/
|
293
|
+
- lib/rubysmith/builders/git_hub/ci.rb
|
294
|
+
- lib/rubysmith/builders/git_hub/funding.rb
|
295
|
+
- lib/rubysmith/builders/git_hub/template.rb
|
309
296
|
- lib/rubysmith/builders/guard.rb
|
310
297
|
- lib/rubysmith/builders/init.rb
|
311
|
-
- lib/rubysmith/builders/rake.rb
|
298
|
+
- lib/rubysmith/builders/rake/binstub.rb
|
299
|
+
- lib/rubysmith/builders/rake/configuration.rb
|
312
300
|
- lib/rubysmith/builders/reek.rb
|
313
301
|
- lib/rubysmith/builders/rspec/binstub.rb
|
314
302
|
- lib/rubysmith/builders/rspec/context.rb
|
@@ -335,7 +323,6 @@ files:
|
|
335
323
|
- lib/rubysmith/cli/actions/maximum.rb
|
336
324
|
- lib/rubysmith/cli/actions/minimum.rb
|
337
325
|
- lib/rubysmith/cli/actions/name.rb
|
338
|
-
- lib/rubysmith/cli/actions/publish.rb
|
339
326
|
- lib/rubysmith/cli/actions/rake.rb
|
340
327
|
- lib/rubysmith/cli/actions/readme.rb
|
341
328
|
- lib/rubysmith/cli/actions/reek.rb
|
@@ -355,11 +342,9 @@ files:
|
|
355
342
|
- lib/rubysmith/configuration/transformers/git_email.rb
|
356
343
|
- lib/rubysmith/configuration/transformers/git_hub_user.rb
|
357
344
|
- lib/rubysmith/configuration/transformers/git_user.rb
|
358
|
-
- lib/rubysmith/configuration/transformers/target_root.rb
|
359
345
|
- lib/rubysmith/configuration/transformers/template_root.rb
|
360
346
|
- lib/rubysmith/container.rb
|
361
347
|
- lib/rubysmith/extensions/bundler.rb
|
362
|
-
- lib/rubysmith/extensions/milestoner.rb
|
363
348
|
- lib/rubysmith/extensions/pragmater.rb
|
364
349
|
- lib/rubysmith/extensions/rubocop.rb
|
365
350
|
- lib/rubysmith/extensions/tocer.rb
|
@@ -428,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
428
413
|
- !ruby/object:Gem::Version
|
429
414
|
version: '0'
|
430
415
|
requirements: []
|
431
|
-
rubygems_version: 3.5.
|
416
|
+
rubygems_version: 3.5.15
|
432
417
|
signing_key:
|
433
418
|
specification_version: 4
|
434
419
|
summary: A command line interface for smithing Ruby projects.
|
metadata.gz.sig
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
���R4ٕ�N�HxӘ\?���&��:��T{R�Ch�BM5�l����b��n�����ul�#�"@��� 6��
|
2
|
+
Ԏ��r����6�jޔ@!�1�
|
3
|
+
��=��(;E����l��Z��{7
|
4
|
+
ӟA堹(5����o�G���ٺ&\m���s�t@$r��cΞ�WL��ݕ��xg&\Aǽ�L���ˮM��Q����6�L��Bnf?���o�R��k��O�b��Zi��k��$�a=i����djgu����à�.�ܨr�0����w7+Ɏp4Jv�J�'������x��2 ��tRpZ4�'����N$��ʚ�k��A��U���>��o�gnjh��K�H��g2�����^Z}2��Z�9Z�f����;J
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "refinements/struct"
|
4
|
-
|
5
|
-
module Rubysmith
|
6
|
-
module Builders
|
7
|
-
# Builds project skeleton GitHub templates.
|
8
|
-
class GitHub < Abstract
|
9
|
-
using Refinements::Struct
|
10
|
-
|
11
|
-
def call
|
12
|
-
render_funding
|
13
|
-
|
14
|
-
return configuration unless configuration.build_git_hub
|
15
|
-
|
16
|
-
builder.call(with_issue_template).render
|
17
|
-
builder.call(with_pull_request_template).render
|
18
|
-
configuration
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def render_funding
|
24
|
-
return unless configuration.build_funding
|
25
|
-
|
26
|
-
configuration.merge(template_path: "%project_name%/.github/FUNDING.yml.erb")
|
27
|
-
.then { |updated_configuration| builder.call(updated_configuration).render }
|
28
|
-
end
|
29
|
-
|
30
|
-
def with_issue_template
|
31
|
-
configuration.merge template_path: "%project_name%/.github/ISSUE_TEMPLATE.md.erb"
|
32
|
-
end
|
33
|
-
|
34
|
-
def with_pull_request_template
|
35
|
-
configuration.merge template_path: "%project_name%/.github/PULL_REQUEST_TEMPLATE.md.erb"
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "refinements/struct"
|
4
|
-
|
5
|
-
module Rubysmith
|
6
|
-
module Builders
|
7
|
-
# Builds project skeleton GitHub CI template.
|
8
|
-
class GitHubCI < Abstract
|
9
|
-
using Refinements::Struct
|
10
|
-
|
11
|
-
def call
|
12
|
-
return configuration unless configuration.build_git_hub_ci
|
13
|
-
|
14
|
-
builder.call(configuration_with_template).render.replace(/\n\n\Z/, "\n")
|
15
|
-
configuration
|
16
|
-
end
|
17
|
-
|
18
|
-
private
|
19
|
-
|
20
|
-
def configuration_with_template
|
21
|
-
configuration.merge template_path: "%project_name%/.github/workflows/ci.yml.erb"
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "refinements/struct"
|
4
|
-
|
5
|
-
module Rubysmith
|
6
|
-
module Builders
|
7
|
-
# Builds project skeleton Rake support.
|
8
|
-
class Rake < Abstract
|
9
|
-
using Refinements::Struct
|
10
|
-
|
11
|
-
def call
|
12
|
-
return configuration unless configuration.build_rake
|
13
|
-
|
14
|
-
add_binstub
|
15
|
-
add_configuration
|
16
|
-
configuration
|
17
|
-
end
|
18
|
-
|
19
|
-
private
|
20
|
-
|
21
|
-
def add_binstub
|
22
|
-
builder.call(configuration.merge(template_path: "%project_name%/bin/rake.erb"))
|
23
|
-
.render
|
24
|
-
.permit 0o755
|
25
|
-
end
|
26
|
-
|
27
|
-
def add_configuration
|
28
|
-
builder.call(configuration.merge(template_path: "%project_name%/Rakefile.erb"))
|
29
|
-
.render
|
30
|
-
.replace(/\[\s+/, "[")
|
31
|
-
.replace(/\s+\]/, "]")
|
32
|
-
.replace(" ", "")
|
33
|
-
.replace("task.options", " task.options")
|
34
|
-
.replace(/\n+(?=require)/, "\n")
|
35
|
-
.replace(/\n{2,}/, "\n\n")
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "milestoner"
|
4
|
-
require "refinements/struct"
|
5
|
-
require "sod"
|
6
|
-
|
7
|
-
module Rubysmith
|
8
|
-
module CLI
|
9
|
-
module Actions
|
10
|
-
# Publishes project.
|
11
|
-
class Publish < Sod::Action
|
12
|
-
include Import[:input]
|
13
|
-
|
14
|
-
using ::Refinements::Struct
|
15
|
-
|
16
|
-
description "Publish milestone."
|
17
|
-
|
18
|
-
on %w[-p --publish], argument: "[VERSION]"
|
19
|
-
|
20
|
-
default { Milestoner::Commits::Versioner.new.call }
|
21
|
-
|
22
|
-
def initialize(extension: Extensions::Milestoner, **)
|
23
|
-
super(**)
|
24
|
-
@extension = extension
|
25
|
-
end
|
26
|
-
|
27
|
-
def call(version = nil) = extension.call input.merge(project_version: version || default)
|
28
|
-
|
29
|
-
private
|
30
|
-
|
31
|
-
attr_reader :extension
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "dry/monads"
|
4
|
-
|
5
|
-
module Rubysmith
|
6
|
-
module Configuration
|
7
|
-
# Sets target root which defaults to current directory when key is missing.
|
8
|
-
module Transformers
|
9
|
-
include Dry::Monads[:result]
|
10
|
-
|
11
|
-
TargetRoot = lambda do |attributes, key = :target_root, path: Pathname.pwd|
|
12
|
-
attributes.fetch(:target_root) { path }
|
13
|
-
.then { |value| attributes.merge! key => value }
|
14
|
-
.then { |updated_attributes| Dry::Monads::Success updated_attributes }
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "milestoner"
|
4
|
-
|
5
|
-
module Rubysmith
|
6
|
-
module Extensions
|
7
|
-
# Ensures project can be published (tagged) in a reliable and consistent fashion.
|
8
|
-
class Milestoner
|
9
|
-
def self.call(...) = new(...).call
|
10
|
-
|
11
|
-
def initialize configuration, client: ::Milestoner::Tags::Publisher.new
|
12
|
-
@configuration = configuration
|
13
|
-
@client = client
|
14
|
-
end
|
15
|
-
|
16
|
-
def call = client.call(configuration.project_version) && configuration
|
17
|
-
|
18
|
-
private
|
19
|
-
|
20
|
-
attr_reader :configuration, :client
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|