pragmater 13.0.3 → 13.1.0

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: bbb796df5c5ad67364a440644d8f58ee48178609a1ab98a4f6fc3585475cac2a
4
- data.tar.gz: da309f19ba6476c94ab2b93e9226871b1b37ed1b5134ccaab1755923fb3a3b3f
3
+ metadata.gz: 9c1391ae8197e051a2b1bff4e25220891f3b626efd216f7e6479a919d2d392ae
4
+ data.tar.gz: 9d469ec9e23e3ac2b833244556363ecd470368b11cdf394c4914fff98d7ba9a7
5
5
  SHA512:
6
- metadata.gz: adde6a2387b695d92f70c98a819c989c8179b979937dcf1e6aa73116b9ba5282b7c554688a43367884a5b752cf0a5efb4d9d670cb25440d7831cd8c6ab8da435
7
- data.tar.gz: 9b3e054ed1d2b4d8d628bd026095065a7a30bdb534441de9896ecc5309ab13e0774458ef17f60489bc7ed40d8888a3d3ab681bcf877ad942bc14d24e4d5de387
6
+ metadata.gz: af9a8dda314a89409215b109d1e1e5473cd19437dc77d40015cb3d6db93e8fafcd02ce9b691fcf0f1c15d82856291162fe19b25f1c37b6b2605cd04306824df2
7
+ data.tar.gz: 44ef30479a718a3e03b868f03e97da90160c3f2e6a379b0baafd5197cc3ed677683c3a83b88811d81dc1927d0c2889a29ad111d2672c5d5688903e499a91bc19
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -57,21 +57,7 @@ gem install pragmater
57
57
 
58
58
  From the command line, type: `pragmater --help`
59
59
 
60
- ....
61
- USAGE
62
- pragmater [OPTIONS]
63
- pragmater COMMAND [OPTIONS]
64
-
65
- OPTIONS
66
- -v, --version Show version.
67
- -h, --help [COMMAND] Show this message.
68
-
69
- COMMANDS
70
- config Manage configuration.
71
- Path is dynamic per current directory.
72
- insert Insert pragma comments.
73
- remove Remove pragma comments.
74
- ....
60
+ image:https://alchemists.io/images/projects/pragmater/screenshots/usage.png[Usage,width=581,height=345,role=focal_point]
75
61
 
76
62
  Both the `insert` and `remove` commands support the same options for specifying pragmas and/or
77
63
  included files. Example:
@@ -11,21 +11,24 @@ module Pragmater
11
11
  module Container
12
12
  extend Dry::Container::Mixin
13
13
 
14
- register :configuration do
14
+ register :configuration, memoize: true do
15
15
  self[:defaults].add_loader(Etcher::Loaders::YAML.new(self[:xdg_config].active))
16
16
  .then { |registry| Etcher.call registry }
17
17
  end
18
18
 
19
- register :defaults do
19
+ register :defaults, memoize: true do
20
20
  Etcher::Registry.new(contract: Configuration::Contract, model: Configuration::Model)
21
21
  .add_loader(Etcher::Loaders::YAML.new(self[:defaults_path]))
22
22
  end
23
23
 
24
+ register :specification, memoize: true do
25
+ Spek::Loader.call "#{__dir__}/../../pragmater.gemspec"
26
+ end
27
+
24
28
  register(:input, memoize: true) { self[:configuration].dup }
25
- register(:defaults_path) { Pathname(__dir__).join("configuration/defaults.yml") }
26
- register(:xdg_config) { Runcom::Config.new "pragmater/configuration.yml" }
27
- register(:specification) { Spek::Loader.call "#{__dir__}/../../pragmater.gemspec" }
28
- register(:kernel) { Kernel }
29
- register(:logger) { Cogger.new formatter: :emoji }
29
+ register(:defaults_path, memoize: true) { Pathname(__dir__).join("configuration/defaults.yml") }
30
+ register(:xdg_config, memoize: true) { Runcom::Config.new "pragmater/configuration.yml" }
31
+ register(:logger, memoize: true) { Cogger.new formatter: :emoji }
32
+ register :kernel, Kernel
30
33
  end
31
34
  end
data/lib/pragmater.rb CHANGED
@@ -2,10 +2,14 @@
2
2
 
3
3
  require "zeitwerk"
4
4
 
5
- Zeitwerk::Loader.for_gem
6
- .tap { |loader| loader.inflector.inflect "cli" => "CLI" }
7
- .setup
5
+ Zeitwerk::Loader.new.then do |loader|
6
+ loader.inflector.inflect "cli" => "CLI"
7
+ loader.tag = File.basename __FILE__, ".rb"
8
+ loader.push_dir __dir__
9
+ loader.setup
10
+ end
8
11
 
9
12
  # Main namespace.
10
13
  module Pragmater
14
+ def self.loader(registry = Zeitwerk::Registry) = registry.loader_for __FILE__
11
15
  end
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.3"
5
+ spec.version = "13.1.0"
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.3
4
+ version: 13.1.0
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-07-01 00:00:00.000000000 Z
38
+ date: 2023-10-01 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: cogger
@@ -239,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
239
  - !ruby/object:Gem::Version
240
240
  version: '0'
241
241
  requirements: []
242
- rubygems_version: 3.4.15
242
+ rubygems_version: 3.4.20
243
243
  signing_key:
244
244
  specification_version: 4
245
245
  summary: A command line interface for managing pragma comments.
metadata.gz.sig CHANGED
Binary file