rubysmith 5.9.0 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +3 -4
  3. data/README.adoc +1 -39
  4. data/lib/rubysmith/builder.rb +2 -2
  5. data/lib/rubysmith/builders/bundler.rb +3 -3
  6. data/lib/rubysmith/builders/caliber.rb +2 -2
  7. data/lib/rubysmith/builders/circle_ci.rb +2 -2
  8. data/lib/rubysmith/builders/console.rb +2 -2
  9. data/lib/rubysmith/builders/core.rb +4 -4
  10. data/lib/rubysmith/builders/documentation/citation.rb +2 -2
  11. data/lib/rubysmith/builders/documentation/license.rb +2 -2
  12. data/lib/rubysmith/builders/documentation/readme.rb +2 -2
  13. data/lib/rubysmith/builders/documentation/version.rb +2 -2
  14. data/lib/rubysmith/builders/git/ignore.rb +2 -2
  15. data/lib/rubysmith/builders/git/safe.rb +2 -2
  16. data/lib/rubysmith/builders/git_hub.rb +2 -2
  17. data/lib/rubysmith/builders/git_hub_ci.rb +2 -2
  18. data/lib/rubysmith/builders/guard.rb +2 -2
  19. data/lib/rubysmith/builders/init.rb +2 -2
  20. data/lib/rubysmith/builders/rake.rb +2 -2
  21. data/lib/rubysmith/builders/reek.rb +2 -2
  22. data/lib/rubysmith/builders/rspec/binstub.rb +2 -2
  23. data/lib/rubysmith/builders/rspec/context.rb +2 -2
  24. data/lib/rubysmith/builders/rspec/helper.rb +2 -2
  25. data/lib/rubysmith/builders/setup.rb +2 -2
  26. data/lib/rubysmith/builders/version.rb +2 -2
  27. data/lib/rubysmith/cli/actions/maximum.rb +2 -2
  28. data/lib/rubysmith/cli/actions/minimum.rb +2 -2
  29. data/lib/rubysmith/cli/actions/publish.rb +8 -5
  30. data/lib/rubysmith/cli/commands/build.rb +1 -2
  31. data/lib/rubysmith/configuration/contract.rb +0 -7
  32. data/lib/rubysmith/configuration/defaults.yml +0 -30
  33. data/lib/rubysmith/configuration/model.rb +6 -13
  34. data/lib/rubysmith/configuration/transformers/template_root.rb +2 -2
  35. data/lib/rubysmith/extensions/bundler.rb +4 -4
  36. data/lib/rubysmith/extensions/milestoner.rb +3 -16
  37. data/lib/rubysmith/extensions/pragmater.rb +3 -16
  38. data/lib/rubysmith/extensions/rubocop.rb +2 -2
  39. data/lib/rubysmith/extensions/tocer.rb +3 -16
  40. data/lib/rubysmith/pathway.rb +2 -2
  41. data/lib/rubysmith/renderers/namespace.rb +2 -2
  42. data/lib/rubysmith/templates/%project_name%/.circleci/config.yml.erb +1 -1
  43. data/lib/rubysmith/templates/%project_name%/.gitignore.erb +0 -6
  44. data/lib/rubysmith/templates/%project_name%/Gemfile.erb +8 -14
  45. data/lib/rubysmith/templates/%project_name%/Rakefile.erb +2 -11
  46. data/lib/rubysmith/templates/%project_name%/spec/spec_helper.rb.erb +1 -1
  47. data/lib/rubysmith/templates/%project_name%/spec/support/shared_contexts/temp_dir.rb.erb +1 -1
  48. data/rubysmith.gemspec +15 -15
  49. data.tar.gz.sig +0 -0
  50. metadata +30 -34
  51. metadata.gz.sig +0 -0
  52. data/lib/rubysmith/cli/actions/yard.rb +0 -22
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "pathname"
4
- require "refinements/arrays"
5
- require "refinements/strings"
6
- require "refinements/structs"
4
+ require "refinements/array"
5
+ require "refinements/string"
6
+ require "refinements/struct"
7
7
 
8
8
  module Rubysmith
9
9
  module Configuration
@@ -41,18 +41,11 @@ module Rubysmith
41
41
  :build_setup,
42
42
  :build_simple_cov,
43
43
  :build_versions,
44
- :build_yard,
45
44
  :build_zeitwerk,
46
45
  :citation_affiliation,
47
46
  :citation_message,
48
47
  :citation_orcid,
49
48
  :documentation_format,
50
- :extensions_milestoner_documentation_format,
51
- :extensions_milestoner_prefixes,
52
- :extensions_pragmater_comments,
53
- :extensions_pragmater_patterns,
54
- :extensions_tocer_patterns,
55
- :extensions_tocer_label,
56
49
  :git_hub_user,
