rubysmith 6.10.0 → 7.0.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 (105) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +46 -57
  4. data/lib/rubysmith/builder.rb +9 -9
  5. data/lib/rubysmith/builders/abstract.rb +4 -4
  6. data/lib/rubysmith/builders/bundler.rb +2 -2
  7. data/lib/rubysmith/builders/caliber.rb +4 -4
  8. data/lib/rubysmith/builders/circle_ci.rb +3 -3
  9. data/lib/rubysmith/builders/console.rb +3 -3
  10. data/lib/rubysmith/builders/core.rb +6 -6
  11. data/lib/rubysmith/builders/documentation/citation.rb +3 -3
  12. data/lib/rubysmith/builders/documentation/license.rb +8 -9
  13. data/lib/rubysmith/builders/documentation/readme.rb +4 -4
  14. data/lib/rubysmith/builders/documentation/version.rb +4 -5
  15. data/lib/rubysmith/builders/git/commit.rb +4 -8
  16. data/lib/rubysmith/builders/git/ignore.rb +3 -3
  17. data/lib/rubysmith/builders/git/safe.rb +3 -3
  18. data/lib/rubysmith/builders/git/setup.rb +3 -3
  19. data/lib/rubysmith/builders/git_hub/ci.rb +27 -0
  20. data/lib/rubysmith/builders/git_hub/funding.rb +23 -0
  21. data/lib/rubysmith/builders/git_hub/template.rb +32 -0
  22. data/lib/rubysmith/builders/guard.rb +4 -4
  23. data/lib/rubysmith/builders/init.rb +2 -2
  24. data/lib/rubysmith/builders/rake/binstub.rb +24 -0
  25. data/lib/rubysmith/builders/rake/configuration.rb +29 -0
  26. data/lib/rubysmith/builders/reek.rb +3 -3
  27. data/lib/rubysmith/builders/rspec/binstub.rb +3 -3
  28. data/lib/rubysmith/builders/rspec/context.rb +6 -6
  29. data/lib/rubysmith/builders/rspec/helper.rb +3 -3
  30. data/lib/rubysmith/builders/setup.rb +3 -3
  31. data/lib/rubysmith/builders/version.rb +2 -2
  32. data/lib/rubysmith/cli/actions/amazing_print.rb +3 -3
  33. data/lib/rubysmith/cli/actions/caliber.rb +3 -3
  34. data/lib/rubysmith/cli/actions/circle_ci.rb +4 -4
  35. data/lib/rubysmith/cli/actions/citation.rb +3 -3
  36. data/lib/rubysmith/cli/actions/community.rb +3 -3
  37. data/lib/rubysmith/cli/actions/conduct.rb +3 -3
  38. data/lib/rubysmith/cli/actions/console.rb +3 -3
  39. data/lib/rubysmith/cli/actions/contributions.rb +3 -3
  40. data/lib/rubysmith/cli/actions/debug.rb +3 -3
  41. data/lib/rubysmith/cli/actions/funding.rb +4 -4
  42. data/lib/rubysmith/cli/actions/git.rb +3 -3
  43. data/lib/rubysmith/cli/actions/git_hub.rb +3 -3
  44. data/lib/rubysmith/cli/actions/git_hub_ci.rb +3 -3
  45. data/lib/rubysmith/cli/actions/git_lint.rb +3 -3
  46. data/lib/rubysmith/cli/actions/guard.rb +3 -3
  47. data/lib/rubysmith/cli/actions/irb_kit.rb +3 -3
  48. data/lib/rubysmith/cli/actions/license.rb +3 -3
  49. data/lib/rubysmith/cli/actions/maximum.rb +4 -4
  50. data/lib/rubysmith/cli/actions/minimum.rb +4 -4
  51. data/lib/rubysmith/cli/actions/name.rb +2 -2
  52. data/lib/rubysmith/cli/actions/rake.rb +3 -3
  53. data/lib/rubysmith/cli/actions/readme.rb +3 -3
  54. data/lib/rubysmith/cli/actions/reek.rb +3 -3
  55. data/lib/rubysmith/cli/actions/refinements.rb +3 -3
  56. data/lib/rubysmith/cli/actions/rspec.rb +3 -3
  57. data/lib/rubysmith/cli/actions/rtc.rb +3 -3
  58. data/lib/rubysmith/cli/actions/security.rb +3 -3
  59. data/lib/rubysmith/cli/actions/setup.rb +3 -3
  60. data/lib/rubysmith/cli/actions/simple_cov.rb +3 -3
  61. data/lib/rubysmith/cli/actions/versions.rb +3 -3
  62. data/lib/rubysmith/cli/actions/zeitwerk.rb +3 -3
  63. data/lib/rubysmith/cli/commands/build.rb +33 -31
  64. data/lib/rubysmith/cli/shell.rb +0 -1
  65. data/lib/rubysmith/configuration/contract.rb +16 -14
  66. data/lib/rubysmith/configuration/defaults.yml +21 -1
  67. data/lib/rubysmith/configuration/model.rb +30 -28
  68. data/lib/rubysmith/configuration/transformers/git_hub_user.rb +2 -2
  69. data/lib/rubysmith/container.rb +19 -9
  70. data/lib/rubysmith/extensions/bundler.rb +7 -7
  71. data/lib/rubysmith/extensions/pragmater.rb +10 -10
  72. data/lib/rubysmith/extensions/rubocop.rb +7 -7
  73. data/lib/rubysmith/extensions/tocer.rb +8 -8
  74. data/lib/rubysmith/renderers/erb.rb +4 -4
  75. data/lib/rubysmith/templates/%project_name%/.circleci/config.yml.erb +1 -1
  76. data/lib/rubysmith/templates/%project_name%/.github/FUNDING.yml.erb +1 -1
  77. data/lib/rubysmith/templates/%project_name%/.github/workflows/ci.yml.erb +1 -1
  78. data/lib/rubysmith/templates/%project_name%/CITATION.cff.erb +12 -12
  79. data/lib/rubysmith/templates/%project_name%/Gemfile.erb +18 -18
  80. data/lib/rubysmith/templates/%project_name%/LICENSE-apache.adoc.erb +1 -1
  81. data/lib/rubysmith/templates/%project_name%/LICENSE-apache.md.erb +1 -1
  82. data/lib/rubysmith/templates/%project_name%/LICENSE-mit.adoc.erb +1 -1
  83. data/lib/rubysmith/templates/%project_name%/LICENSE-mit.md.erb +1 -1
  84. data/lib/rubysmith/templates/%project_name%/README.adoc.erb +21 -21
  85. data/lib/rubysmith/templates/%project_name%/README.md.erb +21 -21
  86. data/lib/rubysmith/templates/%project_name%/Rakefile.erb +10 -10
  87. data/lib/rubysmith/templates/%project_name%/VERSIONS.adoc.erb +1 -1
  88. data/lib/rubysmith/templates/%project_name%/VERSIONS.md.erb +1 -1
  89. data/lib/rubysmith/templates/%project_name%/bin/console.erb +1 -1
  90. data/lib/rubysmith/templates/%project_name%/bin/setup.erb +1 -1
  91. data/lib/rubysmith/templates/%project_name%/lib/%project_path%.rb.erb +7 -7
  92. data/lib/rubysmith/templates/%project_name%/spec/lib/%project_path%_spec.rb.erb +2 -2
  93. data/lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb +4 -4
  94. data/lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb +3 -3
  95. data/lib/rubysmith.rb +1 -0
  96. data/rubysmith.gemspec +11 -12
  97. data.tar.gz.sig +0 -0
  98. metadata +28 -43
  99. metadata.gz.sig +4 -2
  100. data/lib/rubysmith/builders/git_hub.rb +0 -39
  101. data/lib/rubysmith/builders/git_hub_ci.rb +0 -25
  102. data/lib/rubysmith/builders/rake.rb +0 -39
  103. data/lib/rubysmith/cli/actions/publish.rb +0 -35
  104. data/lib/rubysmith/configuration/transformers/target_root.rb +0 -18
  105. data/lib/rubysmith/extensions/milestoner.rb +0 -23
