rubysmith 1.1.0 → 1.1.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: de17a0e1a14656faf3c41d6eb187aaa58acd051e1a320b6e8e42c759c8cfc3e8
4
- data.tar.gz: bee0b69eb4affb36042197ac9b7dc0d138b847a229bce03e1a6ac5e53c608192
3
+ metadata.gz: e03056700b4b9b6911da4c481884b6c19aee121d9154e77d92537fa13544401c
4
+ data.tar.gz: 8e8a4cd094dcd564e88fe3e989afeeb65dd8f4a68bffada57a7a6199d4fb6286
5
5
  SHA512:
6
- metadata.gz: 1a548b6f39715b29606ecc3bfe7a9a211b8b5f43c8adf86f68956e4d35cbf678062178106d1932f78a1173a64482b6b0e83962e923700723f18889e082ac9d13
7
- data.tar.gz: aeea9f7e1e4e9df57f8c118f5c931cde45a071d4c261d6632e03def688b6aba4d9e408c92a4dd68a875d55b99f39928a000b76706d27fa92fa4dc372b3682941
6
+ metadata.gz: 3aff89581481a9b5930a0fc08ed35e7f0061349e1f5db603a5e055475f52d000c5c61b5888baacacdc4f2224e011ea9fa2141a33855c51fed97521803bf3e002
7
+ data.tar.gz: 68006a628f491364cc36ae28e6ac233f37389b8a17bcf0caf3c0a2c639e2db47fc713dadeec2ea75cae68a8df96dc2fd2725fdcd47561dc20ceeb82f1c04cad4
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,16 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "milestoner"
4
+ require "refinements/structs"
4
5
 
5
6
  module Rubysmith
6
7
  module Extensions
7
8
  # Ensures project can be published (tagged) in a reliable and consistent fashion.
8
9
  class Milestoner
10
+ using Refinements::Structs
11
+
9
12
  def self.call(...) = new(...).call
10
13
 
11
14
  def initialize configuration,
12
15
  client: ::Milestoner::Tags::Publisher.new,
13
- content: ::Milestoner::Configuration::Content
16
+ content: ::Milestoner::Configuration::Content.new
14
17
  @configuration = configuration
15
18
  @client = client
16
19
  @content = content
@@ -23,12 +26,11 @@ module Rubysmith
23
26
  attr_reader :configuration, :client, :content
24
27
 
25
28
  def settings
26
- content[
27
- documentation_format: configuration.extensions_milestoner_documentation_format,
28
- prefixes: configuration.extensions_milestoner_prefixes,
29
- sign: configuration.extensions_milestoner_sign,
30
- version: configuration.project_version
31
- ]
29
+ content.transmute configuration,
30
+ documentation_format: :extensions_milestoner_documentation_format,
31
+ prefixes: :extensions_milestoner_prefixes,
32
+ sign: :extensions_milestoner_sign,
33
+ version: :project_version
32
34
  end
33
35
  end
34
36
  end
@@ -1,16 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "pragmater"
4
+ require "refinements/structs"
4
5
 
5
6
  module Rubysmith
6
7
  module Extensions
7
8
  # Ensures project skeleton has pragmas.
8
9
  class Pragmater
10
+ using Refinements::Structs
11
+
9
12
  def self.call(...) = new(...).call
10
13
 
11
14
  def initialize configuration,
12
15
  client: ::Pragmater::Runner.new,
13
- content: ::Pragmater::Configuration::Content
16
+ content: ::Pragmater::Configuration::Content.new
14
17
  @configuration = configuration
15
18
  @client = client
16
19
  @content = content
@@ -23,12 +26,10 @@ module Rubysmith
23
26
  attr_reader :configuration, :client, :content
24
27
 
25
28
  def settings
26
- content[
27
- action_insert: true,
28
- comments: configuration.extensions_pragmater_comments,
29
- includes: configuration.extensions_pragmater_includes,
30
- root_dir: configuration.project_root
31
- ]
29
+ content.merge(action_insert: true, root_dir: configuration.project_root)
30
+ .transmute! configuration,
31
+ comments: :extensions_pragmater_comments,
32
+ includes: :extensions_pragmater_includes
32
33
  end
33
34
  end
34
35
  end
@@ -1,16 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "tocer"
4
+ require "refinements/structs"
4
5
 
5
6
  module Rubysmith
6
7
  module Extensions
7
8
  # Ensures project skeleton documentation has table of contents.
8
9
  class Tocer
10
+ using Refinements::Structs
11
+
9
12
  def self.call(...) = new(...).call
10
13
 
11
14
  def initialize configuration,
12
15
  client: ::Tocer::Runner.new,
13
- content: ::Tocer::Configuration::Content
16
+ content: ::Tocer::Configuration::Content.new
14
17
  @configuration = configuration
15
18
  @client = client
16
19
  @content = content
@@ -26,11 +29,10 @@ module Rubysmith
26
29
  attr_reader :configuration, :client, :content
27
30
 
28
31
  def settings
29
- content[
30
- includes: configuration.extensions_tocer_includes,
31
- label: configuration.extensions_tocer_label,
32
- root_dir: configuration.project_root
33
- ]
32
+ content.merge(root_dir: configuration.project_root)
33
+ .transmute! configuration,
34
+ includes: :extensions_tocer_includes,
35
+ label: :extensions_tocer_label
34
36
  end
35
37
  end
36
38
  end
@@ -4,7 +4,7 @@ module Rubysmith
4
4
  module Identity
5
5
  NAME = "rubysmith"
6
6
  LABEL = "Rubysmith"
7
- VERSION = "1.1.0"
7
+ VERSION = "1.1.1"
8
8
  VERSION_LABEL = "#{LABEL} #{VERSION}".freeze
9
9
  SUMMARY = "A command line interface for smithing Ruby projects."
10
10
  end
@@ -21,7 +21,15 @@ module Rubysmith
21
21
  attr_accessor :buffer
22
22
  attr_reader :configuration, :scope, :client
23
23
 
24
- def namespace = self.buffer = block_given? ? scope.call(yield) : buffer + scope.call
24
+ def namespace
25
+ source = buffer.dup
26
+
27
+ self.buffer = source + if block_given?
28
+ scope.call(yield.sub(source, ""))
29
+ else
30
+ scope.call
31
+ end
32
+ end
25
33
  end
26
34
  end
27
35
  end
@@ -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.0"
6
+ gem "refinements", "~> 9.1"
7
7
  <% end %>
8
8
  <% if configuration.build_zeitwerk %>
9
9
  gem "zeitwerk", "~> 2.5"
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.1.0
4
+ version: 1.1.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-09 00:00:00.000000000 Z
31
+ date: 2022-01-17 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.0'
109
+ version: '9.1'
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.0'
116
+ version: '9.1'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: rubocop
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -281,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
281
281
  - !ruby/object:Gem::Version
282
282
  version: '0'
283
283
  requirements: []
284
- rubygems_version: 3.3.4
284
+ rubygems_version: 3.3.5
285
285
  signing_key:
286
286
  specification_version: 4
287
287
  summary: A command line interface for smithing Ruby projects.
metadata.gz.sig CHANGED
Binary file