rubysmith 7.1.0 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +89 -7
  4. data/lib/rubysmith/builders/bundler.rb +1 -1
  5. data/lib/rubysmith/builders/dev_container/compose.rb +22 -0
  6. data/lib/rubysmith/builders/dev_container/configuration.rb +22 -0
  7. data/lib/rubysmith/builders/dev_container/dockerfile.rb +22 -0
  8. data/lib/rubysmith/builders/docker/build.rb +24 -0
  9. data/lib/rubysmith/builders/docker/console.rb +24 -0
  10. data/lib/rubysmith/builders/docker/entrypoint.rb +24 -0
  11. data/lib/rubysmith/builders/docker/file.rb +21 -0
  12. data/lib/rubysmith/builders/docker/ignore.rb +21 -0
  13. data/lib/rubysmith/cli/actions/amazing_print.rb +1 -1
  14. data/lib/rubysmith/cli/actions/bootsnap.rb +22 -0
  15. data/lib/rubysmith/cli/actions/caliber.rb +1 -1
  16. data/lib/rubysmith/cli/actions/circle_ci.rb +2 -2
  17. data/lib/rubysmith/cli/actions/citation.rb +1 -1
  18. data/lib/rubysmith/cli/actions/community.rb +1 -1
  19. data/lib/rubysmith/cli/actions/conduct.rb +1 -1
  20. data/lib/rubysmith/cli/actions/console.rb +1 -1
  21. data/lib/rubysmith/cli/actions/contributions.rb +1 -1
  22. data/lib/rubysmith/cli/actions/dcoo.rb +22 -0
  23. data/lib/rubysmith/cli/actions/debug.rb +1 -1
  24. data/lib/rubysmith/cli/actions/dev_container.rb +22 -0
  25. data/lib/rubysmith/cli/actions/docker.rb +22 -0
  26. data/lib/rubysmith/cli/actions/funding.rb +2 -2
  27. data/lib/rubysmith/cli/actions/git.rb +1 -1
  28. data/lib/rubysmith/cli/actions/git_hub.rb +2 -2
  29. data/lib/rubysmith/cli/actions/git_hub_ci.rb +2 -2
  30. data/lib/rubysmith/cli/actions/git_lint.rb +1 -1
  31. data/lib/rubysmith/cli/actions/guard.rb +1 -1
  32. data/lib/rubysmith/cli/actions/irb_kit.rb +1 -1
  33. data/lib/rubysmith/cli/actions/license.rb +1 -1
  34. data/lib/rubysmith/cli/actions/maximum.rb +1 -1
  35. data/lib/rubysmith/cli/actions/minimum.rb +1 -1
  36. data/lib/rubysmith/cli/actions/rake.rb +1 -1
  37. data/lib/rubysmith/cli/actions/readme.rb +1 -1
  38. data/lib/rubysmith/cli/actions/reek.rb +1 -1
  39. data/lib/rubysmith/cli/actions/refinements.rb +1 -1
  40. data/lib/rubysmith/cli/actions/rspec.rb +1 -1
  41. data/lib/rubysmith/cli/actions/rtc.rb +1 -1
  42. data/lib/rubysmith/cli/actions/security.rb +1 -1
  43. data/lib/rubysmith/cli/actions/setup.rb +1 -1
  44. data/lib/rubysmith/cli/actions/simple_cov.rb +1 -1
  45. data/lib/rubysmith/cli/actions/versions.rb +1 -1
  46. data/lib/rubysmith/cli/actions/zeitwerk.rb +1 -1
  47. data/lib/rubysmith/cli/commands/build.rb +14 -2
  48. data/lib/rubysmith/configuration/contract.rb +6 -0
  49. data/lib/rubysmith/configuration/defaults.yml +5 -0
  50. data/lib/rubysmith/configuration/model.rb +8 -0
  51. data/lib/rubysmith/container.rb +1 -0
  52. data/lib/rubysmith/extensions/pragmater.rb +14 -1
  53. data/lib/rubysmith/extensions/tocer.rb +2 -1
  54. data/lib/rubysmith/templates/%project_name%/.devcontainer/Dockerfile.erb +1 -0
  55. data/lib/rubysmith/templates/%project_name%/.devcontainer/compose.yaml.erb +35 -0
  56. data/lib/rubysmith/templates/%project_name%/.devcontainer/devcontainer.json.erb +17 -0
  57. data/lib/rubysmith/templates/%project_name%/.dockerignore.erb +36 -0
  58. data/lib/rubysmith/templates/%project_name%/.github/workflows/ci.yml.erb +5 -0
  59. data/lib/rubysmith/templates/%project_name%/Dockerfile.erb +60 -0
  60. data/lib/rubysmith/templates/%project_name%/Gemfile.erb +3 -0
  61. data/lib/rubysmith/templates/%project_name%/LICENSE-fair.adoc.erb +75 -0
  62. data/lib/rubysmith/templates/%project_name%/LICENSE-fair.md.erb +75 -0
  63. data/lib/rubysmith/templates/%project_name%/README.adoc.erb +4 -0
  64. data/lib/rubysmith/templates/%project_name%/README.md.erb +4 -0
  65. data/lib/rubysmith/templates/%project_name%/bin/docker/build.erb +15 -0
  66. data/lib/rubysmith/templates/%project_name%/bin/docker/console.erb +14 -0
  67. data/lib/rubysmith/templates/%project_name%/bin/docker/entrypoint.erb +8 -0
  68. data/lib/rubysmith.rb +1 -0
  69. data/rubysmith.gemspec +4 -4
  70. data.tar.gz.sig +0 -0
  71. metadata +31 -9
  72. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98de14cb0b27d946e2c34e742a2d8c41a35be86d0a807a43d5d269c556f5ecf9
