rubysmith 4.9.0 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +91 -117
  4. data/lib/rubysmith/builders/core.rb +0 -1
  5. data/lib/rubysmith/cli/actions/amazing_print.rb +25 -0
  6. data/lib/rubysmith/cli/actions/caliber.rb +25 -0
  7. data/lib/rubysmith/cli/actions/circle_ci.rb +25 -0
  8. data/lib/rubysmith/cli/actions/citation.rb +25 -0
  9. data/lib/rubysmith/cli/actions/community.rb +25 -0
  10. data/lib/rubysmith/cli/actions/conduct.rb +25 -0
  11. data/lib/rubysmith/cli/actions/console.rb +25 -0
  12. data/lib/rubysmith/cli/actions/contributions.rb +25 -0
  13. data/lib/rubysmith/cli/actions/debug.rb +25 -0
  14. data/lib/rubysmith/cli/actions/funding.rb +25 -0
  15. data/lib/rubysmith/cli/actions/git.rb +25 -0
  16. data/lib/rubysmith/cli/actions/git_hub.rb +25 -0
  17. data/lib/rubysmith/cli/actions/git_hub_ci.rb +25 -0
  18. data/lib/rubysmith/cli/actions/git_lint.rb +25 -0
  19. data/lib/rubysmith/cli/actions/guard.rb +25 -0
  20. data/lib/rubysmith/cli/actions/license.rb +25 -0
  21. data/lib/rubysmith/cli/actions/maximum.rb +25 -0
  22. data/lib/rubysmith/cli/actions/minimum.rb +25 -0
  23. data/lib/rubysmith/cli/actions/name.rb +23 -0
  24. data/lib/rubysmith/cli/actions/publish.rb +16 -4
  25. data/lib/rubysmith/cli/actions/rake.rb +25 -0
  26. data/lib/rubysmith/cli/actions/readme.rb +25 -0
  27. data/lib/rubysmith/cli/actions/reek.rb +25 -0
  28. data/lib/rubysmith/cli/actions/refinements.rb +25 -0
  29. data/lib/rubysmith/cli/actions/rspec.rb +25 -0
  30. data/lib/rubysmith/cli/actions/security.rb +25 -0
  31. data/lib/rubysmith/cli/actions/setup.rb +25 -0
  32. data/lib/rubysmith/cli/actions/simple_cov.rb +25 -0
  33. data/lib/rubysmith/cli/actions/versions.rb +25 -0
  34. data/lib/rubysmith/cli/actions/yard.rb +25 -0
  35. data/lib/rubysmith/cli/actions/zeitwerk.rb +25 -0
  36. data/lib/rubysmith/cli/{actions → commands}/build.rb +45 -7
  37. data/lib/rubysmith/cli/shell.rb +20 -18
  38. data/lib/rubysmith/configuration/contract.rb +78 -0
  39. data/lib/rubysmith/configuration/defaults.yml +52 -73
  40. data/lib/rubysmith/configuration/{content.rb → model.rb} +8 -22
  41. data/lib/rubysmith/configuration/transformers/current_time.rb +18 -0
  42. data/lib/rubysmith/configuration/transformers/git_email.rb +21 -0
  43. data/lib/rubysmith/configuration/transformers/git_hub_user.rb +21 -0
  44. data/lib/rubysmith/configuration/transformers/git_user.rb +24 -0
  45. data/lib/rubysmith/configuration/transformers/target_root.rb +18 -0
  46. data/lib/rubysmith/configuration/transformers/template_root.rb +32 -0
  47. data/lib/rubysmith/container.rb +23 -3
  48. data/lib/rubysmith/extensions/milestoner.rb +1 -1
  49. data/lib/rubysmith/extensions/pragmater.rb +8 -8
  50. data/lib/rubysmith/extensions/tocer.rb +8 -8
  51. data/lib/rubysmith/pathway.rb +1 -0
  52. data/lib/rubysmith/templates/%project_name%/Gemfile.erb +4 -4
  53. data/rubysmith.gemspec +16 -13
  54. data.tar.gz.sig +0 -0
  55. metadata +112 -46
  56. metadata.gz.sig +0 -0
  57. data/lib/rubysmith/cli/actions/config.rb +0 -33
  58. data/lib/rubysmith/cli/actions/container.rb +0 -20
  59. data/lib/rubysmith/cli/actions/import.rb +0 -11
  60. data/lib/rubysmith/cli/parser.rb +0 -35
  61. data/lib/rubysmith/cli/parsers/build.rb +0 -307
  62. data/lib/rubysmith/cli/parsers/core.rb +0 -72
  63. data/lib/rubysmith/configuration/enhancers/container.rb +0 -20
  64. data/lib/rubysmith/configuration/enhancers/current_time.rb +0 -14
  65. data/lib/rubysmith/configuration/enhancers/git_email.rb +0 -21
  66. data/lib/rubysmith/configuration/enhancers/git_hub_user.rb +0 -21
  67. data/lib/rubysmith/configuration/enhancers/git_user.rb +0 -25
  68. data/lib/rubysmith/configuration/enhancers/template_root.rb +0 -12
  69. data/lib/rubysmith/configuration/loader.rb +0 -44
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.9.0
4
+ version: 5.1.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: 2023-05-20 00:00:00.000000000 Z
38
+ date: 2023-06-17 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -43,182 +43,224 @@ dependencies:
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0.8'
46
+ version: '0.10'
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.8'
53
+ version: '0.10'
54
54
  - !ruby/object:Gem::Dependency
