rubysmith 6.6.0 → 6.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/README.adoc +18 -1
  4. data/lib/rubysmith/builders/abstract.rb +24 -0
  5. data/lib/rubysmith/builders/bundler.rb +1 -12
  6. data/lib/rubysmith/builders/caliber.rb +1 -12
  7. data/lib/rubysmith/builders/circle_ci.rb +1 -12
  8. data/lib/rubysmith/builders/console.rb +1 -12
  9. data/lib/rubysmith/builders/core.rb +1 -10
  10. data/lib/rubysmith/builders/documentation/citation.rb +1 -12
  11. data/lib/rubysmith/builders/documentation/license.rb +1 -10
  12. data/lib/rubysmith/builders/documentation/readme.rb +2 -11
  13. data/lib/rubysmith/builders/documentation/version.rb +1 -10
  14. data/lib/rubysmith/builders/git/commit.rb +2 -8
  15. data/lib/rubysmith/builders/git/ignore.rb +1 -12
  16. data/lib/rubysmith/builders/git/safe.rb +1 -12
  17. data/lib/rubysmith/builders/git/setup.rb +1 -12
  18. data/lib/rubysmith/builders/git_hub.rb +1 -10
  19. data/lib/rubysmith/builders/git_hub_ci.rb +1 -10
  20. data/lib/rubysmith/builders/guard.rb +1 -12
  21. data/lib/rubysmith/builders/init.rb +1 -12
  22. data/lib/rubysmith/builders/rake.rb +1 -10
  23. data/lib/rubysmith/builders/reek.rb +1 -12
  24. data/lib/rubysmith/builders/rspec/binstub.rb +1 -12
  25. data/lib/rubysmith/builders/rspec/context.rb +1 -12
  26. data/lib/rubysmith/builders/rspec/helper.rb +1 -12
  27. data/lib/rubysmith/builders/setup.rb +1 -12
  28. data/lib/rubysmith/builders/version.rb +1 -12
  29. data/lib/rubysmith/cli/actions/irb_kit.rb +22 -0
  30. data/lib/rubysmith/cli/actions/rtc.rb +22 -0
  31. data/lib/rubysmith/cli/commands/build.rb +2 -0
  32. data/lib/rubysmith/configuration/contract.rb +4 -1
  33. data/lib/rubysmith/configuration/defaults.yml +2 -0
  34. data/lib/rubysmith/configuration/model.rb +4 -1
  35. data/lib/rubysmith/configuration/transformers/git_email.rb +4 -4
  36. data/lib/rubysmith/configuration/transformers/git_hub_user.rb +4 -4
  37. data/lib/rubysmith/configuration/transformers/git_user.rb +10 -8
  38. data/lib/rubysmith/configuration/transformers/target_root.rb +4 -4
  39. data/lib/rubysmith/configuration/transformers/template_root.rb +4 -4
  40. data/lib/rubysmith/container.rb +1 -1
  41. data/lib/rubysmith/templates/%project_name%/CITATION.cff.erb +1 -1
  42. data/lib/rubysmith/templates/%project_name%/Gemfile.erb +6 -1
  43. data/lib/rubysmith/templates/%project_name%/LICENSE-apache.adoc.erb +1 -1
  44. data/lib/rubysmith/templates/%project_name%/LICENSE-apache.md.erb +1 -1
  45. data/lib/rubysmith/templates/%project_name%/LICENSE-mit.adoc.erb +1 -1
  46. data/lib/rubysmith/templates/%project_name%/LICENSE-mit.md.erb +1 -1
  47. data/lib/rubysmith/templates/%project_name%/README.adoc.erb +5 -36
  48. data/lib/rubysmith/templates/%project_name%/README.md.erb +6 -25
  49. data/lib/rubysmith/templates/%project_name%/VERSIONS.adoc.erb +1 -1
  50. data/lib/rubysmith/templates/%project_name%/VERSIONS.md.erb +1 -1
  51. data/lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb +1 -0
  52. data/lib/rubysmith.rb +3 -1
  53. data/rubysmith.gemspec +3 -3
  54. data.tar.gz.sig +0 -0
  55. metadata +10 -8
  56. metadata.gz.sig +0 -0
  57. data/lib/rubysmith/configuration/transformers/current_time.rb +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8971c91c536a34ae73babda51a1958dd8676e64f66c7886fd9df251da52e79f