@@ -7,25 +7,25 @@ module Rubysmith
7
7
  module Extensions
8
8
  # Ensures project skeleton documentation has table of content.
9
9
  class Tocer
10
- using Refinements::Pathname
10
+ include Import[:settings]
11
11
 
12
- def self.call(...) = new(...).call
12
+ using Refinements::Pathname
13
13
 
14
- def initialize configuration, client: ::Tocer::Runner.new
15
- @configuration = configuration
14
+ def initialize(client: ::Tocer::Runner.new, **)
16
15
  @client = client
16
+ super(**)
17
17
  end
18
18
 
19
19
  def call
20
- return configuration unless configuration.build_readme
20
+ return false unless settings.build_readme
21
21
 
22
- configuration.project_root.change_dir { client.call ::Tocer::Container[:configuration] }
23
- configuration
22
+ settings.project_root.change_dir { client.call }
23
+ true
24
24
  end
25
25
 
26
26
  private
27
27
 
28
- attr_reader :configuration, :client
28
+ attr_reader :client
29
29
  end
30
30
  end
31
31
  end
@@ -6,10 +6,10 @@ module Rubysmith
6
6
  module Renderers
7
7
  # Renders ERB templates as fully functional files.
8
8
  class ERB
9
- def initialize configuration,
10
- scope: Renderers::Namespace.new(configuration.project_namespaced_class),
9
+ def initialize settings,
10
+ scope: Renderers::Namespace.new(settings.project_namespaced_class),
11
11
  client: ::ERB