57
50
  :license_label,
58
51
  :license_name,
@@ -75,9 +68,9 @@ module Rubysmith
75
68
  :template_path,
76
69
  :template_roots
77
70
  ) do
78
- using Refinements::Arrays
79
- using Refinements::Strings
80
- using Refinements::Structs
71
+ using Refinements::Array
72
+ using Refinements::String
73
+ using Refinements::Struct
81
74
 
82
75
  def maximize = update_build_options true
83
76
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "dry/monads"
4
- require "refinements/arrays"
4
+ require "refinements/array"
5
5
 
6
6
  module Rubysmith
7
7
  module Configuration
@@ -10,7 +10,7 @@ module Rubysmith
10
10
  class TemplateRoot
11
11
  include Dry::Monads[:result]
12
12
 
13
- using Refinements::Arrays
13
+ using Refinements::Array
14
14
 
15
15
  def initialize key = :template_roots, default: Pathname(__dir__).join("../../templates")
16
16
  @key = key
@@ -2,15 +2,15 @@
2
2
 
3
3
  require "bundler"
4
4
  require "bundler/cli"
5
- require "refinements/ios"
6
- require "refinements/pathnames"
5
+ require "refinements/io"
6
+ require "refinements/pathname"
7
7
 
8
8
  module Rubysmith
9
9
  module Extensions
10
10
  # Ensures gem dependencies are installed.
11
11
  class Bundler
12
- using Refinements::IOs
13
- using Refinements::Pathnames
12
+ using Refinements::IO
13
+ using Refinements::Pathname
14
14
 
15
15
  def self.call(...) = new(...).call
16
16
 
@@ -1,36 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "milestoner"
4
- require "refinements/structs"
5
4
 
6
5
  module Rubysmith
7
6
  module Extensions
8
7
  # Ensures project can be published (tagged) in a reliable and consistent fashion.
9
8
  class Milestoner
10
- using Refinements::Structs
11
-
12
9
  def self.call(...) = new(...).call
13
10
 
14
- def initialize configuration,
15
- client: ::Milestoner::Tags::Publisher.new,
16
- content: ::Milestoner::Configuration::Model.new
11
+ def initialize configuration, client: ::Milestoner::Tags::Publisher.new
17
12
  @configuration = configuration
18
13
  @client = client
19
- @content = content
20
14
  end
21
15
 
22
- def call = client.call(settings) && configuration
16
+ def call = client.call(configuration.project_version) && configuration
23
17
 
24
18
  private
25
19
 
26
- attr_reader :configuration, :client, :content
27
-
28
- def settings
29
- content.transmute configuration,
30
- documentation_format: :extensions_milestoner_documentation_format,
31
- prefixes: :extensions_milestoner_prefixes,
32
- version: :project_version
33
- end
20
+ attr_reader :configuration, :client
34
21
  end
35
22
  end
36
23
  end
@@ -1,36 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "pragmater"
4
- require "refinements/structs"
5
4
 
6
5
  module Rubysmith
7
6
  module Extensions
8
7
  # Ensures project skeleton has pragmas.
9
8
  class Pragmater
10
- using Refinements::Structs
11
-
12
9
  def self.call(...) = new(...).call
13
10
 
14
- def initialize configuration,
15
- client: ::Pragmater::Inserter.new,
16
- record: ::Pragmater::Configuration::Model.new
11
+ def initialize configuration, client: ::Pragmater::Inserter.new
17
12
  @configuration = configuration
18
13
  @client = client
19
- @record = record
20
14
  end
21
15
 
22
- def call = client.call(settings) && configuration
16
+ def call = client.call && configuration
23
17
 
24
18
  private
25
19
 
26
- attr_reader :configuration, :client, :record
27
-
28
- def settings
29
- record.merge(root_dir: configuration.project_root)
30
- .transmute! configuration,
31
- comments: :extensions_pragmater_comments,
32
- patterns: :extensions_pragmater_patterns
33
- end
20
+ attr_reader :configuration, :client
34
21
  end
35
22
  end
36
23
  end
@@ -1,13 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "refinements/ios"
3
+ require "refinements/io"
4
4
  require "rubocop"
5
5
 
6
6
  module Rubysmith
7
7
  module Extensions
8
8
  # Ensures project skeleton adheres to style guide.
9
9
  class Rubocop
10
- using Refinements::IOs
10
+ using Refinements::IO
11
11
 
12
12
  def self.call(...) = new(...).call
13
13
 
@@ -1,39 +1,26 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "refinements/structs"
4
3
  require "tocer"
5
4
 
6
5
  module Rubysmith