4
- data.tar.gz: 2373c1ae9db556f3018aa8cd760deef877e55e28e1a7e79ad48381c0b29460d1
3
+ metadata.gz: 0f20822bfa5fc0def1a71fa52c0baf8d9888bb0ea85ead200ed7a00412ffe96b
4
+ data.tar.gz: e92c7f25a98acc995384f4154f806008144e4879b96b583214269f9a7bb15f11
5
5
  SHA512:
6
- metadata.gz: 4da5c0307b7351af83bf0da75e9661753d0b7e8eb8c03cc2556cd1ff479d6d90aa35a726d8639102c4626e691da9f8d87fbe6ec9ea011e0dd1cb3c33cf4a496a
7
- data.tar.gz: 966e676b749c20a54f9d3a1d6eb8de766781002f47ba4412a05965cc8f0cb13f829822dde333445cf8a563fcc5c80ea14da25627cbb625f02065528b059dd137
6
+ metadata.gz: 61765546bec88e56137acd995023780d29b8356f6abcd6d782a91e6c8e9bbda616bb0374dcb73ed43607ff1680c26d63a266e922ee7c597caaf9e4b4260dfba3
7
+ data.tar.gz: 926375d0d30b427c0bda7f024f5e55ef29f7fed4a5621807e77ad553964369297c11b64b32521e3decdac1172c93902313ba81517b14da5b5d514a66fc9cfab8
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -29,13 +29,14 @@ toc::[]
29
29
  * Supports link:https://github.com[GitHub].
30
30
  * Supports link:https://alchemists.io/projects/git-lint[Git Lint].
31
31
  * Supports link:https://github.com/guard/guard[Guard].
32
+ * Supports link:https://alchemists.io/projects/irb-kit[IRB Kit].
32
33
  * Supports link:https://github.com/ruby/rake[Rake].
33
34
  * Supports link:https://github.com/troessner/reek[Reek].
34
35
  * Supports link:https://alchemists.io/projects/refinements[Refinements].
35
36
  * Supports link:https://rspec.info[RSpec].
37
+ * Supports link:https://github.com/ruby/repl_type_completor[ReplTypeCompletor].
36
38
  * Supports setup script for project setup.
37
39
  * Supports link:https://github.com/simplecov-ruby/simplecov[SimpleCov].
38
- * Supports link:https://github.com/ruby/repl_type_completor[ReplTypeCompletor].
39
40
  * Supports link:https://github.com/fxn/zeitwerk[Zeitwerk].
40
41
  * Supports common settings and a structured layout for building projects.
41
42
  * Provides common documentation:
@@ -210,6 +211,10 @@ manner.
210
211
  The `--guard` option allows you add the link:https://github.com/guard/guard[Guard] gem to your
211
212
  project for rapid red, green, refactor development cycles.
212
213
 
214
+ ===== IRB Kit
215
+
216
+ The `--irb-kit` option allows you add the link:https://alchemists.io/projects/irb-kit[IRB Kit] gem to your project for additional extensions you can use within IRB to improve your workflow.
217
+
213
218
  ===== License
214
219
 
215
220
  The `--license` option ensures you build your project with a license.
@@ -248,6 +253,10 @@ Ruby core objects without monkey patching your code.
248
253
  The `--rspec` option allows you add the link:https://rspec.info[RSpec] gem to your project for
249
254
  defining your project specifications and have a framework for testing your code.
250
255
 
256
+ ===== Repl Type Completor (RTC)
257
+
258
+ The `--rtc` option allows you add the link:https://github.com/ruby/repl_type_completor[Repl Type Completor] gem to your project for improved type completion when using link:https://github.com/ruby/irb[IRB].
259
+
251
260
  ===== Setup
252
261
 
253
262
  The `--setup` option allows you to configure you project with automated setup instructions so anyone
@@ -320,6 +329,7 @@ build:
320
329
  git_hub_ci: false
321
330
  git_lint: true
322
331
  guard: true
332
+ irb_kit: false
323
333
  license: true
324
334
  maximum: false
325
335
  minimum: false
@@ -328,6 +338,7 @@ build:
328
338
  reek: true
329
339
  refinements: true
330
340
  rspec: true
341
+ rtc: true
331
342
  security: true
332
343
  setup: true
333
344
  simple_cov: true
@@ -345,6 +356,8 @@ license:
345
356
  label: Hippocratic
346
357
  name: hippocratic