4
- data.tar.gz: e3374105862254535024815aadf97a8e22a6ec95aac89f4abb3d1149c846896d
3
+ metadata.gz: 1529b428758e620a07651f58648e9347d6285ae658c5ba7f4e60ec445958b279
4
+ data.tar.gz: 7efa1cd58738e11138bc31209ee0b6a2b0ab30a710f54016b8ad3c17b8f6a993
5
5
  SHA512:
6
- metadata.gz: 22444127ca4b4ef35b36b5aac3cf54d936c71de4bb72c36ae9fc0e7713145f978048910036c450a96d2c1bfce026338965bd781eb26bd36e5edc56b4327868eb
7
- data.tar.gz: b162fa1f1f7aff11957208ba4b43ac8d4b0e59c7eb87d9228328630c12bc1ee311df84a895d10c64b376474976b1123aa229b578f7b7c323e415319f8a11b199
6
+ metadata.gz: bb59f4e7490b4e8298a9c14d31923f8e46d1f1ed28cc2ae0f6778d8269d4ee08eab8c304aef3c276439eb447ae5fb43d9b63cf6f9239d64a6e17bfaf70f81a7c
7
+ data.tar.gz: 51d8e56f5b799df3b03a9a20c8331004d5f44f0bbdf4371c8299f8a8f75a17719c74c11d2d9d4bc9159cd535f0c3bf26c86e6c1d93ece452a18d149490f490c6
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -2,8 +2,10 @@
2
2
  :toclevels: 5
3
3
  :figure-caption!:
4
4
 
5
- :gemsmith_link: link:https://alchemists.io/projects/gemsmith[Gemsmith]
6
5
  :bundler_inline_link: link:https://alchemists.io/articles/ruby_bundler_inline[Bundler Inline]
6
+ :development_containers_link: link:https://containers.dev[Development Containers]
7
+ :docker_link: link:https://www.docker.com[Docker]
8
+ :gemsmith_link: link:https://alchemists.io/projects/gemsmith[Gemsmith]
7
9
  :string_formats_link: link:https://docs.ruby-lang.org/en/3.3/format_specifications_rdoc.html[String Formats]
8
10
 
9
11
  = Rubysmith
@@ -26,6 +28,8 @@ toc::[]
26
28
  * Supports link:https://orcid.org[Citations (ORCID)].
27
29
  * Supports console script for local development.
28
30
  * Supports link:https://github.com/ruby/debug[Debug].
31
+ * Supports {development_containers_link}.
32
+ * Supports {docker_link}.
29
33
  * Supports link:https://git-scm.com[Git].
30
34
  * Supports link:https://github.com[GitHub].
