rubysmith 1.2.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca0d0b47912e86e319cbd81bd25af112fd467aeab79fcf408ab01ab1446f94b2
4
- data.tar.gz: c0e00e05dc16bf8976c497c48604ddb73c0b9bc6125b285bff89a137cd0b57fa
3
+ metadata.gz: 1f68427c8ab0c7a930bcfb1e546ad59abcc9740adf58dc6b27b2a22a3b8aeceb
4
+ data.tar.gz: 4b0530cfec7c0cc0cd784e7f7a64c631961a667550056b34558391ef754cbc3f
5
5
  SHA512:
6
- metadata.gz: bcb340f7987ff2b2c79f7c650c83c327e9e8e2dcf70bee01b529ce4a269bbb113b26b5df3f7df97eaeca86b8c953c1677be1501786711a1572a91ccc471553ed
7
- data.tar.gz: ed94f96e94d3cd4b72d3e60789a5a960fe537b61edb8ce23898a7406ca16db24ea762d0193e44121c91a4678e805c3a6b5381ca60da3715c30e7e037444a733f
6
+ metadata.gz: b1eb5e0cac8a544bf1eebfaf256c38d01fb91ed5ea45eb8848a1c81c607b2d9b8c7fc4c3cbb1cfaec5129d3b1445d8aa41860bfe06a1ea4288dec31b2a0ff187
7
+ data.tar.gz: d4a5ac4472ff9cb8f1df436b3d2ab7bf8b6d736e58e54b69a6b0b0e0d33e9fe2fbba2f61b0d97ce78ad999c32218c10b2eb7fd23167b4c6e869c8e1c75db9fc7
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -4,13 +4,6 @@
4
4
 
5
5
  = Rubysmith
6
6
 