55
- name: core
55
+ name: dry-container
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '0.1'
60
+ version: '0.11'
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.1'
67
+ version: '0.11'
68
68
  - !ruby/object:Gem::Dependency
69
- name: dry-container
69
+ name: dry-monads
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.11'
74
+ version: '1.6'
75
75
  type: :runtime
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '0.11'
81
+ version: '1.6'
82
+ - !ruby/object:Gem::Dependency
83
+ name: dry-schema
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '1.13'
89
+ type: :runtime
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '1.13'
96
+ - !ruby/object:Gem::Dependency
97
+ name: etcher
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '0.2'
103
+ type: :runtime
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '0.2'
82
110
  - !ruby/object:Gem::Dependency
83
111
  name: gitt
84
112
  requirement: !ruby/object:Gem::Requirement
85
113
  requirements:
86
114
  - - "~>"
87
115
  - !ruby/object:Gem::Version
88
- version: '1.1'
116
+ version: '2.0'
89
117
  type: :runtime
90
118
  prerelease: false
91
119
  version_requirements: !ruby/object:Gem::Requirement
92
120
  requirements:
93
121
  - - "~>"
94
122
  - !ruby/object:Gem::Version
95
- version: '1.1'
123
+ version: '2.0'
96
124
  - !ruby/object:Gem::Dependency
97
125
  name: infusible
98
126
  requirement: !ruby/object:Gem::Requirement
99
127
  requirements:
100
128
  - - "~>"
101
129
  - !ruby/object:Gem::Version
102
- version: '1.0'
130
+ version: '2.0'
103
131
  type: :runtime
104
132
  prerelease: false
105
133
  version_requirements: !ruby/object:Gem::Requirement
106
134
  requirements:
107
135
  - - "~>"
108
136
  - !ruby/object:Gem::Version
109
- version: '1.0'
137
+ version: '2.0'
110
138
  - !ruby/object:Gem::Dependency
111
139
  name: milestoner
112
140
  requirement: !ruby/object:Gem::Requirement
113
141
  requirements:
114
142
  - - "~>"
115
143
  - !ruby/object:Gem::Version
116
- version: '15.3'
144
+ version: '16.0'
117
145
  type: :runtime
118
146
  prerelease: false
119
147
  version_requirements: !ruby/object:Gem::Requirement
120
148
  requirements:
121
149
  - - "~>"