347
358
  version: "2.1"
359
+ organization:
360
+ url:
348
361
  project:
349
362
  url:
350
363
  community:
@@ -413,6 +426,10 @@ Use this section to define the license you want to use for your project. The fol
413
426
 
414
427
  When picking a license, you can also supply the appropriate label and version in addition to the name.
415
428
 
429
+ ==== Organization
430
+
431
+ Use this section to define URL 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 URL especially for documentation purposes.
432
+
416
433
  ==== Project
417
434
 
418
435
  There are two sub-categories within this section: URLs and version. The URLs allow you to link to
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Rubysmith
4
+ module Builders
5
+ # Provides default implementation from which builders can inherit from.
6
+ class Abstract
7
+ def self.call(...) = new(...).call
8
+
9
+ def initialize configuration, builder: Builder
10
+ @configuration = configuration
11
+ @builder = builder
12
+ end
13
+
14
+ def call
15
+ fail NoMethodError,
16
+ "`#{self.class}##{__method__} #{method(__method__).parameters}` must be implemented."
17
+ end
18
+
19
+ protected
20
+
21
+ attr_reader :configuration, :builder
22
+ end
23
+ end
24
+ end
@@ -5,16 +5,9 @@ require "refinements/struct"
5
5
  module Rubysmith
6
6
  module Builders
7
7
  # Builds Bundler Gemfile configuration for project skeleton.
8
- class Bundler
8
+ class Bundler < Abstract
9
9
  using Refinements::Struct
10
10
 
11
- def self.call(...) = new(...).call
12
-
13
- def initialize configuration, builder: Builder
14
- @configuration = configuration
15
- @builder = builder
16
- end
17
-
18
11
  def call
19
12
  builder.call(configuration.merge(template_path: "%project_name%/Gemfile.erb"))
20
13
  .render
@@ -27,10 +20,6 @@ module Rubysmith
27
20
 
28
21
  configuration
29
22
  end
30
-
31
- private
32
-
33
- attr_reader :configuration, :builder
34
23
  end
35
24
  end
36
25
  end
@@ -5,16 +5,9 @@ require "refinements/struct"
5
5
  module Rubysmith
6
6
  module Builders
7
7
  # Builds project skeleton with Caliber style support.
8
- class Caliber
8
+ class Caliber < Abstract
9
9
  using Refinements::Struct
10
10
 
11
- def self.call(...) = new(...).call
12
-
13
- def initialize configuration, builder: Builder
14
- @configuration = configuration
15
- @builder = builder
16
- end
17
-
18
11
  def call
19
12
  return configuration unless configuration.build_caliber
20
13
 
@@ -26,10 +19,6 @@ module Rubysmith
26
19
  builder.call(configuration.merge(template_path: path)).render
27
20
  configuration
28
21
  end
29
-
30
- private
31
-
32
- attr_reader :configuration, :builder
33
22
  end
34
23
  end
35
24
  end
@@ -5,16 +5,9 @@ require "refinements/struct"
5
5
  module Rubysmith
6
6
  module Builders
7
7
  # Builds project skeleton Circle CI configuration.
8
- class CircleCI
8
+ class CircleCI < Abstract
9
9
  using Refinements::Struct
10
10
 
11
- def self.call(...) = new(...).call
12
-
13
- def initialize configuration, builder: Builder
14
- @configuration = configuration
15
- @builder = builder
16
- end
17
-
18
11
  def call
19
12
  return configuration unless configuration.build_circle_ci
20
13
 
@@ -24,10 +17,6 @@ module Rubysmith
24
17
 
25
18
  configuration
26
19
  end
27
-
28
- private
29
-
30
- attr_reader :configuration, :builder
31
20
  end
32
21
  end
33
22
  end
@@ -5,16 +5,9 @@ require "refinements/struct"
5
5
  module Rubysmith
6
6
  module Builders
7
7
  # Builds project skeleton console for object inspection and exploration.
8
- class Console
8
+ class Console < Abstract
9
9
  using Refinements::Struct
10
10
 
11
- def self.call(...) = new(...).call
12
-
13
- def initialize configuration, builder: Builder
14
- @configuration = configuration
15
- @builder = builder
16
- end
17
-
18
11
  def call
19
12
  return configuration unless configuration.build_console
20
13
 
@@ -24,10 +17,6 @@ module Rubysmith
24
17
 
25
18
  configuration
