pragmater 13.0.0 → 13.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/pragmater/cli/actions/comment.rb +2 -2
- data/lib/pragmater/cli/actions/pattern.rb +2 -2
- data/lib/pragmater/cli/actions/root.rb +2 -2
- data/lib/pragmater/cli/commands/insert.rb +2 -2
- data/lib/pragmater/cli/commands/remove.rb +2 -2
- data/lib/pragmater/container.rb +1 -2
- data/pragmater.gemspec +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7cb1c836cd12999e4c161725fad84b652d7a5e51baa78ad76892aaabc82a22f
|
4
|
+
data.tar.gz: ac5cb53b0f755fa19da979698c579f189e0dd5657f7f33418b67c16a21962306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77be5f66c03c514c1e2ee8dbd625684aff8953b6d7b7ad022a4ecb6483408a20a7ef9775b723cc7857a027470e1fd357e9c6053a5044a4c01bae5cce9e093f57
|
7
|
+
data.tar.gz: 28f994c150ac3b5d58869bb5f4f20f776a6f32e6a4b4c5250b9ee674ccd8c67a5e478054045ec73ae0765df0ea67eadbecbcb00313a8aa62e489c31ed5dbf748
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -8,7 +8,7 @@ module Pragmater
|
|
8
8
|
module Actions
|
9
9
|
# Stores pragma comments.
|
10
10
|
class Comment < Sod::Action
|
11
|
-
include Import[:
|
11
|
+
include Import[:input]
|
12
12
|
|
13
13
|
using Refinements::Structs
|
14
14
|
|
@@ -18,7 +18,7 @@ module Pragmater
|
|
18
18
|
|
19
19
|
default { Container[:configuration].patterns }
|
20
20
|
|
21
|
-
def call(comments = default) =
|
21
|
+
def call(comments = default) = input.merge! comments: Array(comments)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -8,7 +8,7 @@ module Pragmater
|
|
8
8
|
module Actions
|
9
9
|
# Stores file patterns.
|
10
10
|
class Pattern < Sod::Action
|
11
|
-
include Import[:
|
11
|
+
include Import[:input]
|
12
12
|
|
13
13
|
using Refinements::Structs
|
14
14
|
|
@@ -18,7 +18,7 @@ module Pragmater
|
|
18
18
|
|
19
19
|
default { Container[:configuration].patterns }
|
20
20
|
|
21
|
-
def call(patterns = default) =
|
21
|
+
def call(patterns = default) = input.merge! patterns: Array(patterns)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -8,7 +8,7 @@ module Pragmater
|
|
8
8
|
module Actions
|
9
9
|
# Stores root path.
|
10
10
|
class Root < Sod::Action
|
11
|
-
include Import[:
|
11
|
+
include Import[:input]
|
12
12
|
|
13
13
|
using Refinements::Structs
|
14
14
|
|
@@ -18,7 +18,7 @@ module Pragmater
|
|
18
18
|
|
19
19
|
default { Container[:configuration].root_dir }
|
20
20
|
|
21
|
-
def call(path = default) =
|
21
|
+
def call(path = default) = input.merge! root_dir: Pathname(path)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -7,7 +7,7 @@ module Pragmater
|
|
7
7
|
module Commands
|
8
8
|
# Inserts pragmas.
|
9
9
|
class Insert < Sod::Command
|
10
|
-
include Import[:
|
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(
|
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[:
|
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(
|
25
|
+
def call = handler.call(input) { |path| kernel.puts path }
|
26
26
|
|
27
27
|
private
|
28
28
|
|
data/lib/pragmater/container.rb
CHANGED
@@ -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(:
|
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
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.
|
4
|
+
version: 13.0.1
|
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-
|
38
|
+
date: 2023-06-19 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: cogger
|
metadata.gz.sig
CHANGED
Binary file
|