12
- @configuration = configuration
12
+ @settings = settings
13
13
  @scope = scope
14
14
  @client = client
15
15
  end
@@ -19,7 +19,7 @@ module Rubysmith
19
19
  private
20
20
 
21
21
  attr_accessor :buffer
22
- attr_reader :configuration, :scope, :client
22
+ attr_reader :settings, :scope, :client
23
23
 
24
24
  def namespace
25
25
  source = buffer.dup
@@ -30,7 +30,7 @@ jobs:
30
30
  name: Rake
31
31
  command: bundle exec rake
32
32
 
33
- <% if configuration.build_simple_cov %>
33
+ <% if settings.build_simple_cov %>
34
34
  - store_artifacts:
35
35
  name: SimpleCov Report
36
36
  path: ~/project/coverage
@@ -1 +1 @@
1
- github: [<%= configuration.git_hub_user %>]
1
+ github: [<%= settings.repository_handle %>]
@@ -19,7 +19,7 @@ jobs:
19
19
  - name: Build
20
20
  run: bundle exec rake
21
21
 
22
- <% if configuration.build_simple_cov %>
22
+ <% if settings.build_simple_cov %>
23
23
  - name: SimpleCov Report
24
24
  uses: actions/upload-artifact@v4
25
25
  with:
@@ -1,17 +1,17 @@
1
1
  cff-version: 1.2.0
2
- message: <%= configuration.citation_message %>
3
- title: <%= configuration.project_label %>
2
+ message: <%= settings.citation_message %>
3
+ title: <%= settings.project_label %>
4
4
  abstract:
5
- version: <%= configuration.project_version %>
6
- license: <%= configuration.license_label_version %>
7
- date-released: <%= configuration.loaded_at.strftime "%Y-%m-%d" %>
5
+ version: <%= settings.project_version %>
6
+ license: <%= settings.license_label_version %>
7
+ date-released: <%= settings.loaded_at.strftime "%Y-%m-%d" %>
8
8
  authors:
9
- - family-names: <%= configuration.author_family_name %>
10
- given-names: <%= configuration.author_given_name %>
11
- affiliation: <%= configuration.citation_affiliation %>
12
- orcid: https://orcid.org/<%= configuration.citation_orcid %>
9
+ - family-names: <%= settings.author_family_name %>
10
+ given-names: <%= settings.author_given_name %>
11
+ affiliation: <%= settings.citation_affiliation %>
12
+ orcid: https://orcid.org/<%= settings.citation_orcid %>
13
13
  keywords:
14
14
  - ruby
15
- repository-code: <%= configuration.computed_project_url_source %>
16
- repository-artifact: <%= configuration.computed_project_url_download %>
17
- url: <%= configuration.computed_project_url_home %>
15
+ repository-code: <%= settings.computed_project_uri_source %>
16
+ repository-artifact: <%= settings.computed_project_uri_download %>
17
+ url: <%= settings.computed_project_uri_home %>
@@ -2,57 +2,57 @@ ruby file: ".ruby-version"
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- <% if configuration.build_refinements %>
6
- gem "refinements", "~> 12.1"
5
+ <% if settings.build_refinements %>
6
+ gem "refinements", "~> 12.5"
7
7
  <% end %>