26
19
  end
27
-
28
- private
29
-
30
- attr_reader :configuration, :builder
31
20
  end
32
21
  end
33
22
  end
@@ -6,17 +6,10 @@ require "refinements/struct"
6
6
  module Rubysmith
7
7
  module Builders
8
8
  # Builds project skeleton core structure and minimum file support.
9
- class Core
9
+ class Core < Abstract
10
10
  using Refinements::String
11
11
  using Refinements::Struct
12
12
 
13
- def self.call(...) = new(...).call
14
-
15
- def initialize configuration, builder: Builder
16
- @configuration = configuration
17
- @builder = builder
18
- end
19
-
20
13
  def call
21
14
  render_implementation
22
15
  render_specification
@@ -44,8 +37,6 @@ module Rubysmith
44
37
  def indentation = ::Core::EMPTY_STRING.indent configuration.project_levels
45
38
 
46
39
  def module_name = configuration.project_class
47
-
48
- attr_reader :configuration, :builder
49
40
  end
50
41
  end
51
42
  end
@@ -6,26 +6,15 @@ module Rubysmith
6
6
  module Builders
7
7
  module Documentation
8
8
  # Builds project skeleton citation documentation.
9
- class Citation
9
+ class Citation < Abstract
10
10
  using Refinements::Struct
11
11
 
12
- def self.call(...) = new(...).call
13
-
14
- def initialize configuration, builder: Builder
15
- @configuration = configuration
16
- @builder = builder
17
- end
18
-
19
12
  def call
20
13
  return configuration unless configuration.build_citation
21
14
 
22
15
  builder.call(configuration.merge(template_path: "%project_name%/CITATION.cff.erb")).render
23
16
  configuration
24
17
  end
25
-
26
- private
27
-
28
- attr_reader :configuration, :builder
29
18
  end
30
19
  end
31
20
  end
@@ -7,16 +7,9 @@ module Rubysmith
7
7
  module Builders
8
8
  module Documentation
9
9
  # Builds project skeleton LICENSE documentation.
10
- class License
10
+ class License < Abstract
11
11
  using Refinements::Struct
12
12
 
13
- def self.call(...) = new(...).call
14
-
15
- def initialize configuration, builder: Builder
16
- @configuration = configuration
17
- @builder = builder
18
- end
19
-
20
13
  def call
21
14
  return configuration unless configuration.build_license
22
15
 
@@ -30,8 +23,6 @@ module Rubysmith
30
23
 
31
24
  private
32
25
 
33
- attr_reader :configuration, :builder
34
-
35
26
  def kind = configuration.documentation_format
36
27
 
37
28
  def license = configuration.license_name
@@ -6,16 +6,9 @@ module Rubysmith
6
6
  module Builders
7
7
  module Documentation
8
8
  # Builds project skeleton README documentation.
9
- class Readme
9
+ class Readme < Abstract
10
10
  using Refinements::Struct
11
11
 
12
- def self.call(...) = new(...).call
13
-
14
- def initialize configuration, builder: Builder
15
- @configuration = configuration
16
- @builder = builder
17
- end
18
-
19
12
  def call
20
13
  return configuration unless configuration.build_readme
21
14
 
@@ -27,9 +20,7 @@ module Rubysmith
27
20
  configuration
28
21
  end
29
22
 
30
- private
31
-
32
- attr_reader :configuration, :builder
23
+ protected
33
24
 
34
25
  def kind = configuration.documentation_format
35
26
  end
@@ -7,16 +7,9 @@ module Rubysmith
7
7
  module Builders
8
8
  module Documentation
9
9
  # Builds project skeleton version history.
10
- class Version
10
+ class Version < Abstract
11
11
  using Refinements::Struct
12
12
 
13
- def self.call(...) = new(...).call
14
-
15
- def initialize configuration, builder: Builder
16
- @configuration = configuration
17
- @builder = builder
18
- end
19
-
20
13
  def call
21
14
  return configuration unless configuration.build_versions
22
15
 
@@ -28,8 +21,6 @@ module Rubysmith
28
21
 
29
22
  private
30
23
 
31
- attr_reader :configuration, :builder
32
-
33
24
  def kind = configuration.documentation_format
34
25
  end
35
26
  end
@@ -4,15 +4,11 @@ module Rubysmith
4
4
  module Builders
5
5
  module Git
6
6
  # Builds project skeleton initial Git commit message.