31
35
  * Supports link:https://alchemists.io/projects/git-lint[Git Lint].
@@ -46,6 +50,7 @@ toc::[]
46
50
  ** Security
47
51
  ** Code of Conduct
48
52
  ** Contributions
53
+ ** Developer Certificate of Origin
49
54
  ** Communities
50
55
 
51
56
  == Requirements
@@ -135,6 +140,11 @@ link:https://github.com/amazing-print/amazing_print[Amazing Print] gem for debug
135
140
  a handy debugging tool when inspecting your Ruby objects and printing details in a quick to read
136
141
  format.
137
142
 
143
+ ===== Bootsnap
144
+
145
+ The `--bootsnap` option allows you to build your project with the
146
+ link:https://github.com/Shopify/bootsnap[Bootsnap] gem for improved performance. This is best used for pure, non-gem, Ruby projects and/or web applications in general.
147
+
138
148
  ===== Caliber
139
149
 
140
150
  The `--caliber` option allows you to build your project with the
@@ -175,12 +185,26 @@ loaded.
175
185
  The `--contributions` option allows you to link to contributing documentation so people know to
176
186
  contribute back to your work.
177
187
 
188
+ ===== Developer Certificate of Origin
189
+
190
+ The `--dcoo` option allows to you add link:https://developercertificate.org[Developer Certificate of Origin] documentation so all contributors are aware of how their contributions are applied in terms of ownership, copyright, and licensing.
191
+
192
+ ℹ️ This is disabled by default but will be enabled by default in the next major version.
193
+
178
194
  ===== Debug
179
195
 
180
196
  The `--debug` option allows you add the link:https://github.com/ruby/debug[Debug] gem to your
181
197
  project for debugging your code by setting breakpoints, remotely connecting to running code, and
182
198
  much more.
183
199
 
200
+ ===== Docker
201
+
202
+ The `--docker` option allows you add {docker_link} to your project so you can build and deploy to production.
203
+
204
+ ===== Development Containers
205
+
206
+ The `--devcontainer` option allows you add {development_containers_link} support to your project so you can develop locally by running your project within a {docker_link} container.
207
+
184
208
  ===== Funding
185
209
 
186
210
  The `--funding` option allows you add a link:https://github.com[GitHub] funding configuration to
@@ -299,6 +323,7 @@ author:
299
323
  uri: "%<organization_uri>s/team/%<author_handle>s"
300
324
  build:
301
325
  amazing_print: true
326
+ bootsnap: false
302
327
  caliber: true
303
328
  circle_ci: false
304
329
  citation: true
@@ -307,7 +332,10 @@ build:
307
332
  conduct: true
308
333
  console: true
309
334
  contributions: true
335
+ dcoo: false
310
336
  debug: true
337
+ devcontainer: false
338
+ docker: false
311
339
  funding: false
312
340
  git: true
313
341
  git_hub: false
@@ -344,6 +372,7 @@ project:
344
372
  community: "%<organization_uri>s/community"
345
373
  conduct: "%<organization_uri>s/policies/code_of_conduct"
346
374
  contributions: "%<organization_uri>s/policies/contributions"
375
+ dcoo: "%<organization_uri>s/policies/developer_certificate_of_origin"
347
376
  download: "https://rubygems.org/gems/%<project_name>s"
348
377
  funding: "%<repository_uri>s/sponsors/%<repository_handle>s"
349
378
  home: "%<organization_uri>s/projects/%<project_name>s"
@@ -404,17 +433,68 @@ following options are available:
404
433
 
405
434
  ==== License
406
435
 
407
- Use this section to define the license you want to use for your project. The following are available:
436
+ Use this section to define the license you want to use for your project. When picking a license, you can supply the appropriate `label` and `version` in addition to the `name`. The `name` is the only value you _can't_ customize. The following details all supported licenses.
437
+
438
+ ===== Apache
408
439
 
409
- * `apache`: Uses the link:https://www.apache.org/licenses/LICENSE-2.0[Apache] license.
410
- * `hippocratic`: Uses the link:https://firstdonoharm.dev[Hippocratic] license.
411
- * `mit`: Uses the link:https://mit-license.org[MIT] license.
440
+ To use the link:https://www.apache.org/licenses/LICENSE-2.0[Apache] license, apply this configuration:
412
441
 