7
- [link=http://badge.fury.io/rb/rubysmith]
8
- image::https://badge.fury.io/rb/rubysmith.svg[Gem Version]
9
- [link=https://www.alchemists.io/projects/code_quality]
10
- image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
11
- [link=https://circleci.com/gh/bkuhlmann/rubysmith]
12
- image::https://circleci.com/gh/bkuhlmann/rubysmith.svg?style=svg[Circle CI Status]
13
-
14
7
  Rubysmith is a command line interface for smithing Ruby projects.
15
8
 
16
9
  This gem is useful in situations in which you need something more sophisticated than a
@@ -29,8 +22,9 @@ toc::[]
29
22
  * Uses link:https://www.alchemists.io/projects/pragmater[Pragmater] for Ruby source pragma directives.
30
23
  * Supports link:https://github.com/amazing-print/amazing_print[Amazing Print].
31
24
  * Supports link:https://github.com/rubymem/bundler-leak[Bundler Leak].
25
+ * Supports link:https://www.alchemists.io/projects/caliber[Caliber].
32
26
  * Supports link:https://circleci.com[Circle CI].
33
- * Supports link:https://orcid.org[ORCID Citations].
27
+ * Supports link:https://orcid.org[Citations (ORCID)].
34
28
  * Supports console script for local development.
35
29
  * Supports link:https://rubygems.org/gems/dead_end[DeadEnd].
36
30
  * Supports link:https://github.com/ruby/debug[Debug].
@@ -42,11 +36,9 @@ toc::[]
42
36
  * Supports link:https://github.com/troessner/reek[Reek].
43
37
  * Supports link:https://www.alchemists.io/projects/refinements[Refinements].
44
38
  * Supports link:https://rspec.info[RSpec].
45
- * Supports link:https://github.com/rubocop-hq/rubocop[Rubocop].
46
- * Supports link:https://docs.rubocop.org/rubocop-performance[Rubocop Performance].
47
- * Supports link:https://github.com/rubocop-hq/rubocop-rake[Rubocop Rake].
48
- * Supports link:https://github.com/rubocop-hq/rubocop-rspec[Rubocop RSpec].
39
+ * Supports setup script for project setup.
49
40
  * Supports link:https://github.com/simplecov-ruby/simplecov[SimpleCov].
41
+ * Supports link:https://yardoc.org[YARD].
50
42
  * Supports link:https://github.com/fxn/zeitwerk[Zeitwerk].
51
43
  * Supports common settings and a structured layout for building projects.
52
44
  * Provides common documentation:
@@ -72,6 +64,16 @@ To install, run:
72
64
  gem install rubysmith
73
65
  ----
74
66
 
67
+ == Upgrade
68
+
69
+ If upgrading from 1.0.0 to 2.0.0, you'll need to make the following changes:
70
+
71
+ * README badges are no longer injected so you can customize as desired.
72
+ * The `:rubocop:` build configuration has been removed. Use `:caliber:` instead.
73
+ * The `--rubocop` build option has been removed. Use `--caliber` instead.
74
+ * You no longer have to Git ignore RuboCop cached configurations since this is handled by the
75
+ Caliber gem now.
76
+
75
77
  == Usage
76
78
 
77
79
  === Command Line Interface (CLI)
@@ -89,6 +91,7 @@ USAGE:
89
91
  BUILD OPTIONS:
90
92
  --[no-]amazing_print Add Amazing Print gem. Default: true.
91
93
  --[no-]bundler-leak Add Bundler Leak gem. Default: true.
94
+ --[no-]caliber Add Caliber gem. Default: true.
92
95
  --[no-]circle_ci Add Circle CI configuration and badge. Default: false.
93
96
  --[no-]citation Add citation documentation. Default: true.
94
97
  --[no-]community Add community documentation. Default: false.
@@ -109,7 +112,7 @@ BUILD OPTIONS:
109
112
  --[no-]reek Add Reek gem. Default: true.
110
113
  --[no-]refinements Add Refinements gem. Default: true.
111
114
  --[no-]rspec Add RSpec gem. Default: true.
112
- --[no-]rubocop Add RuboCop gems. Default: true.
115
+ --[no-]security Add security. Default: true.
113
116
  --[no-]setup Add setup script. Default: true.
114
117
  --[no-]simple_cov Add SimpleCov gem. Default: true.
115
118
  --[no-]versions Add version history. Default: true.
@@ -181,11 +184,17 @@ The `--bundler-leak` option allows you to build your project with the
181
184
  link:https://github.com/rubymem/bundler-leak[Bundler Leak] gem which helps detect memory leaks in
182
185
  your gem dependencies.
183
186
 
187
+ ==== Caliber
188
+
189
+ The `--caliber` option allows you to build your project with the
190
+ link:https://www.alchemists.io/projects/caliber[Caliber] gem so you have an immediate working -- and
191
+ high quality -- link:https://docs.rubocop.org/rubocop[RuboCop] configuration. Read the Caliber
192
+ documentation for further customization.
193
+
184
194
  ==== Circle CI
185
195
 
186
196
  The `--circle_ci` option allows you to build your project with link:https://circleci.com[Circle CI]
187
- configured so you can get your project building as quickly as possible. This includes a README badge
188
- and configuration YAML.
197
+ configured so you can get your project building as quickly as possible.
189
198
 
190
199
  ==== Citation
191
200
 
@@ -218,8 +227,8 @@ contribute back to your work.
218
227
  ==== DeadEnd
219
228
 
220
229
  The `--dead_end` option allows you build your project with the
221
- link:https://github.com/zombocom/dead_end[DeadEnd] for debugging purposes since the DeadEnd gem will
222
- show you where you are missing `end`'s and closing statements.
230
+ link:https://github.com/zombocom/dead_end[Dead End] gem for debugging purposes since Dead End will
231
+ show you where you are missing closing `end` statements.
223
232
 
224
233
  ==== Debug
225
234
 
@@ -259,7 +268,7 @@ to build a new project with all options enabled without having to pick and choos
259
268
  ==== Minimum
260
269
 
261
270
  The `--min` option allows you to build your project with _all_ options _disabled_. This is a quick
262
- way to build a new project with the bare minimum of support which is a one step above reaching for
271
+ way to build a new project with the bare minimum of support which is a one step above reaching for a
263
272
  Bundler Inline script.
264
273
 
265
274
  ==== Rake
@@ -287,13 +296,6 @@ Ruby core objects without monkey patching your code.
287
296
  The `--rspec` option allows you add the link:https://rspec.info[RSpec] gem to your project for
288
297
  defining your project specifications and have a framework for testing your code.
289
298
 
290
- ==== Rubocop
291
-
292
- The `--rubocop` option allows you to add the link:https://docs.rubocop.org[RuboCop] gem and suite
293
- of gems to your project for good code quality standards. This the Alchemists style guide, provided
294
- by the link:https://www.alchemists.io/projects/code_quality[Code Quality] project, is what is used
295
- by default.
296
-
297
299
  ==== Setup
298
300
 
299
301
  The `--setup` option allows you to configure you project with automated setup instructions so anyone
@@ -359,6 +361,7 @@ variables. The default configuration is as follows:
359
361
  :build:
360
362
  :amazing_print: true
361
363
  :bundler_leak: true
364
+ :caliber: true
362
365
  :circle_ci: false
363
366
  :citation: true
364
367
  :community: false
@@ -379,7 +382,6 @@ variables. The default configuration is as follows:
379
382
  :reek: true
380
383
  :refinements: true
381
384
  :rspec: true
382
- :rubocop: true
383
385
  :security: true
384
386
  :setup: true
385
387
  :simple_cov: true
@@ -474,7 +476,7 @@ these options are explained in greater detail above.
474
476
 
475
477
  ==== Citations
476
478
 
477
- This section allows you to configure your link:https://orcid.org[ORCiD]
479
+ This section allows you to configure your link:https://orcid.org[ORCID]
478
480
  link:https://citation-file-format.github.io[citation] information used by the research community.
479
481
  You should definitely fill this in. Your author information, detailed above, will be used as well.
480
482
 
@@ -501,9 +503,7 @@ Follow the above links to learn more about each extension's gem configuration.
501
503
  ==== GitHub
502
504
 
503
505
  Your GitHub user is the handle you setup when creating your GitHub account. This information is used
504
- for documentation purposes and Circle CI badge association. If you don't define this information,
505
- Rubysmith will automatically fallback to pulling this information from your Git configuration (i.e.
506
- `github.user`). If all else fails, then nothing will be used.
506
+ for template and/or URL construction purposes.
507
507
 
508
508
  ==== License
509
509
 
@@ -516,7 +516,7 @@ license are available:
516
516
 
517
517
  ==== Project
518
518
 
519
- There are two categories within this section: URLs and version. The URLs allow you to link to
519
+ There are two sub-categories within this section: URLs and version. The URLs allow you to link to
520
520
  specific documentation related to your project. You'll definitely want to customize these as makes
521
521
  sense since these URLs are used for documentation, citations, and general project information. You
522
522
  can also use `%project_name%` as a placeholder anywhere in your URL and Rubysmith will ensure your
@@ -4,8 +4,8 @@ require "refinements/structs"
4
4
 
5
5
  module Rubysmith
6
6
  module Builders
7
- # Builds project skeleton with RuboCop code quality support.
8
- class Rubocop
7
+ # Builds project skeleton with Caliber style support.
8
+ class Caliber
9
9
  using Refinements::Structs
10
10
 
11
11
  def self.call(...) = new(...).call
@@ -16,7 +16,7 @@ module Rubysmith
16
16
  end
17
17
 
18
18
  def call
19
- return configuration unless configuration.build_rubocop
19
+ return configuration unless configuration.build_caliber
20
20
 
21
21
  builder.call(configuration.merge(template_path: "%project_name%/bin/rubocop.erb"))
22
22
  .render
@@ -1,11 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "refinements/strings"
3
4
  require "refinements/structs"
4
5
 
5
6
  module Rubysmith
6
7
  module Builders
7
8
  # Builds project skeleton core structure and minimum file support.
8
9
  class Core
10
+ using Refinements::Strings
9
11
  using Refinements::Structs
10
12
 
11
13
  def self.call(...) = new(...).call
@@ -21,18 +23,17 @@ module Rubysmith
21
23
  .replace(" require", "require")
22
24
  .replace(/ (?=(Zeit|loader|end))/, "")
23
25
  .replace("\n \n", "\n\n")
24
- .insert_before("module #{module_name}", "#{module_indent}# Main namespace.\n")
26
+ .insert_before("module #{module_name}", "#{indentation}# Main namespace.\n")
27
+ .replace("end\n end", " end\n end")
25
28
 
26
29
  configuration
27
30
  end
28
31
 
29
32
  private
30
33
 
31
- def module_indent = project_class.include?("::") ? " " : ""
34
+ def indentation = "".indent configuration.project_levels
32
35
 
33
- def module_name = project_class.split("::").last
34
-
35
- def project_class = configuration.project_class
36
+ def module_name = configuration.project_class
36
37
 
37
38
  attr_reader :configuration, :builder
38
39
  end
@@ -16,7 +16,9 @@ module Rubysmith
16
16
  end
17
17
 
18
18
  def call
19
- builder.call(configuration.merge(template_path: "%project_name%/.ruby-version.erb")).render
19
+ builder.call(configuration.merge(template_path: "%project_name%/.ruby-version.erb"))
20
+ .render
21
+ .append("\n")
20
22
  configuration
21
23
  end
22
24
 
@@ -25,7 +25,7 @@ module Rubysmith
25
25
  Builders::Reek,
26
26
  Builders::RSpec::Context,
27
27
  Builders::RSpec::Helper,
28
- Builders::Rubocop,
28
+ Builders::Caliber,
29
29
  Extensions::Bundler,
30
30
  Extensions::Pragmater,
31
31
  Extensions::Tocer,
@@ -50,6 +50,15 @@ module Rubysmith
50
50
  end
51
51
  end
52
52
 
53
+ def add_caliber
54
+ client.on(
55
+ "--[no-]caliber",
56
+ "Add Caliber gem. #{default __method__}."
57
+ ) do |value|
58
+ configuration.merge! build_caliber: value
59
+ end
60
+ end
61
+
53
62
  def add_console
54
63
  client.on(
55
64
  "--[no-]console",
@@ -230,15 +239,6 @@ module Rubysmith
230
239
  end
231
240
  end
232
241
 
233
- def add_rubocop
234
- client.on(
235
- "--[no-]rubocop",
236
- "Add RuboCop gems. #{default __method__}."
237
- ) do |value|
238
- configuration.merge! build_rubocop: value
239
- end
240
- end
241
-
242
242
  def add_security
243
243
  client.on(
244
244
  "--[no-]security",
@@ -20,7 +20,7 @@ module Rubysmith
20
20
  end
21
21
 
22
22
  def call arguments = []
23
- client.banner = "Rubysmith - #{specification.summary}"
23
+ client.banner = specification.labeled_summary
24
24
  client.separator "\nUSAGE:\n"
25
25
  collate
26
26
  client.parse arguments
@@ -33,7 +33,7 @@ module Rubysmith
33
33
  in action_config: Symbol => action then config action
34
34
  in action_build: true then build configuration
35
35
  in action_publish: true then publish configuration
36
- in action_version: true then logger.info { "Rubysmith #{specification.version}" }
36
+ in action_version: true then logger.info { specification.labeled_version }
37
37
  else usage
38
38
  end
39
39
  end
@@ -24,6 +24,7 @@ module Rubysmith
24
24
  :author_url,
25
25
  :build_amazing_print,
26
26
  :build_bundler_leak,
27
+ :build_caliber,
27
28
  :build_circle_ci,
28
29
  :build_citation,
29
30
  :build_cli,
@@ -45,7 +46,6 @@ module Rubysmith
45
46
  :build_reek,
46
47
  :build_refinements,
47
48
  :build_rspec,
48
- :build_rubocop,
49
49
  :build_security,
50
50
  :build_setup,
51
51
  :build_simple_cov,
@@ -111,14 +111,18 @@ module Rubysmith
111
111
 
112
112
  def license_label_version = [license_label, license_version].compress.join("-")
113
113
 
114
- def project_label = project_name.titleize
114
+ def project_class = project_namespaced_class.split("::").last
115
115
 
116
- def project_class = project_name.camelcase
116
+ def project_namespaced_class = project_name.camelcase
117
117
 
118
- def project_root = target_root.join(project_name)
118
+ def project_label = project_name.titleize
119
+
120
+ def project_levels = project_namespaced_class.split("::").size - 1
119
121
 
120
122
  def project_path = project_name.snakecase
121
123
 
124
+ def project_root = target_root.join(project_name)
125
+
122
126
  def computed_project_url_community = format_url(__method__)
123
127
 
124
128
  def computed_project_url_conduct = format_url(__method__)
@@ -6,6 +6,7 @@
6
6
  :build:
7
7
  :amazing_print: true
8
8
  :bundler_leak: true
9
+ :caliber: true
9
10
  :circle_ci: false
10
11
  :citation: true
11
12
  :cli: false
@@ -27,7 +28,6 @@
27
28
  :reek: true
28
29
  :refinements: true
29
30
  :rspec: true
30
- :rubocop: true
31
31
  :security: true
32
32
  :setup: true
33
33
  :simple_cov: true
@@ -3,16 +3,15 @@
3
3
  require "dry-container"
4
4
  require "logger"
5
5
  require "pastel"
6
+ require "spek"
6
7
 
7
8
  module Rubysmith
8
9
  # Provides a global gem container for injection into other objects.
9
10
  module Container
10
11
  extend Dry::Container::Mixin
11
12
 
12
- SPEC_PATH = "#{__dir__}/../../rubysmith.gemspec".freeze
13
-
14
13
  register(:configuration) { Configuration::Loader.call }
15
- register(:specification) { Gem::Specification.load SPEC_PATH }
14
+ register(:specification) { Spek::Loader.call "#{__dir__}/../../rubysmith.gemspec" }
16
15
  register(:colorizer) { Pastel.new enabled: $stdout.tty? }
17
16
  register(:kernel) { Kernel }
18
17
 
@@ -7,7 +7,7 @@ module Rubysmith
7
7
  # Renders ERB templates as fully functional files.
8
8
  class ERB
9
9
  def initialize configuration,
10
- scope: Renderers::Namespace.new(configuration.project_class),
10
+ scope: Renderers::Namespace.new(configuration.project_namespaced_class),
11
11
  client: ::ERB
12
12
  @configuration = configuration
13
13
  @scope = scope
@@ -8,10 +8,10 @@ module Rubysmith
8
8
  class Namespace
9
9
  using Refinements::Strings
10
10
 
11
- def initialize namespace
11
+ def initialize namespace, delimiter: "::"
12
12
  @namespace = namespace
13
- @modules = namespace.split "::"
14
- @depth = namespace.scan("::").length
13
+ @modules = namespace.split delimiter
14
+ @depth = namespace.scan(delimiter).length
15
15
  end
16
16
 
17
17
  def call(content = nil) = "#{prefix}#{body content}#{suffix}"
@@ -1,7 +1,4 @@
1
1
  .bundle
2
- <% if configuration.build_rubocop %>
3
- .rubocop-http*
4
- <% end %>
5
2
  <% if configuration.build_yard %>
6
3
  .yardoc
7
4
  <% end %>
@@ -1,9 +1,2 @@
1
- inherit_from:
2
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/main/configurations/rubocop/ruby.yml
3
- <% if configuration.build_rake %>
4
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/main/configurations/rubocop/rake.yml
5
- <% end %>
6
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/main/configurations/rubocop/performance.yml
7
- <% if configuration.build_rspec %>
8
- - https://raw.githubusercontent.com/bkuhlmann/code_quality/main/configurations/rubocop/rspec.yml
9
- <% end %>
1
+ inherit_gem:
2
+ caliber: config/all.yml
@@ -3,7 +3,7 @@ ruby File.read(".ruby-version").strip
3
3
  source "https://rubygems.org"
4
4
 
5
5
  <% if configuration.build_refinements %>
6
- gem "refinements", "~> 9.1"
6
+ gem "refinements", "~> 9.2"
7
7
  <% end %>
8
8
  <% if configuration.build_zeitwerk %>
9
9
  gem "zeitwerk", "~> 2.5"
@@ -13,23 +13,18 @@ group :code_quality do
13
13
  <% if configuration.build_bundler_leak %>
14
14
  gem "bundler-leak", "~> 0.2"
15
15
  <% end %>
16
+ <% if configuration.build_caliber %>
17
+ gem "caliber", "~> 0.2"
18
+ <% end %>
16
19
  <% if configuration.build_dead_end %>
17
- gem "dead_end", "~> 3.0"
20
+ gem "dead_end", "~> 3.1"
18
21
  <% end %>
19
22
  <% if configuration.build_git && configuration.build_git_lint %>
20
- gem "git-lint", "~> 3.0"
23
+ gem "git-lint", "~> 3.2"
21
24
  <% end %>
22
25
  <% if configuration.build_reek %>
23
26
  gem "reek", "~> 6.1"
24
27
  <% end %>
25
- <% if configuration.build_rubocop %>
26
- gem "rubocop", "~> 1.25"
27
- gem "rubocop-performance", "~> 1.12"
28
- gem "rubocop-rake", "~> 0.6"
29
- <% end %>
30
- <% if configuration.build_rspec && configuration.build_rubocop %>
31
- gem "rubocop-rspec", "~> 2.6"
32
- <% end %>
33
28
  <% if configuration.build_simple_cov %>
34
29
  gem "simplecov", "~> 0.21"
35
30
  <% end %>
@@ -43,7 +38,7 @@ group :development do
43
38
  gem "rake", "~> 13.0"
44
39
  <% end %>
45
40
  <% if configuration.markdown? %>
46
- gem "tocer", "~> 13.0"
41
+ gem "tocer", "~> 13.2"
47
42
  <% end %>
48
43
  <% if configuration.build_yard %>
49
44
  gem "yard", "~> 0.9"
@@ -55,7 +50,7 @@ group :test do
55
50
  gem "guard-rspec", "~> 4.7", require: false
56
51
  <% end %>
57
52
  <% if configuration.build_rspec %>
58
- gem "rspec", "~> 3.10"
53
+ gem "rspec", "~> 3.11"
59
54
  <% end %>
60
55
  end
61
56
 
@@ -4,15 +4,6 @@
4
4
 
5
5
  = <%= configuration.project_label %>
6
6
 
7
- <% if configuration.build_rubocop %>
8
- [link=https://www.alchemists.io/projects/code_quality]
9
- image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
10
- <% end %>
11
- <% if configuration.build_circle_ci %>
12
- [link=https://circleci.com/gh/<%= configuration.git_hub_user %>/<%= configuration.project_name %>]
13
- image::https://circleci.com/gh/<%= configuration.git_hub_user %>/<%= configuration.project_name %>.svg?style=svg[Circle CI Status]
14
- <% end %>
15
-
16
7
  toc::[]
17
8
 
18
9
  == Features
@@ -1,12 +1,5 @@
1
1
  # <%= configuration.project_label %>
2
2
 
3
- <% if configuration.build_rubocop %>
4
- [![Alchemists Style Guide](https://img.shields.io/badge/code_style-alchemists-brightgreen.svg)](https://www.alchemists.io/projects/code_quality)
5
- <% end %>
6
- <% if configuration.build_circle_ci %>
7
- [![Circle CI Status](https://circleci.com/gh/<%= configuration.git_hub_user %>/<%= configuration.project_name %>.svg?style=svg)](https://circleci.com/gh/<%= configuration.git_hub_user %>/<%= configuration.project_name %>)
8
- <% end %>
9
-
10
3
  <!-- Tocer[start]: Auto-generated, don't remove. -->
11
4
  <!-- Tocer[finish]: Auto-generated, don't remove. -->
12
5
 
@@ -12,7 +12,7 @@ require "bundler/setup"
12
12
  <% if configuration.build_rspec %>
13
13
  require "rspec/core/rake_task"
14
14
  <% end %>
15
- <% if configuration.build_rubocop %>
15
+ <% if configuration.build_caliber %>
16
16
  require "rubocop/rake_task"
17
17
  <% end %>
18
18
  <% if configuration.build_yard %>
@@ -28,7 +28,7 @@ require "bundler/setup"
28
28
  <% if configuration.build_rspec %>
29
29
  RSpec::Core::RakeTask.new :spec
30
30
  <% end %>
31
- <% if configuration.build_rubocop %>
31
+ <% if configuration.build_caliber %>
32
32
  RuboCop::RakeTask.new
33
33
  <% end %>
34
34
 
@@ -39,6 +39,6 @@ require "bundler/setup"
39
39
  <% end %>
40
40
 
41
41
  desc "Run code quality checks"
42
- task code_quality: %i[<% if configuration.build_bundler_leak %>bundle:leak<% end %> <% if configuration.build_git && configuration.build_git_lint %>git_lint<% end %> <% if configuration.build_reek %>reek<% end %> <% if configuration.build_rubocop %>rubocop<% end %>]
42
+ task code_quality: %i[<% if configuration.build_bundler_leak %>bundle:leak<% end %> <% if configuration.build_git && configuration.build_git_lint %>git_lint<% end %> <% if configuration.build_reek %>reek<% end %> <% if configuration.build_caliber %>rubocop<% end %>]
43
43
 
44
44
  task default: %i[code_quality <% if configuration.build_rspec %>spec<% end %>]
@@ -1,8 +1,8 @@
1
1
  <% if configuration.build_zeitwerk %>
2
2
  require "zeitwerk"
3
- <% if configuration.project_path.include? "/" %>
3
+ <% if configuration.project_levels.positive? %>
4
4
  Zeitwerk::Loader.new.then do |loader|
5
- loader.push_dir "#{__dir__}/.."
5
+ loader.push_dir "#{__dir__}<%= Array.new(configuration.project_levels, "/..").join %>"
6
6
  loader.setup
7
7
  end
8
8
  <% else %>
data/rubysmith.gemspec CHANGED
@@ -2,8 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "rubysmith"
5
- spec.version = "1.2.0"
6
- spec.platform = Gem::Platform::RUBY
5
+ spec.version = "2.0.1"
7
6
  spec.authors = ["Brooke Kuhlmann"]
8
7
  spec.email = ["brooke@alchemists.io"]
9
8
  spec.homepage = "https://github.com/bkuhlmann/rubysmith"
@@ -28,15 +27,15 @@ Gem::Specification.new do |spec|
28
27
  spec.add_dependency "milestoner", "~> 13.0"
29
28
  spec.add_dependency "pastel", "~> 0.8"
30
29
  spec.add_dependency "pragmater", "~> 10.0"
31
- spec.add_dependency "refinements", "~> 9.1"
30
+ spec.add_dependency "refinements", "~> 9.2"
32
31
  spec.add_dependency "rubocop", "~> 1.25"
33
- spec.add_dependency "runcom", "~> 8.0"
34
- spec.add_dependency "tocer", "~> 13.0"
32
+ spec.add_dependency "runcom", "~> 8.2"
33
+ spec.add_dependency "spek", "~> 0.0"
34
+ spec.add_dependency "tocer", "~> 13.2"
35
35
  spec.add_dependency "zeitwerk", "~> 2.5"
36
36
 
37
37
  spec.bindir = "exe"
38
38
  spec.executables << "rubysmith"
39
39
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
40
40
  spec.files = Dir.glob ["*.gemspec", "lib/**/*"], File::FNM_DOTMATCH
41
- spec.require_paths = ["lib"]
42
41
  end
data.tar.gz.sig CHANGED
Binary file
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: 1.2.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
29
29
  W2A=
30
30
  -----END CERTIFICATE-----
31
- date: 2022-01-23 00:00:00.000000000 Z
31
+ date: 2022-02-28 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: dry-container
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '9.1'
109
+ version: '9.2'
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '9.1'
116
+ version: '9.2'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: rubocop
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -134,28 +134,42 @@ dependencies:
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '8.0'
137
+ version: '8.2'
138
138
  type: :runtime
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: '8.0'
144
+ version: '8.2'
145
+ - !ruby/object:Gem::Dependency
146
+ name: spek
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '0.0'
152
+ type: :runtime
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - "~>"
157
+ - !ruby/object:Gem::Version
158
+ version: '0.0'
145
159
  - !ruby/object:Gem::Dependency
146
160
  name: tocer
147
161
  requirement: !ruby/object:Gem::Requirement
148
162
  requirements:
149
163
  - - "~>"
150
164
  - !ruby/object:Gem::Version
151
- version: '13.0'
165
+ version: '13.2'
152
166
  type: :runtime
153
167
  prerelease: false
154
168
  version_requirements: !ruby/object:Gem::Requirement
155
169
  requirements:
156
170
  - - "~>"
157
171
  - !ruby/object:Gem::Version
158
- version: '13.0'
172
+ version: '13.2'
159
173
  - !ruby/object:Gem::Dependency
160
174
  name: zeitwerk
161
175
  requirement: !ruby/object:Gem::Requirement
@@ -186,6 +200,7 @@ files:
186
200
  - lib/rubysmith.rb
187
201
  - lib/rubysmith/builder.rb
188
202
  - lib/rubysmith/builders/bundler.rb
203
+ - lib/rubysmith/builders/caliber.rb
189
204
  - lib/rubysmith/builders/circle_ci.rb
190
205
  - lib/rubysmith/builders/console.rb
191
206
  - lib/rubysmith/builders/core.rb
@@ -202,7 +217,6 @@ files:
202
217
  - lib/rubysmith/builders/reek.rb
203
218
  - lib/rubysmith/builders/rspec/context.rb
204
219
  - lib/rubysmith/builders/rspec/helper.rb
205
- - lib/rubysmith/builders/rubocop.rb
206
220
  - lib/rubysmith/builders/setup.rb
207
221
  - lib/rubysmith/builders/version.rb
208
222
  - lib/rubysmith/cli/actions/build.rb
@@ -283,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
283
297
  - !ruby/object:Gem::Version
284
298
  version: '0'
285
299
  requirements: []
286
- rubygems_version: 3.3.5
300
+ rubygems_version: 3.3.8
287
301
  signing_key:
288
302
  specification_version: 4
289
303
  summary: A command line interface for smithing Ruby projects.
metadata.gz.sig CHANGED
Binary file