7
- class Commit
7
+ class Commit < Abstract
8
8
  include Import[:specification]
9
9
 
10
- def self.call(...) = new(...).call
11
-
12
10
  def initialize(configuration, builder: Builder, **)
13
- super(**)
14
- @configuration = configuration
15
- @builder = builder
11
+ super
16
12
  end
17
13
 
18
14
  def call
@@ -30,8 +26,6 @@ module Rubysmith
30
26
 
31
27
  private
32
28
 
33
- attr_reader :configuration, :builder
34
-
35
29
  def body
36
30
  "Generated with link:#{specification.homepage_url}[#{specification.label}] " \
37
31
  "#{specification.version}."
@@ -6,16 +6,9 @@ module Rubysmith
6
6
  module Builders
7
7
  module Git
8
8
  # Builds Git repository directory and file ignore configuration.
9
- class Ignore
9
+ class Ignore < Abstract
10
10
  using Refinements::Struct
11
11
 
12
- def self.call(...) = new(...).call
13
-
14
- def initialize configuration, builder: Builder
15
- @configuration = configuration
16
- @builder = builder
17
- end
18
-
19
12
  def call
20
13
  return configuration unless configuration.build_git
21
14
 
@@ -25,10 +18,6 @@ module Rubysmith
25
18
 
26
19
  configuration
27
20
  end
28
-
29
- private
30
-
31
- attr_reader :configuration, :builder
32
21
  end
33
22
  end
34
23
  end
@@ -6,26 +6,15 @@ module Rubysmith
6
6
  module Builders
7
7
  module Git
8
8
  # Initializes project skeleton with Git Safe support.
9
- class Safe
9
+ class Safe < Abstract
10
10
  using Refinements::Struct
11
11
 
12
- def self.call(...) = new(...).call
13
-
14
- def initialize configuration, builder: Builder
15
- @configuration = configuration
16
- @builder = builder
17
- end
18
-
19
12
  def call
20
13
  return configuration unless configuration.build_git
21
14
 
22
15
  builder.call(configuration.merge(template_path: "%project_name%/.git/safe")).make_path
23
16
  configuration
24
17
  end
25
-
26
- private
27
-
28
- attr_reader :configuration, :builder
29
18
  end
30
19
  end
31
20
  end
@@ -4,24 +4,13 @@ module Rubysmith
4
4
  module Builders
5
5
  module Git
6
6
  # Initializes project skeleton as a Git repository.
7
- class Setup
8
- def self.call(...) = new(...).call
9
-
10
- def initialize configuration, builder: Builder
11
- @configuration = configuration
12
- @builder = builder
13
- end
14
-
7
+ class Setup < Abstract
15
8
  def call
16
9
  return configuration unless configuration.build_git
17
10
 
18
11
  builder.call(configuration).run("git init", chdir: configuration.project_name)
19
12
  configuration
20
13
  end
21
-
22
- private
23
-
24
- attr_reader :configuration, :builder
25
14
  end
26
15
  end
27
16
  end
@@ -5,16 +5,9 @@ require "refinements/struct"
5
5
  module Rubysmith
6
6
  module Builders
7
7
  # Builds project skeleton GitHub templates.
8
- class GitHub
8
+ class GitHub < Abstract
9
9
  using Refinements::Struct
10
10
 
11
- def self.call(...) = new(...).call
12
-
13
- def initialize configuration, builder: Builder
14
- @configuration = configuration
15
- @builder = builder
16
- end
17
-
18
11
  def call
19
12
  render_funding
20
13
 
@@ -27,8 +20,6 @@ module Rubysmith
27
20
 
28
21
  private
29
22
 
30
- attr_reader :configuration, :builder
31
-
32
23
  def render_funding
33
24
  return unless configuration.build_funding
34
25
 
@@ -5,16 +5,9 @@ require "refinements/struct"
5
5
  module Rubysmith
6
6
  module Builders
7
7
  # Builds project skeleton GitHub CI template.
8
- class GitHubCI
8
+ class GitHubCI < Abstract
9
9
  using Refinements::Struct
10
10
 
11
- def self.call(...) = new(...).call
12
-
13
- def initialize configuration, builder: Builder
14
- @configuration = configuration
15
- @builder = builder
16
- end
17
-
18
11
  def call
19
12
  return configuration unless configuration.build_git_hub_ci
20
13
 