413
- When picking a license, you can also supply the appropriate label and version in addition to the name.
442
+ [source,yaml]
443
+ ----
444
+ license:
445
+ label: "Apache"
446
+ name: "apache"
447
+ version: "2.0"
448
+ ----
449
+
450
+ ===== Fair Source
451
+
452
+ To use the link:https://fsl.software[Fair Source] license, apply this configuration:
453
+
454
+ [source,yaml]
455
+ ----
456
+ license:
457
+ label: "Fair Source"
458
+ name: "fair"
459
+ version: "FSL-1.1-Apache-2.0"
460
+ ----
461
+
462
+ ===== Hippocratic
463
+
464
+ To use the link:https://firstdonoharm.dev[Hippocratic] license, apply this configuration:
465
+
466
+ [source,yaml]
467
+ ----
468
+ license:
469
+ label: "Hippocratic"
470
+ name: "hippocratic"
471
+ version: "2.1"
472
+ ----
473
+
474
+ ℹ️ This is the default license unless you customize.
475
+
476
+ ===== MIT
477
+
478
+ To use the link:https://mit-license.org[MIT] license, apply this configuration:
479
+
480
+ [source,yaml]
481
+ ----
482
+ license:
483
+ label: "MIT"
484
+ name: "mit"
485
+ version: ""
486
+ ----
414
487
 
415
488
  ==== Organization
416
489
 
417
- Use this section to define URI information that points to your organization. This is useful for information that isn't project specific but related to all projects within your organization. You'll want to customize this URI especially for documentation purposes.
490
+ Use this section to define organization specific information. This is useful for information that isn't project specific but related to all projects within your organization. You'll want -- highly recommended -- to supply configuration details. For example, here's what a fictional organization might look like:
491
+
492
+ [source,yaml]
493
+ ----
494
+ organization:
495
+ label: ACME
496
+ uri: https://acme.io
497
+ ----
418
498
 
419
499
  ==== Project
420
500
 
@@ -477,6 +557,8 @@ bin/rake
477
557
 
478
558
  == link:https://alchemists.io/policies/contributions[Contributions]
479
559
 
560
+ == link:https://alchemists.io/policies/developer_certificate_of_origin[Developer Certificate of Origin]
561
+
480
562
  == link:https://alchemists.io/projects/rubysmith/versions[Versions]
481
563
 
482
564
  == link:https://alchemists.io/community[Community]
@@ -13,7 +13,7 @@ module Rubysmith
13
13
  .render
14
14
  .replace(/\n\s+group/, "\n\ngroup")
15
15
  .replace(/\n\s+gem/, "\n gem")
16
- .replace(/ (?=.+(refinements|zeitwerk))/, "")
16
+ .replace(/ (?=.+(bootsnap|refinements|zeitwerk))/, "")
17
17
  .replace(/(\n+|\s+)end/, "\nend")
18
18
  .replace(/\n\ngroup :(quality|development|test|tools) do\nend/, "")