8
- <% if configuration.build_zeitwerk %>
8
+ <% if settings.build_zeitwerk %>
9
9
  gem "zeitwerk", "~> 2.6"
10
10
  <% end %>
11
11
 
12
12
  group :quality do
13
- <% if configuration.build_caliber %>
13
+ <% if settings.build_caliber %>
14
14
  gem "caliber", "~> 0.58"
15
15
  <% end %>
16
- <% if configuration.build_git && configuration.build_git_lint %>
17
- gem "git-lint", "~> 7.3"
16
+ <% if settings.build_git && settings.build_git_lint %>
17
+ gem "git-lint", "~> 8.0"
18
18
  <% end %>
19
- <% if configuration.build_reek %>
19
+ <% if settings.build_reek %>
20
20
  gem "reek", "~> 6.3", require: false
21
21
  <% end %>
22
- <% if configuration.build_simple_cov %>
22
+ <% if settings.build_simple_cov %>
23
23
  gem "simplecov", "~> 0.22", require: false
24
24
  <% end %>
25
25
  end
26
26
 
27
27
  group :development do
28
- <% if configuration.build_rake %>
28
+ <% if settings.build_rake %>
29
29
  gem "rake", "~> 13.2"
30
30
  <% end %>
31
- <% if configuration.markdown? %>
32
- gem "tocer", "~> 17.5"
31
+ <% if settings.markdown? %>
32
+ gem "tocer", "~> 18.0"
33
33
  <% end %>
34
34
  end
35
35
 
36
36
  group :test do
37
- <% if configuration.build_guard %>
37
+ <% if settings.build_guard %>
38
38
  gem "guard-rspec", "~> 4.7", require: false
39
39
  <% end %>
40
- <% if configuration.build_rspec %>
40
+ <% if settings.build_rspec %>
41
41
  gem "rspec", "~> 3.13"
42
42
  <% end %>
43
43
  end
44
44
 
45
45
  group :tools do
46
- <% if configuration.build_amazing_print %>
46
+ <% if settings.build_amazing_print %>
47
47
  gem "amazing_print", "~> 1.6"
48
48
  <% end %>
49
- <% if configuration.build_debug %>
49
+ <% if settings.build_debug %>
50
50
  gem "debug", "~> 1.9"
51
51
  <% end %>
52
- <% if configuration.build_irb_kit %>
53
- gem "irb-kit", "~> 0.0"
52
+ <% if settings.build_irb_kit %>
53
+ gem "irb-kit", "~> 0.3"
54
54
  <% end %>
55
- <% if configuration.build_rtc %>
55
+ <% if settings.build_rtc %>
56
56
  gem "repl_type_completor", "~> 0.1"
57
57
  <% end %>
58
58
  end
@@ -150,7 +150,7 @@ additional liability.
150
150
 
151
151
  END OF TERMS AND CONDITIONS
152
152
 
153
- Copyright <%= configuration.loaded_at.strftime "%Y" %> link:<%= configuration.author_url %>[<%= configuration.author_name %>].
153
+ Copyright <%= settings.loaded_at.strftime "%Y" %> link:<%= settings.author_uri %>[<%= settings.author_name %>].
154
154
 
155
155
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
156
156
  compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
@@ -150,7 +150,7 @@ additional liability.
150
150
 
151
151
  END OF TERMS AND CONDITIONS
152
152
 
153
- Copyright <%= configuration.loaded_at.strftime "%Y" %> [<%= configuration.author_name %>](<%= configuration.author_url %>).
153
+ Copyright <%= settings.loaded_at.strftime "%Y" %> [<%= settings.author_name %>](<%= settings.author_uri %>).
154
154
 