@@ -24,8 +17,6 @@ module Rubysmith
24
17
 
25
18
  private
26
19
 
27
- attr_reader :configuration, :builder
28
-
29
20
  def configuration_with_template
30
21
  configuration.merge template_path: "%project_name%/.github/workflows/ci.yml.erb"
31
22
  end
@@ -5,16 +5,9 @@ require "refinements/struct"
5
5
  module Rubysmith
6
6
  module Builders
7
7
  # Builds project skeleton Guard support for a red, green, refactor loop.
8
- class Guard
8
+ class Guard < Abstract
9
9
  using Refinements::Struct
10
10
 
11
- def self.call(...) = new(...).call
12
-
13
- def initialize configuration, builder: Builder
14
- @configuration = configuration
15
- @builder = builder
16
- end
17
-
18
11
  def call
19
12
  return configuration unless configuration.build_guard
20
13
 
@@ -25,10 +18,6 @@ module Rubysmith
25
18
  builder.call(configuration.merge(template_path: "%project_name%/Guardfile.erb")).render
26
19
  configuration
27
20
  end
28
-
29
- private
30
-
31
- attr_reader :configuration, :builder
32
21
  end
33
22
  end
34
23
  end
@@ -6,24 +6,13 @@ require "refinements/struct"
6
6
  module Rubysmith
7
7
  module Builders
8
8
  # Initializes building of project by checking for existence first.
9
- class Init
9
+ class Init < Abstract
10
10
  using Refinements::Struct
11
11
 
12
- def self.call(...) = new(...).call
13
-
14
- def initialize configuration, builder: Builder
15
- @configuration = configuration
16
- @builder = builder
17
- end
18
-
19
12
  def call
20
13
  builder.call(configuration.merge(template_path: "%project_name%")).check
21
14
  configuration
22
15
  end
23
-
24
- private
25
-
26
- attr_reader :configuration, :builder
27
16
  end
28
17
  end
29
18
  end
@@ -5,16 +5,9 @@ require "refinements/struct"
5
5
  module Rubysmith
6
6
  module Builders
7
7
  # Builds project skeleton Rake support.
8
- class Rake
8
+ class Rake < Abstract
9
9
  using Refinements::Struct
10
10
 
11
- def self.call(...) = new(...).call
12
-
13
- def initialize configuration, builder: Builder
14
- @configuration = configuration
15
- @builder = builder
16
- end
17
-
18
11
  def call
19
12
  return configuration unless configuration.build_rake
20
13
 
@@ -25,8 +18,6 @@ module Rubysmith
25
18
 
26
19
  private
27
20
 
28
- attr_reader :configuration, :builder
29
-
30
21
  def add_binstub
31
22
  builder.call(configuration.merge(template_path: "%project_name%/bin/rake.erb"))
32
23
  .render
@@ -5,26 +5,15 @@ require "refinements/struct"
5
5
  module Rubysmith
6
6
  module Builders
7
7
  # Builds project skeleton Reek code quality support.
8
- class Reek
8
+ class Reek < Abstract
9
9
  using Refinements::Struct
10
10
 
11
- def self.call(...) = new(...).call
12
-
13
- def initialize configuration, builder: Builder
14
- @configuration = configuration
15
- @builder = builder
16
- end
17
-
18
11
  def call
19
12
  return configuration unless configuration.build_reek
20
13
 
21
14
  builder.call(configuration.merge(template_path: "%project_name%/.reek.yml.erb")).render
22
15
  configuration
23
16
  end
24
-
25
- private
26
-
27
- attr_reader :configuration, :builder
28
17
  end
29
18
  end
30
19
  end
@@ -6,16 +6,9 @@ module Rubysmith
6
6
  module Builders
7
7
  module RSpec
8
8
  # Builds RSpec binstub for project skeleton.
9
- class Binstub
9
+ class Binstub < Abstract
10
10
  using Refinements::Struct
11
11
 
12
- def self.call(...) = new(...).call
13
-
14
- def initialize configuration, builder: Builder
15
- @configuration = configuration
16
- @builder = builder
17
- end
18
-
19
12
  def call
20
13
  return configuration unless configuration.build_rspec
21
14
 
@@ -25,10 +18,6 @@ module Rubysmith
25
18
 
26
19
  configuration
27
20
  end
28
-
29
- private
30
-
31
- attr_reader :configuration, :builder
32
21
  end
33
22
  end
34
23
  end