19
19
  .replace(/org"\n+/, "org\"\n\n")
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Rubysmith
6
+ module Builders
7
+ module DevContainer
8
+ # Builds Docker Compose configuration for container.
9
+ class Compose < Abstract
10
+ using Refinements::Struct
11
+
12
+ def call
13
+ return false unless settings.build_devcontainer
14
+
15
+ path = "%project_name%/.devcontainer/compose.yaml.erb"
16
+ builder.call(settings.merge(template_path: path)).render
17
+ true
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Rubysmith
6
+ module Builders
7
+ module DevContainer
8
+ # Builds container configuration.
9
+ class Configuration < Abstract
10
+ using Refinements::Struct
11
+
12
+ def call
13
+ return false unless settings.build_devcontainer
14
+
15
+ path = "%project_name%/.devcontainer/devcontainer.json.erb"
16
+ builder.call(settings.merge(template_path: path)).render
17
+ true
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Rubysmith
6
+ module Builders
7
+ module DevContainer
8
+ # Builds Dockerfile for container.
9
+ class Dockerfile < Abstract
10
+ using Refinements::Struct
11
+
12
+ def call
13
+ return false unless settings.build_devcontainer
14
+
15
+ builder.call(settings.merge(template_path: "%project_name%/.devcontainer/Dockerfile.erb"))
16
+ .render
17
+ true
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Rubysmith
6
+ module Builders
7
+ module Docker
8
+ # Builds Docker build script.
9
+ class Build < Abstract
10
+ using Refinements::Struct
11
+
12
+ def call
13
+ return false unless settings.build_docker
14
+
15
+ builder.call(settings.merge(template_path: "%project_name%/bin/docker/build.erb"))
16
+ .render
17
+ .permit 0o755
18
+
19
+ true
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Rubysmith
6
+ module Builders
7
+ module Docker
8
+ # Builds Docker console script.
9
+ class Console < Abstract
10
+ using Refinements::Struct
11
+
12
+ def call
13
+ return false unless settings.build_docker
14
+
15
+ builder.call(settings.merge(template_path: "%project_name%/bin/docker/console.erb"))
16
+ .render
17
+ .permit 0o755
18
+
19
+ true
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Rubysmith
6
+ module Builders
7
+ module Docker
8
+ # Builds Docker entrypoint script.
9
+ class Entrypoint < Abstract
10
+ using Refinements::Struct
11
+
12
+ def call
13
+ return false unless settings.build_docker
14
+
15
+ builder.call(settings.merge(template_path: "%project_name%/bin/docker/entrypoint.erb"))
16
+ .render
17
+ .permit 0o755
18
+
19
+ true
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Rubysmith
6
+ module Builders
7
+ module Docker
8
+ # Builds Dockerfile configuration.
9
+ class File < Abstract
10
+ using Refinements::Struct
11
+
12
+ def call
13
+ return false unless settings.build_docker
14
+
15
+ builder.call(settings.merge(template_path: "%project_name%/Dockerfile.erb")).render
16
+ true
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "refinements/struct"
4
+
5
+ module Rubysmith
6
+ module Builders
7
+ module Docker
8
+ # Builds Docker ignore configuration.
9
+ class Ignore < Abstract
10
+ using Refinements::Struct
11
+
12
+ def call
13
+ return false unless settings.build_git
14
+
15
+ builder.call(settings.merge(template_path: "%project_name%/.dockerignore.erb")).render
16
+ true
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_amazing_print }
17
17
 
18
- def call(value = nil) = settings.build_amazing_print = value
18
+ def call(boolean) = settings.build_amazing_print = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sod"
4
+
5
+ module Rubysmith
6
+ module CLI
7
+ module Actions
8
+ # Stores Bootsnap flag.
9
+ class Bootsnap < Sod::Action
10
+ include Import[:settings]
11
+
12
+ description "Add Bootsnap gem."
13
+
14
+ on "--[no-]bootsnap"
15
+
16
+ default { Container[:settings].build_bootsnap }
17
+
18
+ def call(boolean) = settings.build_bootsnap = boolean
19
+ end
20
+ end
21
+ end
22
+ end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_caliber }
17
17
 
18
- def call(value = nil) = settings.build_caliber = value
18
+ def call(boolean) = settings.build_caliber = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -9,13 +9,13 @@ module Rubysmith
9
9
  class CircleCI < Sod::Action
10
10
  include Import[:settings]
11
11
 
12
- description "Add Circle CI settings."
12
+ description "Add Circle CI support."
13
13
 
14
14
  on "--[no-]circle_ci"
15
15
 
16
16
  default { Container[:settings].build_circle_ci }
17
17
 
18
- def call(value = nil) = settings.build_circle_ci = value
18
+ def call(boolean) = settings.build_circle_ci = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_citation }
17
17
 
18
- def call(value = nil) = settings.build_citation = value
18
+ def call(boolean) = settings.build_citation = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_community }
17
17
 
18
- def call(value = nil) = settings.build_community = value
18
+ def call(boolean) = settings.build_community = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_conduct }
17
17
 
18
- def call(value = nil) = settings.build_conduct = value
18
+ def call(boolean) = settings.build_conduct = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_console }
17
17
 
18
- def call(value = nil) = settings.build_console = value
18
+ def call(boolean) = settings.build_console = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_contributions }
17
17
 