7
6
  module Extensions
8
7
  # Ensures project skeleton documentation has table of content.
9
8
  class Tocer
10
- using Refinements::Structs
11
-
12
9
  def self.call(...) = new(...).call
13
10
 
14
- def initialize configuration,
15
- client: ::Tocer::Runner.new,
16
- record: ::Tocer::Configuration::Model.new
11
+ def initialize configuration, client: ::Tocer::Runner.new
17
12
  @configuration = configuration
18
13
  @client = client
19
- @record = record
20
14
  end
21
15
 
22
16
  def call
23
- client.call settings if configuration.build_readme
17
+ client.call ::Tocer::Container[:configuration] if configuration.build_readme
24
18
  configuration
25
19
  end
26
20
 
27
21
  private
28
22
 
29
- attr_reader :configuration, :client, :record
30
-
31
- def settings
32
- record.merge(root_dir: configuration.project_root)
33
- .transmute! configuration,
34
- label: :extensions_tocer_label,
35
- patterns: :extensions_tocer_patterns
36
- end
23
+ attr_reader :configuration, :client
37
24
  end
38
25
  end
39
26
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "refinements/pathnames"
3
+ require "refinements/pathname"
4
4
 
5
5
  module Rubysmith
6
6
  # Represents a pathway which has source start and destination end.
7
7
  Pathway = Struct.new :start_root, :start_path, :end_root, keyword_init: true do
8
- using Refinements::Pathnames
8
+ using Refinements::Pathname
9
9
 
10
10
  # :reek:TooManyStatements
11
11
  def initialize *arguments
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "refinements/strings"
3
+ require "refinements/string"
4
4
 
5
5
  module Rubysmith
6
6
  module Renderers
7
7
  # Renders single or multiple modules with correct, two-space indentation for templates.
8
8
  class Namespace
9
- using Refinements::Strings
9
+ using Refinements::String
10
10
 
11
11
  def initialize namespace, delimiter: "::"
12
12
  @namespace = namespace
@@ -27,7 +27,7 @@ jobs:
27
27
  - vendor/bundle
28
28
 
29
29
  - run:
30
- name: Build
30
+ name: Rake
31
31
  command: bundle exec rake
32
32
 
33
33
  <% if configuration.build_simple_cov %>
@@ -1,8 +1,2 @@
1
1
  .bundle
2
- <% if configuration.build_yard %>
3
- .yardoc
4
- <% end %>
5
- <% if configuration.build_yard %>
6
- doc/yard
7
- <% end %>
8
2
  tmp
@@ -3,21 +3,21 @@ ruby file: ".ruby-version"
3
3
  source "https://rubygems.org"
4
4
 
5
5
  <% if configuration.build_refinements %>
6
- gem "refinements", "~> 11.0"
6
+ gem "refinements", "~> 12.0"
7
7
  <% end %>
8
8
  <% if configuration.build_zeitwerk %>
9
9
  gem "zeitwerk", "~> 2.6"
10
10
  <% end %>
11
11
 
12
- group :code_quality do
12
+ group :quality do
13
13
  <% if configuration.build_caliber %>
14
- gem "caliber", "~> 0.42"
14
+ gem "caliber", "~> 0.47"
15
15
  <% end %>
16
16
  <% if configuration.build_git && configuration.build_git_lint %>
17
- gem "git-lint", "~> 6.0"
17
+ gem "git-lint", "~> 7.0"
18
18
  <% end %>
19
19
  <% if configuration.build_reek %>
20
- gem "reek", "~> 6.1", require: false
20
+ gem "reek", "~> 6.2", require: false
21
21
  <% end %>
22
22
  <% if configuration.build_simple_cov %>
23
23
  gem "simplecov", "~> 0.22", require: false
@@ -25,17 +25,11 @@ group :code_quality do
25
25
  end
26
26
 
27
27
  group :development do
28
- <% if configuration.build_yard && configuration.ascii_doc? %>
29
- gem "asciidoctor", "~> 2.0"
30
- <% end %>
31
28
  <% if configuration.build_rake %>
32
- gem "rake", "~> 13.0"
29
+ gem "rake", "~> 13.1"
33
30
  <% end %>
34
31
  <% if configuration.markdown? %>
35
- gem "tocer", "~> 16.0"
36
- <% end %>
37
- <% if configuration.build_yard %>
38
- gem "yard", "~> 0.9"
32
+ gem "tocer", "~> 17.0"
39
33
  <% end %>
40
34
  end
41
35
 
@@ -50,7 +44,7 @@ end
50
44
 
51
45
  group :tools do
52
46
  <% if configuration.build_amazing_print %>