122
150
  - !ruby/object:Gem::Version
123
- version: '15.3'
151
+ version: '16.0'
124
152
  - !ruby/object:Gem::Dependency
125
153
  name: pragmater
126
154
  requirement: !ruby/object:Gem::Requirement
127
155
  requirements:
128
156
  - - "~>"
129
157
  - !ruby/object:Gem::Version
130
- version: '12.2'
158
+ version: '13.0'
131
159
  type: :runtime
132
160
  prerelease: false
133
161
  version_requirements: !ruby/object:Gem::Requirement
134
162
  requirements:
135
163
  - - "~>"
136
164
  - !ruby/object:Gem::Version
137
- version: '12.2'
165
+ version: '13.0'
138
166
  - !ruby/object:Gem::Dependency
139
167
  name: refinements
140
168
  requirement: !ruby/object:Gem::Requirement
141
169
  requirements:
142
170
  - - "~>"
143
171
  - !ruby/object:Gem::Version
144
- version: '10.0'
172
+ version: '11.0'
145
173
  type: :runtime
146
174
  prerelease: false
147
175
  version_requirements: !ruby/object:Gem::Requirement
148
176
  requirements:
149
177
  - - "~>"
150
178
  - !ruby/object:Gem::Version
151
- version: '10.0'
179
+ version: '11.0'
152
180
  - !ruby/object:Gem::Dependency
153
181
  name: rubocop
154
182
  requirement: !ruby/object:Gem::Requirement
155
183
  requirements:
156
184
  - - "~>"
157
185
  - !ruby/object:Gem::Version
158
- version: '1.41'
186
+ version: '1.52'
159
187
  type: :runtime
160
188
  prerelease: false
161
189
  version_requirements: !ruby/object:Gem::Requirement
162
190
  requirements:
163
191
  - - "~>"
164
192
  - !ruby/object:Gem::Version
165
- version: '1.41'
193
+ version: '1.52'
166
194
  - !ruby/object:Gem::Dependency
167
195
  name: runcom
168
196
  requirement: !ruby/object:Gem::Requirement
169
197
  requirements:
170
198
  - - "~>"
171
199
  - !ruby/object:Gem::Version
172
- version: '9.0'
200
+ version: '10.0'
201
+ type: :runtime
202
+ prerelease: false
203
+ version_requirements: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - "~>"
206
+ - !ruby/object:Gem::Version
207
+ version: '10.0'
208
+ - !ruby/object:Gem::Dependency
209
+ name: sod
210
+ requirement: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - "~>"
213
+ - !ruby/object:Gem::Version
214
+ version: '0.0'
173
215
  type: :runtime
174
216
  prerelease: false
175
217
  version_requirements: !ruby/object:Gem::Requirement
176
218
  requirements:
177
219
  - - "~>"
178
220
  - !ruby/object:Gem::Version
179
- version: '9.0'
221
+ version: '0.0'
180
222
  - !ruby/object:Gem::Dependency
181
223
  name: spek
182
224
  requirement: !ruby/object:Gem::Requirement
183
225
  requirements:
184
226
  - - "~>"
185
227
  - !ruby/object:Gem::Version
186
- version: '1.1'
228
+ version: '2.0'
187
229
  type: :runtime
188
230
  prerelease: false
189
231
  version_requirements: !ruby/object:Gem::Requirement
190
232
  requirements:
191
233
  - - "~>"
192
234
  - !ruby/object:Gem::Version
193
- version: '1.1'
235
+ version: '2.0'
194
236
  - !ruby/object:Gem::Dependency
195
237
  name: tocer
196
238
  requirement: !ruby/object:Gem::Requirement
197
239
  requirements:
198
240
  - - "~>"
199
241
  - !ruby/object:Gem::Version
200
- version: '15.2'
242
+ version: '16.0'
201
243
  type: :runtime
202
244
  prerelease: false
203
245
  version_requirements: !ruby/object:Gem::Requirement
204
246
  requirements:
205
247
  - - "~>"
206
248
  - !ruby/object:Gem::Version
207
- version: '15.2'
249
+ version: '16.0'
208
250
  - !ruby/object:Gem::Dependency
209
251
  name: tone
210
252
  requirement: !ruby/object:Gem::Requirement
211
253
  requirements:
212
254
  - - "~>"
213
255
  - !ruby/object:Gem::Version
214
- version: '0.1'
256
+ version: '0.3'
215
257
  type: :runtime
216
258
  prerelease: false
217
259
  version_requirements: !ruby/object:Gem::Requirement
218
260
  requirements:
219
261
  - - "~>"
220
262
  - !ruby/object:Gem::Version
221
- version: '0.1'
263
+ version: '0.3'
222
264
  - !ruby/object:Gem::Dependency
223
265
  name: zeitwerk
224
266
  requirement: !ruby/object:Gem::Requirement
@@ -271,24 +313,48 @@ files:
271
313
  - lib/rubysmith/builders/rspec/helper.rb
272
314
  - lib/rubysmith/builders/setup.rb
273
315
  - lib/rubysmith/builders/version.rb
274
- - lib/rubysmith/cli/actions/build.rb
275
- - lib/rubysmith/cli/actions/config.rb
276
- - lib/rubysmith/cli/actions/container.rb
277
- - lib/rubysmith/cli/actions/import.rb
316
+ - lib/rubysmith/cli/actions/amazing_print.rb
317
+ - lib/rubysmith/cli/actions/caliber.rb
318
+ - lib/rubysmith/cli/actions/circle_ci.rb
319
+ - lib/rubysmith/cli/actions/citation.rb
320
+ - lib/rubysmith/cli/actions/community.rb
321
+ - lib/rubysmith/cli/actions/conduct.rb
322
+ - lib/rubysmith/cli/actions/console.rb
323
+ - lib/rubysmith/cli/actions/contributions.rb
324
+ - lib/rubysmith/cli/actions/debug.rb
325
+ - lib/rubysmith/cli/actions/funding.rb
326
+ - lib/rubysmith/cli/actions/git.rb
327
+ - lib/rubysmith/cli/actions/git_hub.rb
328
+ - lib/rubysmith/cli/actions/git_hub_ci.rb
329
+ - lib/rubysmith/cli/actions/git_lint.rb
330
+ - lib/rubysmith/cli/actions/guard.rb
331
+ - lib/rubysmith/cli/actions/license.rb
332
+ - lib/rubysmith/cli/actions/maximum.rb
333
+ - lib/rubysmith/cli/actions/minimum.rb
334
+ - lib/rubysmith/cli/actions/name.rb
278
335
  - lib/rubysmith/cli/actions/publish.rb
279
- - lib/rubysmith/cli/parser.rb
280
- - lib/rubysmith/cli/parsers/build.rb
281
- - lib/rubysmith/cli/parsers/core.rb
336
+ - lib/rubysmith/cli/actions/rake.rb
337
+ - lib/rubysmith/cli/actions/readme.rb
338
+ - lib/rubysmith/cli/actions/reek.rb
339
+ - lib/rubysmith/cli/actions/refinements.rb
340
+ - lib/rubysmith/cli/actions/rspec.rb
341
+ - lib/rubysmith/cli/actions/security.rb
342
+ - lib/rubysmith/cli/actions/setup.rb
343
+ - lib/rubysmith/cli/actions/simple_cov.rb
344
+ - lib/rubysmith/cli/actions/versions.rb
345
+ - lib/rubysmith/cli/actions/yard.rb
346
+ - lib/rubysmith/cli/actions/zeitwerk.rb
347
+ - lib/rubysmith/cli/commands/build.rb
282
348
  - lib/rubysmith/cli/shell.rb
283
- - lib/rubysmith/configuration/content.rb
349
+ - lib/rubysmith/configuration/contract.rb
284
350
  - lib/rubysmith/configuration/defaults.yml
