pragmater 12.1.1 → 12.2.0
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/README.adoc +19 -10
- data/lib/pragmater/cli/actions/run.rb +2 -2
- data/lib/pragmater/cli/shell.rb +3 -3
- data/lib/pragmater/container.rb +1 -1
- data/pragmater.gemspec +5 -5
- data.tar.gz.sig +0 -0
- metadata +32 -26
- metadata.gz.sig +0 -0
- data/lib/pragmater/cli/helper.rb +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 882b859ccab89edc6bc3ac8087e2fc01b55eaed5d3e4e1e789a7635fd77bd485
|
4
|
+
data.tar.gz: ee6d15c015fa56a52f7deecdb7ce58cc1561957cdc2f17e39ead1ee67972f74a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0847fdb2ab90ef4911a85a4c294dd00f2990477fadfa3cafac1785a6e92b2dc2e32f91a895b0102c48a542115dea1fee42a96ab96bbddf445e2a579bde70ccbf'
|
7
|
+
data.tar.gz: e1508b6eb3c052277f345d6444b4e6d11372a00a59632816975f6b17fbc3a72fbfa6e6f95f9715a8a1333f689898fa5b469d1a444f8f0d6c8cd9a9002b445529
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -35,7 +35,16 @@ toc::[]
|
|
35
35
|
|
36
36
|
== Setup
|
37
37
|
|
38
|
-
To install, run:
|
38
|
+
To install _with_ security, run:
|
39
|
+
|
40
|
+
[source,bash]
|
41
|
+
----
|
42
|
+
# 💡 Skip this line if you already have the public certificate installed.
|
43
|
+
gem cert --add <(curl --compressed --location https://alchemists.io/gems.pem)
|
44
|
+
gem install pragmater --trust-policy HighSecurity
|
45
|
+
----
|
46
|
+
|
47
|
+
To install _without_ security, run:
|
39
48
|
|
40
49
|
[source,bash]
|
41
50
|
----
|
@@ -77,7 +86,7 @@ directory.
|
|
77
86
|
|
78
87
|
This gem can be configured via a global configuration: `$HOME/.config/pragmater/configuration.yml`
|
79
88
|
|
80
|
-
It can also be configured via link:https://
|
89
|
+
It can also be configured via link:https://alchemists.io/projects/xdg[XDG] environment
|
81
90
|
variables.
|
82
91
|
|
83
92
|
The default configuration is as follows:
|
@@ -279,19 +288,19 @@ To test, run:
|
|
279
288
|
bin/rake
|
280
289
|
----
|
281
290
|
|
282
|
-
== link:https://
|
291
|
+
== link:https://alchemists.io/policies/license[License]
|
283
292
|
|
284
|
-
== link:https://
|
293
|
+
== link:https://alchemists.io/policies/security[Security]
|
285
294
|
|
286
|
-
== link:https://
|
295
|
+
== link:https://alchemists.io/policies/code_of_conduct[Code of Conduct]
|
287
296
|
|
288
|
-
== link:https://
|
297
|
+
== link:https://alchemists.io/policies/contributions[Contributions]
|
289
298
|
|
290
|
-
== link:https://
|
299
|
+
== link:https://alchemists.io/projects/pragmater/versions[Versions]
|
291
300
|
|
292
|
-
== link:https://
|
301
|
+
== link:https://alchemists.io/community[Community]
|
293
302
|
|
294
303
|
== Credits
|
295
304
|
|
296
|
-
* Built with link:https://
|
297
|
-
* Engineered by link:https://
|
305
|
+
* Built with link:https://alchemists.io/projects/gemsmith[Gemsmith].
|
306
|
+
* Engineered by link:https://alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
@@ -5,14 +5,14 @@ module Pragmater
|
|
5
5
|
module Actions
|
6
6
|
# Handles insert or remove actions.
|
7
7
|
class Run
|
8
|
-
include Pragmater::Import[:
|
8
|
+
include Pragmater::Import[:kernel]
|
9
9
|
|
10
10
|
def initialize(runner: Runner.new, **)
|
11
11
|
super(**)
|
12
12
|
@runner = runner
|
13
13
|
end
|
14
14
|
|
15
|
-
def call(configuration) = runner.call(configuration) { |path|
|
15
|
+
def call(configuration) = runner.call(configuration) { |path| kernel.puts path }
|
16
16
|
|
17
17
|
private
|
18
18
|
|
data/lib/pragmater/cli/shell.rb
CHANGED
@@ -6,7 +6,7 @@ module Pragmater
|
|
6
6
|
module CLI
|
7
7
|
# The main Command Line Interface (CLI) object.
|
8
8
|
class Shell
|
9
|
-
include Actions::Import[:config, :
|
9
|
+
include Actions::Import[:config, :kernel, :logger, :run, :specification]
|
10
10
|
|
11
11
|
def initialize(parser: Parser.new, **)
|
12
12
|
super(**)
|
@@ -27,8 +27,8 @@ module Pragmater
|
|
27
27
|
case configuration
|
28
28
|
in action_config: Symbol => action then config.call action
|
29
29
|
in {action_insert: true} | {action_remove: true} then run.call configuration
|
30
|
-
in action_version: true then
|
31
|
-
else
|
30
|
+
in action_version: true then kernel.puts specification.labeled_version
|
31
|
+
else kernel.puts parser.to_s
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
data/lib/pragmater/container.rb
CHANGED
@@ -12,6 +12,6 @@ module Pragmater
|
|
12
12
|
register(:configuration) { Configuration::Loader.call }
|
13
13
|
register(:specification) { Spek::Loader.call "#{__dir__}/../../pragmater.gemspec" }
|
14
14
|
register(:kernel) { Kernel }
|
15
|
-
register(:logger) { Cogger
|
15
|
+
register(:logger) { Cogger.new formatter: :emoji }
|
16
16
|
end
|
17
17
|
end
|
data/pragmater.gemspec
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "pragmater"
|
5
|
-
spec.version = "12.
|
5
|
+
spec.version = "12.2.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
|
-
spec.homepage = "https://
|
8
|
+
spec.homepage = "https://alchemists.io/projects/pragmater"
|
9
9
|
spec.summary = "A command line interface for managing/formatting source file pragma comments."
|
10
10
|
spec.license = "Hippocratic-2.1"
|
11
11
|
|
12
12
|
spec.metadata = {
|
13
13
|
"bug_tracker_uri" => "https://github.com/bkuhlmann/pragmater/issues",
|
14
|
-
"changelog_uri" => "https://
|
15
|
-
"documentation_uri" => "https://
|
14
|
+
"changelog_uri" => "https://alchemists.io/projects/pragmater/versions",
|
15
|
+
"documentation_uri" => "https://alchemists.io/projects/pragmater",
|
16
16
|
"funding_uri" => "https://github.com/sponsors/bkuhlmann",
|
17
17
|
"label" => "Pragmater",
|
18
18
|
"rubygems_mfa_required" => "true",
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
25
|
spec.required_ruby_version = "~> 3.2"
|
26
|
-
spec.add_dependency "cogger", "~> 0.
|
26
|
+
spec.add_dependency "cogger", "~> 0.8"
|
27
27
|
spec.add_dependency "core", "~> 0.1"
|
28
28
|
spec.add_dependency "dry-container", "~> 0.11"
|
29
29
|
spec.add_dependency "infusible", "~> 1.0"
|
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: 12.
|
4
|
+
version: 12.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -10,25 +10,32 @@ bindir: exe
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
13
|
+
MIIEeDCCAuCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMQ8wDQYDVQQDDAZicm9v
|
14
|
+
a2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQBGRYC
|
15
|
+
aW8wHhcNMjMwMzIyMTYxNDQxWhcNMjUwMzIxMTY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MKO2FVijzbDWTsZeZGglS4E+4Jxpau1lU9HhOIcKolv6LeC6UdALTFudY+GLb8Xw
|
31
|
+
REXgaJkjzzhkUSILmEnRwEbY08dVSl7ZAaxVI679vfI2yapLlIwpbBgmQTiTvPr3
|
32
|
+
qyyLUno9flYEOv9fmGHunSrM+gE0/0niGTXa5GgXBXYGS2he4LQGgSBfGp/cTwMU
|
33
|
+
rDKJRcusZ12lNBeDfgqACz/BBJF8FLodgk6rGMRZz7+ZmjjHEmpG5bQpR6Q2BuWL
|
34
|
+
XMtYk/QzaWuhiR7pWjiF8jbdd7RO6or0ohq7iFkokz/5xrtQ/vPzU2RQ3Qc6YaKw
|
35
|
+
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
|
+
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
30
37
|
-----END CERTIFICATE-----
|
31
|
-
date: 2023-
|
38
|
+
date: 2023-04-13 00:00:00.000000000 Z
|
32
39
|
dependencies:
|
33
40
|
- !ruby/object:Gem::Dependency
|
34
41
|
name: cogger
|
@@ -36,14 +43,14 @@ dependencies:
|
|
36
43
|
requirements:
|
37
44
|
- - "~>"
|
38
45
|
- !ruby/object:Gem::Version
|
39
|
-
version: '0.
|
46
|
+
version: '0.8'
|
40
47
|
type: :runtime
|
41
48
|
prerelease: false
|
42
49
|
version_requirements: !ruby/object:Gem::Requirement
|
43
50
|
requirements:
|
44
51
|
- - "~>"
|
45
52
|
- !ruby/object:Gem::Version
|
46
|
-
version: '0.
|
53
|
+
version: '0.8'
|
47
54
|
- !ruby/object:Gem::Dependency
|
48
55
|
name: core
|
49
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,7 +167,6 @@ files:
|
|
160
167
|
- lib/pragmater/cli/actions/container.rb
|
161
168
|
- lib/pragmater/cli/actions/import.rb
|
162
169
|
- lib/pragmater/cli/actions/run.rb
|
163
|
-
- lib/pragmater/cli/helper.rb
|
164
170
|
- lib/pragmater/cli/parser.rb
|
165
171
|
- lib/pragmater/cli/parsers/core.rb
|
166
172
|
- lib/pragmater/cli/parsers/flag.rb
|
@@ -180,13 +186,13 @@ files:
|
|
180
186
|
- lib/pragmater/processors/remover.rb
|
181
187
|
- lib/pragmater/runner.rb
|
182
188
|
- pragmater.gemspec
|
183
|
-
homepage: https://
|
189
|
+
homepage: https://alchemists.io/projects/pragmater
|
184
190
|
licenses:
|
185
191
|
- Hippocratic-2.1
|
186
192
|
metadata:
|
187
193
|
bug_tracker_uri: https://github.com/bkuhlmann/pragmater/issues
|
188
|
-
changelog_uri: https://
|
189
|
-
documentation_uri: https://
|
194
|
+
changelog_uri: https://alchemists.io/projects/pragmater/versions
|
195
|
+
documentation_uri: https://alchemists.io/projects/pragmater
|
190
196
|
funding_uri: https://github.com/sponsors/bkuhlmann
|
191
197
|
label: Pragmater
|
192
198
|
rubygems_mfa_required: 'true'
|
@@ -206,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
212
|
- !ruby/object:Gem::Version
|
207
213
|
version: '0'
|
208
214
|
requirements: []
|
209
|
-
rubygems_version: 3.4.
|
215
|
+
rubygems_version: 3.4.12
|
210
216
|
signing_key:
|
211
217
|
specification_version: 4
|
212
218
|
summary: A command line interface for managing/formatting source file pragma comments.
|
metadata.gz.sig
CHANGED
Binary file
|
data/lib/pragmater/cli/helper.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "forwardable"
|
4
|
-
require "logger"
|
5
|
-
require "open3"
|
6
|
-
|
7
|
-
module Pragmater
|
8
|
-
module CLI
|
9
|
-
# A simple delegator for common shell functionality.
|
10
|
-
class Helper
|
11
|
-
extend Forwardable
|
12
|
-
|
13
|
-
LOGGER = Logger.new STDOUT,
|
14
|
-
formatter: (
|
15
|
-
proc do |_severity, _datetime, _program_name, message|
|
16
|
-
"#{message}\n"
|
17
|
-
end
|
18
|
-
)
|
19
|
-
|
20
|
-
delegate %i[info error fatal debug unknown] => :logger
|
21
|
-
|
22
|
-
def initialize commander: Open3, logger: LOGGER
|
23
|
-
@commander = commander
|
24
|
-
@logger = logger
|
25
|
-
end
|
26
|
-
|
27
|
-
def run command
|
28
|
-
commander.capture3 command
|
29
|
-
end
|
30
|
-
|
31
|
-
def warn message
|
32
|
-
logger.warn message
|
33
|
-
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
attr_reader :commander, :logger
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|