18
- def call(value = nil) = settings.build_contributions = value
18
+ def call(boolean) = settings.build_contributions = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sod"
4
+
5
+ module Rubysmith
6
+ module CLI
7
+ module Actions
8
+ # Stores Developer Certificate of Origin flag.
9
+ class DCOO < Sod::Action
10
+ include Import[:settings]
11
+
12
+ description "Add Developer Certificate of Origin documentation."
13
+
14
+ on "--[no-]dcoo"
15
+
16
+ default { Container[:settings].build_dcoo }
17
+
18
+ def call(boolean) = settings.build_dcoo = boolean
19
+ end
20
+ end
21
+ end
22
+ end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_debug }
17
17
 
18
- def call(value = nil) = settings.build_debug = value
18
+ def call(boolean) = settings.build_debug = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sod"
4
+
5
+ module Rubysmith
6
+ module CLI
7
+ module Actions
8
+ # Stores Development Container flag.
9
+ class DevContainer < Sod::Action
10
+ include Import[:settings]
11
+
12
+ description "Add Development Container support."
13
+
14
+ on "--[no-]devcontainer"
15
+
16
+ default { Container[:settings].build_devcontainer }
17
+
18
+ def call(boolean) = settings.build_devcontainer = boolean
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "sod"
4
+
5
+ module Rubysmith
6
+ module CLI
7
+ module Actions
8
+ # Stores Docker flag.
9
+ class Docker < Sod::Action
10
+ include Import[:settings]
11
+
12
+ description "Add Docker support."
13
+
14
+ on "--[no-]docker"
15
+
16
+ default { Container[:settings].build_docker }
17
+
18
+ def call(boolean) = settings.build_docker = boolean
19
+ end
20
+ end
21
+ end
22
+ end
@@ -9,13 +9,13 @@ module Rubysmith
9
9
  class Funding < Sod::Action
10
10
  include Import[:settings]
11
11
 
12
- description "Add GitHub funding settings."
12
+ description "Add GitHub funding."
13
13
 
14
14
  on "--[no-]funding"
15
15
 
16
16
  default { Container[:settings].build_funding }
17
17
 
18
- def call(value = nil) = settings.build_funding = value
18
+ def call(boolean) = settings.build_funding = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_git }
17
17
 
18
- def call(value = nil) = settings.build_git = value
18
+ def call(boolean) = settings.build_git = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -9,13 +9,13 @@ module Rubysmith
9
9
  class GitHub < Sod::Action
10
10
  include Import[:settings]
11
11
 
12
- description "Add GitHub templates."
12
+ description "Add GitHub code review and issue templates."
13
13
 
14
14
  on "--[no-]git_hub"
15
15
 
16
16
  default { Container[:settings].build_git_hub }
17
17
 
18
- def call(value = nil) = settings.build_git_hub = value
18
+ def call(boolean) = settings.build_git_hub = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -9,13 +9,13 @@ module Rubysmith
9
9
  class GitHubCI < Sod::Action
10
10
  include Import[:settings]
11
11
 
12
- description "Add GitHub continuous integration."
12
+ description "Add GitHub continuous integration support."
13
13
 
14
14
  on "--[no-]git_hub_ci"
15
15
 
16
16
  default { Container[:settings].build_git_hub_ci }
17
17
 
18
- def call(value = nil) = settings.build_git_hub_ci = value
18
+ def call(boolean) = settings.build_git_hub_ci = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_git_lint }
17
17
 
18
- def call(value = nil) = settings.build_git_lint = value
18
+ def call(boolean) = settings.build_git_lint = boolean
19
19
  end
20
20
  end
21
21
  end
@@ -17,7 +17,7 @@ module Rubysmith
17
17
 
18
18
  default { Container[:settings].build_guard }
19
19
 
20
- def call(value = nil) = settings.build_guard = value
20
+ def call(boolean) = settings.build_guard = boolean
21
21
  end
22
22
  end
23
23
  end
@@ -15,7 +15,7 @@ module Rubysmith
15
15
 
16
16
  default { Container[:settings].build_irb_kit }
17
17
 
18
- def call(value = nil) = settings.build_irb_kit = value
18
+ def call(boolean) = settings.build_irb_kit = boolean
19
19
  end
20
20
  end
21
21
  end