53
- gem "amazing_print", "~> 1.4"
47
+ gem "amazing_print", "~> 1.5"
54
48
  <% end %>
55
49
  <% if configuration.build_debug %>
56
50
  gem "debug", "~> 1.8"
@@ -12,9 +12,6 @@ require "bundler/setup"
12
12
  <% if configuration.build_caliber %>
13
13
  require "rubocop/rake_task"
14
14
  <% end %>
15
- <% if configuration.build_yard %>
16
- require "yard"
17
- <% end %>
18
15
 
19
16
  <% if configuration.build_git && configuration.build_git_lint %>
20
17
  Git::Lint::Rake::Register.call
@@ -29,13 +26,7 @@ require "bundler/setup"
29
26
  RuboCop::RakeTask.new
30
27
  <% end %>
31
28
 
32
- <% if configuration.build_yard %>
33
- YARD::Rake::YardocTask.new do |task|
34
- task.options = ["--title", "<%= configuration.project_label %>", "--output-dir", "doc/yard"]
35
- end
36
- <% end %>
37
-
38
29
  desc "Run code quality checks"
39
- task code_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 configuration.build_git && configuration.build_git_lint %>git_lint<% end %> <% if configuration.build_reek %>reek<% end %> <% if configuration.build_caliber %>rubocop<% end %>]
40
31
 
41
- task default: %i[code_quality <% if configuration.build_rspec %>spec<% end %>]
32
+ task default: %i[quality <% if configuration.build_rspec %>spec<% end %>]
@@ -21,7 +21,7 @@ require "refinements"
21
21
  <% if configuration.build_refinements %>
22
22
  SPEC_ROOT = Pathname(__dir__).realpath.freeze
23
23
 
24
- using Refinements::Pathnames
24
+ using Refinements::Pathname
25
25
 
26
26
  Pathname.require_tree SPEC_ROOT.join("support/shared_contexts")
27
27
  <% else %>
@@ -1,5 +1,5 @@
1
1
  RSpec.shared_context "with temporary directory" do
2
- <% if configuration.build_refinements %>using Refinements::Pathnames<% end %>
2
+ <% if configuration.build_refinements %>using Refinements::Pathname<% end %>
3
3
 
4
4
  let(:temp_dir) { Bundler.root.join "tmp/rspec" }
5
5
 
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 = "5.9.0"
5
+ spec.version = "6.0.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/rubysmith"
@@ -22,23 +22,23 @@ Gem::Specification.new do |spec|
22
22
  spec.signing_key = Gem.default_key_path
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
- spec.required_ruby_version = [">= 3.2", "<= 3.3"]
26
- spec.add_dependency "cogger", "~> 0.12"
25
+ spec.required_ruby_version = "~> 3.3"
26
+ spec.add_dependency "cogger", "~> 0.15"
27
27
  spec.add_dependency "dry-container", "~> 0.11"
28
28
  spec.add_dependency "dry-monads", "~> 1.6"
29
29
  spec.add_dependency "dry-schema", "~> 1.13"
30
- spec.add_dependency "etcher", "~> 0.2"
31
- spec.add_dependency "gitt", "~> 2.0"
32
- spec.add_dependency "infusible", "~> 2.2"
33
- spec.add_dependency "milestoner", "~> 16.0"
34
- spec.add_dependency "pragmater", "~> 13.0"
35
- spec.add_dependency "refinements", "~> 11.0"
36
- spec.add_dependency "rubocop", "~> 1.55"
37
- spec.add_dependency "runcom", "~> 10.0"
38
- spec.add_dependency "sod", "~> 0.0"
39
- spec.add_dependency "spek", "~> 2.0"
40
- spec.add_dependency "tocer", "~> 16.0"
41
- spec.add_dependency "tone", "~> 0.3"
30
+ spec.add_dependency "etcher", "~> 1.0"
31
+ spec.add_dependency "gitt", "~> 3.0"
32
+ spec.add_dependency "infusible", "~> 3.0"
33
+ spec.add_dependency "milestoner", "~> 17.0"
34
+ spec.add_dependency "pragmater", "~> 14.0"
35
+ spec.add_dependency "refinements", "~> 12.0"
36
+ spec.add_dependency "rubocop", "~> 1.59"
37
+ spec.add_dependency "runcom", "~> 11.0"
38
+ spec.add_dependency "sod", "~> 0.4"
39
+ spec.add_dependency "spek", "~> 3.0"
40
+ spec.add_dependency "tocer", "~> 17.0"
41
+ spec.add_dependency "tone", "~> 1.0"
42
42
  spec.add_dependency "zeitwerk", "~> 2.6"
43
43
 
44
44
  spec.bindir = "exe"
data.tar.gz.sig CHANGED
Binary file