pragmater 13.0.0 → 13.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b8bbafa69b9ca2657b65492b451e9117b45f9ccb997d7a2eee400ca545a470d
4
- data.tar.gz: 46979ac45da1860b2153bd1fcb0b60861bd0ed1ff4280d087b878ec2bdfe1ff1
3
+ metadata.gz: 2a2141267b56318fefa1f1c9df22663a27305e879c08496218ed629e74c4fd36
4
+ data.tar.gz: 0ba295ecf0788af559f0a89ad51ea67860902d52a4b35972f953147b8f725436
5
5
  SHA512:
6
- metadata.gz: f43c0b2fe3751f48ab99d9f2ee9d21b81feeb1992bef7f692d3efe91dc50181c80fa2c9563fdaed7ad89e30608330a35f3bb1d6f682245c52385283e7772d7ad
7
- data.tar.gz: 19996ab2e495ff39396f5e45c8bed0caad1799d40a6a2f56a91ccb4af73d89d0725a441234065872570568d899cfdafd69420f88dbc33d1485abe98afbca745b
6
+ metadata.gz: c62734fd222f3dc13d53c1e772feb9f22e6ad18bfa4975e4f32b20dfac4997a78af8ce3af9c4a2c2ad7f94ad2863538c08f596245f551dde1c0afef830221298
7
+ data.tar.gz: bceb8023e210ff05687af9be5cb22f32fa770eccd2eff12c04003d9d41b3c56cf278e10471fee488b00dd52f7e30bcb46b3ae5dfe0d47ccce87efec00e463ce3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "refinements/structs"
4
3
  require "sod"
5
4
 
6
5
  module Pragmater
@@ -8,9 +7,7 @@ module Pragmater
8
7
  module Actions
9
8
  # Stores pragma comments.
10
9
  class Comment < Sod::Action
11
- include Import[:inputs]
12
-
13
- using Refinements::Structs
10
+ include Import[:input]
14
11
 
15
12
  description "Set pragma comments."
16
13
 
@@ -18,7 +15,7 @@ module Pragmater
18
15
 
19
16
  default { Container[:configuration].patterns }
20
17
 
21
- def call(comments = default) = inputs.merge! comments: Array(comments)
18
+ def call(comments = nil) = input.comments = Array(comments || default)
22
19
  end
23
20
  end
24
21
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "refinements/structs"
4
3
  require "sod"
5
4
 
6
5
  module Pragmater
@@ -8,9 +7,7 @@ module Pragmater
8
7
  module Actions
9
8
  # Stores file patterns.
10
9
  class Pattern < Sod::Action
11
- include Import[:inputs]
12
-
13
- using Refinements::Structs
10
+ include Import[:input]
14
11
 
15
12
  description "Set file patterns."
16
13
 
@@ -18,7 +15,7 @@ module Pragmater
18
15
 
19
16
  default { Container[:configuration].patterns }
20
17
 
21
- def call(patterns = default) = inputs.merge! patterns: Array(patterns)
18
+ def call(patterns = nil) = input.patterns = Array(patterns || default)
22
19
  end
23
20
  end
24
21
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "refinements/structs"
4
3
  require "sod"
5
4
 
6
5
  module Pragmater
@@ -8,9 +7,7 @@ module Pragmater
8
7
  module Actions
9
8
  # Stores root path.
10
9
  class Root < Sod::Action
11
- include Import[:inputs]
12
-
13
- using Refinements::Structs
10
+ include Import[:input]
14
11
 
15
12
  description "Set root directory."
16
13
 
@@ -18,7 +15,7 @@ module Pragmater
18
15
 
19
16
  default { Container[:configuration].root_dir }
20
17
 
21
- def call(path = default) = inputs.merge! root_dir: Pathname(path)
18
+ def call(path = nil) = input.root_dir = Pathname(path || default)
22
19
  end
23
20
  end
24
21
  end
@@ -7,7 +7,7 @@ module Pragmater
7
7
  module Commands
8
8
  # Inserts pragmas.
9
9
  class Insert < Sod::Command
10
- include Import[:inputs, :kernel]
10
+ include Import[:input, :kernel]
11
11
 
12
12
  handle "insert"
13
13
 
@@ -22,7 +22,7 @@ module Pragmater
22
22
  @handler = handler
23
23
  end
24
24
 
25
- def call = handler.call(inputs) { |path| kernel.puts path }
25
+ def call = handler.call(input) { |path| kernel.puts path }
26
26
 
27
27
  private
28
28
 
@@ -7,7 +7,7 @@ module Pragmater
7
7
  module Commands
8
8
  # Removes pragmas.
9
9
  class Remove < Sod::Command
10
- include Import[:inputs, :kernel]
10
+ include Import[:input, :kernel]
11
11
 
12
12
  handle "remove"
13
13
 
@@ -22,7 +22,7 @@ module Pragmater
22
22
  @handler = handler
23
23
  end
24
24
 
25
- def call = handler.call(inputs) { |path| kernel.puts path }
25
+ def call = handler.call(input) { |path| kernel.puts path }
26
26
 
27
27
  private
28
28
 
@@ -11,7 +11,6 @@ module Pragmater
11
11
  module Container
12
12
  extend Dry::Container::Mixin
13
13
 
14
- # :nocov:
15
14
  register :configuration do
16
15
  self[:defaults].add_loader(Etcher::Loaders::YAML.new(self[:xdg_config].active))
17
16
  .then { |registry| Etcher.call registry }
@@ -22,7 +21,7 @@ module Pragmater
22
21
  .add_loader(Etcher::Loaders::YAML.new(self[:defaults_path]))
23
22
  end
24
23
 
25
- register(:inputs, memoize: true) { self[:configuration].dup }
24
+ register(:input, memoize: true) { self[:configuration].dup }
26
25
  register(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
27
26
  register(:xdg_config) { Runcom::Config.new "pragmater/configuration.yml" }
28
27
  register(:specification) { Spek::Loader.call "#{__dir__}/../../pragmater.gemspec" }
data/pragmater.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "pragmater"
5
- spec.version = "13.0.0"
5
+ spec.version = "13.0.2"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://alchemists.io/projects/pragmater"
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pragmater
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.0.0
4
+ version: 13.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -35,7 +35,7 @@ cert_chain:
35
35
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
36
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
37
  -----END CERTIFICATE-----
38
- date: 2023-06-16 00:00:00.000000000 Z
38
+ date: 2023-06-22 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
metadata.gz.sig CHANGED
Binary file