285
- - lib/rubysmith/configuration/enhancers/container.rb
286
- - lib/rubysmith/configuration/enhancers/current_time.rb
287
- - lib/rubysmith/configuration/enhancers/git_email.rb
288
- - lib/rubysmith/configuration/enhancers/git_hub_user.rb
289
- - lib/rubysmith/configuration/enhancers/git_user.rb
290
- - lib/rubysmith/configuration/enhancers/template_root.rb
291
- - lib/rubysmith/configuration/loader.rb
351
+ - lib/rubysmith/configuration/model.rb
352
+ - lib/rubysmith/configuration/transformers/current_time.rb
353
+ - lib/rubysmith/configuration/transformers/git_email.rb
354
+ - lib/rubysmith/configuration/transformers/git_hub_user.rb
355
+ - lib/rubysmith/configuration/transformers/git_user.rb
356
+ - lib/rubysmith/configuration/transformers/target_root.rb
357
+ - lib/rubysmith/configuration/transformers/template_root.rb
292
358
  - lib/rubysmith/container.rb
293
359
  - lib/rubysmith/extensions/bundler.rb
294
360
  - lib/rubysmith/extensions/milestoner.rb
@@ -359,7 +425,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
359
425
  - !ruby/object:Gem::Version
360
426
  version: '0'
361
427
  requirements: []
362
- rubygems_version: 3.4.13
428
+ rubygems_version: 3.4.14
363
429
  signing_key:
364
430
  specification_version: 4
365
431
  summary: A command line interface for smithing Ruby projects.
metadata.gz.sig CHANGED
Binary file
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Rubysmith
4
- module CLI
5
- module Actions
6
- # Handles the config action.
7
- class Config
8
- include Rubysmith::Import[:kernel, :logger]
9
-
10
- def initialize(client: Configuration::Loader::CLIENT, **)
11
- super(**)
12
- @client = client
13
- end
14
-
15
- def call selection
16
- case selection
17
- when :edit then edit
18
- when :view then view
19
- else logger.error { "Invalid configuration selection: #{selection}." }
20
- end
21
- end
22
-
23
- private
24
-
25
- attr_reader :client
26
-
27
- def edit = kernel.system("$EDITOR #{client.current}")
28
-
29
- def view = kernel.system("cat #{client.current}")
30
- end
31
- end
32
- end
33
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "dry/container"
4
-
5
- module Rubysmith
6
- module CLI
7
- module Actions
8
- # Provides a single container with application and action specific dependencies.
9
- module Container
10
- extend Dry::Container::Mixin
11
-
12
- merge Rubysmith::Container
13
-
14
- register(:build) { Build.new }
15
- register(:config) { Config.new }
16
- register(:publish) { Publish.new }
17
- end
18
- end
19
- end
20
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "infusible"
4
-
5
- module Rubysmith
6
- module CLI
7
- module Actions
8
- Import = Infusible.with Container
9
- end
10
- end
11
- end
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "core"
4
- require "optparse"
5
-
6
- module Rubysmith
7
- module CLI
8
- # Assembles and parses all Command Line Interface (CLI) options.
9
- class Parser
10
- include Import[:configuration]
11
-
12
- CLIENT = OptionParser.new nil, 40, " "
13
- SECTIONS = [Parsers::Core, Parsers::Build].freeze # Order is important.
14
-
15
- def initialize(sections: SECTIONS, client: CLIENT, **)
16
- super(**)
17
- @sections = sections
18
- @client = client
19
- @configuration_duplicate = configuration.dup
20
- end
21
-
22
- def call arguments = Core::EMPTY_ARRAY
23
- sections.each { |section| section.call configuration_duplicate, client: }
24
- client.parse arguments
25
- configuration_duplicate.freeze
26
- end
27
-
28
- def to_s = client.to_s
29
-
30
- private
31
-
32
- attr_reader :sections, :client, :configuration_duplicate
33
- end
34
- end
35
- end