155
155
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
156
156
  compliance with the License. You may obtain a [copy](https://www.apache.org/licenses/LICENSE-2.0) of
@@ -1,4 +1,4 @@
1
- Copyright <%= configuration.loaded_at.strftime "%Y" %> link:<%= configuration.author_url %>[<%= configuration.author_name %>].
1
+ Copyright <%= settings.loaded_at.strftime "%Y" %> link:<%= settings.author_uri %>[<%= settings.author_name %>].
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,4 +1,4 @@
1
- Copyright <%= configuration.loaded_at.strftime "%Y" %> [<%= configuration.author_name %>](<%= configuration.author_url %>).
1
+ Copyright <%= settings.loaded_at.strftime "%Y" %> [<%= settings.author_name %>](<%= settings.author_uri %>).
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -2,7 +2,7 @@
2
2
  :toclevels: 5
3
3
  :figure-caption!:
4
4
 
5
- = <%= configuration.project_label %>
5
+ = <%= settings.project_label %>
6
6
 
7
7
  toc::[]
8
8
 
@@ -18,9 +18,9 @@ To set up project, run:
18
18
 
19
19
  [source,bash]
20
20
  ----
21
- git clone <%= configuration.computed_project_url_source %>
22
- cd <%= configuration.project_name %>
23
- <% if configuration.build_setup %>
21
+ git clone <%= settings.computed_project_uri_source %>
22
+ cd <%= settings.project_name %>
23
+ <% if settings.build_setup %>
24
24
  bin/setup
25
25
  <% end %>
26
26
  ----
@@ -33,14 +33,14 @@ To contribute, run:
33
33
 
34
34
  [source,bash]
35
35
  ----
36
- git clone <%= configuration.computed_project_url_source %>
37
- cd <%= configuration.project_name %>
38
- <% if configuration.build_setup %>
36
+ git clone <%= settings.computed_project_uri_source %>
37
+ cd <%= settings.project_name %>
38
+ <% if settings.build_setup %>
39
39
  bin/setup
40
40
  <% end %>
41
41
  ----
42
42
 
43
- <% if configuration.build_console %>
43
+ <% if settings.build_console %>
44
44
 
45
45
  You can also use the IRB console for direct access to all objects:
46
46
 
@@ -59,31 +59,31 @@ To test, run:
59
59
  bin/rake
60
60
  ----
61
61
 
62
- <% if configuration.build_license %>
63
- == link:<%= configuration.computed_project_url_license %>[License]
62
+ <% if settings.build_license %>
63
+ == link:<%= settings.computed_project_uri_license %>[License]
64
64
  <% end %>
65
65
 
66
- <% if configuration.build_security %>
67
- == link:<%= configuration.computed_project_url_security %>[Security]
66
+ <% if settings.build_security %>
67
+ == link:<%= settings.computed_project_uri_security %>[Security]
68
68
  <% end %>
69
69
 
70
- <% if configuration.build_conduct %>
71
- == link:<%= configuration.computed_project_url_conduct %>[Code of Conduct]
70
+ <% if settings.build_conduct %>
71
+ == link:<%= settings.computed_project_uri_conduct %>[Code of Conduct]
72
72
  <% end %>
73
73
 
74
- <% if configuration.build_contributions %>
75
- == link:<%= configuration.computed_project_url_contributions %>[Contributions]
74
+ <% if settings.build_contributions %>
75
+ == link:<%= settings.computed_project_uri_contributions %>[Contributions]
76
76
  <% end %>
77
77
 
78
- <% if configuration.build_versions %>
79
- == link:<%= configuration.computed_project_url_versions %>[Versions]
78
+ <% if settings.build_versions %>
79
+ == link:<%= settings.computed_project_uri_versions %>[Versions]
80
80
  <% end %>
81
81
 
82
- <% if configuration.build_community %>
83
- == link:<%= configuration.computed_project_url_community %>[Community]
82
+ <% if settings.build_community %>
83
+ == link:<%= settings.computed_project_uri_community %>[Community]
84
84
  <% end %>
85
85
 
86
86
  == Credits
87
87
 
88
88
  * Built with link:https://alchemists.io/projects/rubysmith[Rubysmith].
89
- * Engineered by link:<%= configuration.author_url %>[<%= configuration.author_name %>].
89
+ * Engineered by link:<%= settings.author_uri %>[<%= settings.author_name %>].
@@ -1,4 +1,4 @@
1
- # <%= configuration.project_label %>
1
+ # <%= settings.project_label %>
2
2
 
3
3
  <!-- Tocer[start]: Auto-generated, don't remove. -->
4
4
  <!-- Tocer[finish]: Auto-generated, don't remove. -->
@@ -13,9 +13,9 @@
13
13
 
14
14
  To set up project, run:
15
15
 
16
- git clone <%= configuration.computed_project_url_source %>
17
- cd <%= configuration.project_name %>
18
- <% if configuration.build_setup %>
16
+ git clone <%= settings.computed_project_uri_source %>
17
+ cd <%= settings.project_name %>
18
+ <% if settings.build_setup %>
19
19
  bin/setup
20
20
  <% end %>
21
21
 
@@ -25,13 +25,13 @@ To set up project, run:
25
25
 
26
26
  To contribute, run:
27
27
 
28
- git clone <%= configuration.computed_project_url_source %>
29
- cd <%= configuration.project_name %>
30
- <% if configuration.build_setup %>
28
+ git clone <%= settings.computed_project_uri_source %>
29
+ cd <%= settings.project_name %>
30
+ <% if settings.build_setup %>
31
31
  bin/setup
32
32
  <% end %>
33
33
 
34
- <% if configuration.build_console %>
34
+ <% if settings.build_console %>
35
35
 
36
36
  You can also use the IRB console for direct access to all objects:
37
37
 
@@ -44,31 +44,31 @@ To test, run:
44
44
 
45
45
  bin/rake
46
46
 
47
- <% if configuration.build_license %>
48
- ## [License](<%= configuration.computed_project_url_license %>)
47
+ <% if settings.build_license %>
48
+ ## [License](<%= settings.computed_project_uri_license %>)
49
49
  <% end %>
50
50
 
51
- <% if configuration.build_security %>
52
- ## [Security](<%= configuration.computed_project_url_security %>)
51
+ <% if settings.build_security %>
52
+ ## [Security](<%= settings.computed_project_uri_security %>)
53
53
  <% end %>
54
54
 
55
- <% if configuration.build_conduct %>
56
- ## [Code of Conduct](<%= configuration.computed_project_url_conduct %>)
55
+ <% if settings.build_conduct %>
56
+ ## [Code of Conduct](<%= settings.computed_project_uri_conduct %>)
57
57
  <% end %>
58
58
 
59
- <% if configuration.build_contributions %>
60
- ## [Contributions](<%= configuration.computed_project_url_contributions %>)
59
+ <% if settings.build_contributions %>
60
+ ## [Contributions](<%= settings.computed_project_uri_contributions %>)
61
61
  <% end %>
62
62
 
63
- <% if configuration.build_versions %>
64
- ## [Versions](<%= configuration.computed_project_url_versions %>)
63
+ <% if settings.build_versions %>
64
+ ## [Versions](<%= settings.computed_project_uri_versions %>)
65
65
  <% end %>
66
66
 
67
- <% if configuration.build_community %>
68
- ## [Community](<%= configuration.computed_project_url_community %>)
67
+ <% if settings.build_community %>
68
+ ## [Community](<%= settings.computed_project_uri_community %>)
69
69
  <% end %>
70
70
 
71
71
  ## Credits
72
72
 
73
73
  - Built with [Rubysmith](https://alchemists.io/projects/rubysmith).
74
- - Engineered by [<%= configuration.author_name %>](<%= configuration.author_url %>).
74
+ - Engineered by [<%= settings.author_name %>](<%= settings.author_uri %>).
@@ -1,32 +1,32 @@
1
1
  require "bundler/setup"
2
2
 
3
- <% if configuration.build_git && configuration.build_git_lint %>
3
+ <% if settings.build_git && settings.build_git_lint %>
4
4
  require "git/lint/rake/register"
5
5
  <% end %>
6
- <% if configuration.build_reek %>
6
+ <% if settings.build_reek %>
7
7
  require "reek/rake/task"
8
8
  <% end %>
9
- <% if configuration.build_rspec %>
9
+ <% if settings.build_rspec %>
10
10
  require "rspec/core/rake_task"
11
11
  <% end %>
12
- <% if configuration.build_caliber %>
12
+ <% if settings.build_caliber %>
13
13
  require "rubocop/rake_task"
14
14
  <% end %>
15
15
 
16
- <% if configuration.build_git && configuration.build_git_lint %>
16
+ <% if settings.build_git && settings.build_git_lint %>
17
17
  Git::Lint::Rake::Register.call
18
18
  <% end %>
19
- <% if configuration.build_reek %>
19
+ <% if settings.build_reek %>
20
20
  Reek::Rake::Task.new
21
21
  <% end %>
22
- <% if configuration.build_rspec %>
22
+ <% if settings.build_rspec %>
23
23
  RSpec::Core::RakeTask.new { |task| task.verbose = false }
24
24
  <% end %>
25
- <% if configuration.build_caliber %>
25
+ <% if settings.build_caliber %>
26
26
  RuboCop::RakeTask.new
27
27
  <% end %>
28
28
 
29
29
  desc "Run code quality checks"
30
- task quality: %i[<% if configuration.build_git && configuration.build_git_lint %>git_lint<% end %> <% if configuration.build_reek %>reek<% end %> <% if configuration.build_caliber %>rubocop<% end %>]
30
+ task quality: %i[<% if settings.build_git && settings.build_git_lint %>git_lint<% end %> <% if settings.build_reek %>reek<% end %> <% if settings.build_caliber %>rubocop<% end %>]
31
31
 
32
- task default: %i[quality <% if configuration.build_rspec %>spec<% end %>]
32
+ task default: %i[quality <% if settings.build_rspec %>spec<% end %>]
@@ -1,5 +1,5 @@
1
1
  = Versions
2
2
 
3
- == <%= configuration.project_version %> (<%= configuration.loaded_at.strftime "%Y-%m-%d" %>)
3
+ == <%= settings.project_version %> (<%= settings.loaded_at.strftime "%Y-%m-%d" %>)
4
4
 
5
5
  * Added initial implementation.
@@ -1,5 +1,5 @@
1
1
  # Versions
2
2
 
3
- ## <%= configuration.project_version %> (<%= configuration.loaded_at.strftime "%Y-%m-%d" %>)
3
+ ## <%= settings.project_version %> (<%= settings.loaded_at.strftime "%Y-%m-%d" %>)
4
4
 
5
5
  - Added initial implementation.
@@ -3,7 +3,7 @@
3
3
  require "bundler/setup"
4
4
  Bundler.require :tools
5
5
 
6
- require Bundler.root.join("lib/<%= configuration.project_path %>").to_s
6
+ require Bundler.root.join("lib/<%= settings.project_path %>").to_s
7
7
  require "irb"
8
8
 
9
9
  IRB.start __FILE__
@@ -1,6 +1,6 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
- <% if configuration.build_debug %>
3
+ <% if settings.build_debug %>
4
4
  require "debug"
5
5
  <% end %>
6
6
  require "fileutils"
@@ -1,9 +1,9 @@
1
- <% if configuration.build_zeitwerk %>
1
+ <% if settings.build_zeitwerk %>
2
2
  require "zeitwerk"
3
- <% if configuration.project_levels.positive? %>
3
+ <% if settings.project_levels.positive? %>
4
4
  Zeitwerk::Loader.new.then do |loader|
5
- loader.tag = "<%= configuration.project_name %>"
6
- loader.push_dir "#{__dir__}<%= Array.new(configuration.project_levels, "/..").join %>"
5
+ loader.tag = "<%= settings.project_name %>"
6
+ loader.push_dir "#{__dir__}<%= Array.new(settings.project_levels, "/..").join %>"
7
7
  loader.setup
8
8
  end
9
9
  <% else %>
@@ -14,11 +14,11 @@
14
14
  end
15
15
  <% end %>
16
16
  <% end %>
17
- <% if configuration.build_zeitwerk %>
17
+ <% if settings.build_zeitwerk %>
18
18
  <% namespace do %>
19
- <% if configuration.project_levels.positive? %>
19
+ <% if settings.project_levels.positive? %>
20
20
  def self.loader registry = Zeitwerk::Registry
21
- @loader ||= registry.loaders.find { |loader| loader.tag == "<%= configuration.project_name %>" }
21
+ @loader ||= registry.loaders.find { |loader| loader.tag == "<%= settings.project_name %>" }
22
22
  end
23
23
  <% else %>
24
24
  def self.loader registry = Zeitwerk::Registry
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe <%= configuration.project_namespaced_class %> do
3
+ RSpec.describe <%= settings.project_namespaced_class %> do
4
4
  describe ".loader" do
5
5
  it "eager loads" do
6
6
  expectation = proc { described_class.loader.eager_load force: true }
@@ -8,7 +8,7 @@ RSpec.describe <%= configuration.project_namespaced_class %> do
8
8
  end
9
9
 
10
10
  it "answers unique tag" do
11
- expect(described_class.loader.tag).to eq("<%= configuration.project_name %>")
11
+ expect(described_class.loader.tag).to eq("<%= settings.project_name %>")
12
12
  end
13
13
  end
14
14
  end
@@ -1,4 +1,4 @@
1
- <% if configuration.build_simple_cov %>
1
+ <% if settings.build_simple_cov %>
2
2
  require "simplecov"
3
3
 
4
4
  unless ENV["NO_COVERAGE"]
@@ -13,12 +13,12 @@ end
13
13
 
14
14
  Bundler.require :tools
15
15
 
16
- require "<%= configuration.project_path %>"
17
- <% if configuration.build_refinements %>
16
+ require "<%= settings.project_path %>"
17
+ <% if settings.build_refinements %>
18
18
  require "refinements"
19
19
  <% end %>
20
20
 
21
- <% if configuration.build_refinements %>
21
+ <% if settings.build_refinements %>
22
22
  SPEC_ROOT = Pathname(__dir__).realpath.freeze
23
23
 
24
24
  using Refinements::Pathname
@@ -1,11 +1,11 @@
1
1
  RSpec.shared_context "with temporary directory" do
2
- <% if configuration.build_refinements %>using Refinements::Pathname<% end %>
2
+ <% if settings.build_refinements %>using Refinements::Pathname<% end %>
3
3
 
4
4
  let(:temp_dir) { Bundler.root.join "tmp/rspec" }
5
5
 
6
6
  around do |example|
7
- <%= configuration.build_refinements ? "temp_dir.make_path" : "FileUtils.mkdir_p temp_dir" %>
7
+ <%= settings.build_refinements ? "temp_dir.make_path" : "FileUtils.mkdir_p temp_dir" %>
8
8
  example.run
9
- <%= configuration.build_refinements ? "temp_dir.remove_tree" : "FileUtils.rm_rf temp_dir" %>
9
+ <%= settings.build_refinements ? "temp_dir.remove_tree" : "FileUtils.rm_rf temp_dir" %>
10
10
  end
11
11
  end
data/lib/rubysmith.rb CHANGED
@@ -4,6 +4,7 @@ require "zeitwerk"
4
4
 
5
5
  Zeitwerk::Loader.new.then do |loader|
6
6
  loader.inflector.inflect "cli" => "CLI",
7
+ "ci" => "CI",
7
8
  "circle_ci" => "CircleCI",
8
9
  "erb" => "ERB",
9
10
  "git_hub_ci" => "GitHubCI",
data/rubysmith.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "rubysmith"
5
- spec.version = "6.10.0"
5
+ spec.version = "7.0.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/rubysmith"
@@ -24,20 +24,19 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.required_ruby_version = "~> 3.3"
26
26
  spec.add_dependency "cogger", "~> 0.21"
27
- spec.add_dependency "containable", "~> 0.0"
27
+ spec.add_dependency "containable", "~> 0.2"
28
28
  spec.add_dependency "dry-monads", "~> 1.6"
29
29
  spec.add_dependency "dry-schema", "~> 1.13"
30
- spec.add_dependency "etcher", "~> 1.6"
31
- spec.add_dependency "gitt", "~> 3.2"
32
- spec.add_dependency "infusible", "~> 3.5"
33
- spec.add_dependency "milestoner", "~> 17.8"
34
- spec.add_dependency "pragmater", "~> 14.6"
35
- spec.add_dependency "refinements", "~> 12.1"
36
- spec.add_dependency "rubocop", "~> 1.63"
37
- spec.add_dependency "runcom", "~> 11.0"
38
- spec.add_dependency "sod", "~> 0.8"
30
+ spec.add_dependency "etcher", "~> 2.1"
31
+ spec.add_dependency "gitt", "~> 3.6"
32
+ spec.add_dependency "infusible", "~> 3.8"
33
+ spec.add_dependency "pragmater", "~> 15.0"
34
+ spec.add_dependency "refinements", "~> 12.5"
35
+ spec.add_dependency "rubocop", "~> 1.65"
36
+ spec.add_dependency "runcom", "~> 11.5"
37
+ spec.add_dependency "sod", "~> 0.12"
39
38
  spec.add_dependency "spek", "~> 3.0"
40
- spec.add_dependency "tocer", "~> 17.5"
39
+ spec.add_dependency "tocer", "~> 18.0"
41
40
  spec.add_dependency "tone", "~> 1.0"
42
41
  spec.add_dependency "zeitwerk", "~> 2.6"
43
42
 
data.tar.gz.sig CHANGED
Binary file