pragmater 10.0.1 → 10.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: fa35e0f80fe5d68b25f6dc235da1c62412c954244aa784f84e287e2281d2e894
4
- data.tar.gz: 148d21b57d15a4dc7967a78efcc1b1fa2b64d5c7832865b964674b77905da0aa
3
+ metadata.gz: 5f99c2a2dbda677014ec019b5ec7698f26967faa4c2aa10760245edc1cfaf85f
4
+ data.tar.gz: 65f482dfc9ea95b6765a95607545517e581d0ad43b14a2b26ac94aebf841a84e
5
5
  SHA512:
6
- metadata.gz: 90273c7b2db561e05e075f7a8daa676c5a7a7e85d594c81c8b179201417f454c1e4de4b6e5bc2f7b93745b32f7a81b9468d1cc57e65378fe051a76c3d036d6e6
7
- data.tar.gz: 9721e803ee2158c656241532cf43024a0677517b7b3f0a1b32d2e961fd8568e1c442599506d01dbaa74c61e9b6d41cc06b0232e4dacd7a424a41c449540d988f
6
+ metadata.gz: 44786094c31c52c9f7295e61212d4fa09589e8a76ae45bf3d7882f64cb51946e28f582fef592a6291b6f6fb938692885f787ddf96b21cec380aabcf81a80e8bb
7
+ data.tar.gz: 37db6cabf9f157ddc14bbd689645f58c0c318c163c07f06bcdd0d3e455b9dde20234ab07534a196e036673d648aa11c12c03a6074417dbb35b909e7ebb4b8913
checksums.yaml.gz.sig CHANGED
Binary file
data/exe/pragmater CHANGED
@@ -3,5 +3,4 @@
3
3
 
4
4
  require "pragmater"
5
5
 
6
- Process.setproctitle Pragmater::Identity::VERSION_LABEL
7
6
  Pragmater::CLI::Shell.new.call ARGV
@@ -11,13 +11,16 @@ module Pragmater
11
11
 
12
12
  def self.call(...) = new(...).call
13
13
 
14
- def initialize configuration = Container[:configuration], client: Parser::CLIENT
14
+ def initialize configuration = Container[:configuration],
15
+ client: Parser::CLIENT,
16
+ container: Container
15
17
  @configuration = configuration
16
18
  @client = client
19
+ @container = container
17
20
  end
18
21
 
19
22
  def call arguments = []
20
- client.banner = "#{Identity::LABEL} - #{Identity::SUMMARY}"
23
+ client.banner = "Pragmater - #{specification.summary}"
21
24
  client.separator "\nUSAGE:\n"
22
25
  collate
23
26
  client.parse arguments
@@ -26,7 +29,7 @@ module Pragmater
26
29
 
27
30
  private
28
31
 
29
- attr_reader :configuration, :client
32
+ attr_reader :configuration, :client, :container
30
33
 
31
34
  def collate = private_methods.sort.grep(/add_/).each { |method| __send__ method }
32
35
 
@@ -64,6 +67,8 @@ module Pragmater
64
67
  end
65
68
 
66
69
  def root_dir = configuration.root_dir
70
+
71
+ def specification = container[__method__]
67
72
  end
68
73
  end
69
74
  end
@@ -26,7 +26,7 @@ module Pragmater
26
26
  case configuration
27
27
  in action_config: Symbol => action then config action
28
28
  in {action_insert: true} | {action_remove: true} then run configuration
29
- in action_version: true then logger.info Identity::VERSION_LABEL
29
+ in action_version: true then logger.info { "Pragmater #{specification.version}" }
30
30
  else usage
31
31
  end
32
32
  end
@@ -37,6 +37,8 @@ module Pragmater
37
37
 
38
38
  def usage = logger.unknown(parser.to_s)
39
39
 
40
+ def specification = container[__method__]
41
+
40
42
  def logger = container[__method__]
41
43
  end
42
44
  end
@@ -14,7 +14,7 @@ module Pragmater
14
14
  using Refinements::Structs
15
15
 
16
16
  DEFAULTS = YAML.load_file(Pathname(__dir__).join("defaults.yml")).freeze
17
- CLIENT = Runcom::Config.new "#{Identity::NAME}/configuration.yml", defaults: DEFAULTS
17
+ CLIENT = Runcom::Config.new "pragmater/configuration.yml", defaults: DEFAULTS
18
18
 
19
19
  def self.call = new.call
20
20
 
@@ -9,7 +9,10 @@ module Pragmater
9
9
  module Container
10
10
  extend Dry::Container::Mixin
11
11
 
12
+ SPEC_PATH = "#{__dir__}/../../pragmater.gemspec".freeze
13
+
12
14
  register(:configuration) { Configuration::Loader.call }
15
+ register(:specification) { Gem::Specification.load SPEC_PATH }
13
16
  register(:colorizer) { Pastel.new enabled: $stdout.tty? }
14
17
  register(:kernel) { Kernel }
15
18
 
data/pragmater.gemspec ADDED
@@ -0,0 +1,37 @@
1
+ # frozen_string_literal: true
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "pragmater"
5
+ spec.version = "10.1.0"
6
+ spec.platform = Gem::Platform::RUBY
7
+ spec.authors = ["Brooke Kuhlmann"]
8
+ spec.email = ["brooke@alchemists.io"]
9
+ spec.homepage = "https://www.alchemists.io/projects/pragmater"
10
+ spec.summary = "A command line interface for managing/formatting source file pragma comments."
11
+ spec.license = "Hippocratic-3.0"
12
+
13
+ spec.metadata = {
14
+ "bug_tracker_uri" => "https://github.com/bkuhlmann/pragmater/issues",
15
+ "changelog_uri" => "https://www.alchemists.io/projects/pragmater/versions",
16
+ "documentation_uri" => "https://www.alchemists.io/projects/pragmater",
17
+ "label" => "Pragmater",
18
+ "rubygems_mfa_required" => "true",
19
+ "source_code_uri" => "https://github.com/bkuhlmann/pragmater"
20
+ }
21
+
22
+ spec.signing_key = Gem.default_key_path
23
+ spec.cert_chain = [Gem.default_cert_path]
24
+
25
+ spec.required_ruby_version = "~> 3.1"
26
+ spec.add_dependency "dry-container", "~> 0.9"
27
+ spec.add_dependency "pastel", "~> 0.8"
28
+ spec.add_dependency "refinements", "~> 9.1"
29
+ spec.add_dependency "runcom", "~> 8.0"
30
+ spec.add_dependency "zeitwerk", "~> 2.5"
31
+
32
+ spec.bindir = "exe"
33
+ spec.executables << "pragmater"
34
+ spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
35
+ spec.files = Dir["*.gemspec", "lib/**/*"]
36
+ spec.require_paths = ["lib"]
37
+ end
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: 10.0.1
4
+ version: 10.1.0
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-01 00:00:00.000000000 Z
31
+ date: 2022-01-23 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: dry-container
@@ -44,20 +44,34 @@ dependencies:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0.9'
47
+ - !ruby/object:Gem::Dependency
48
+ name: pastel
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.8'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '0.8'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: refinements
49
63
  requirement: !ruby/object:Gem::Requirement
50
64
  requirements:
51
65
  - - "~>"
52
66
  - !ruby/object:Gem::Version
53
- version: '9.0'
67
+ version: '9.1'
54
68
  type: :runtime
55
69
  prerelease: false
56
70
  version_requirements: !ruby/object:Gem::Requirement
57
71
  requirements:
58
72
  - - "~>"
59
73
  - !ruby/object:Gem::Version
60
- version: '9.0'
74
+ version: '9.1'
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: runcom
63
77
  requirement: !ruby/object:Gem::Requirement
@@ -114,13 +128,13 @@ files:
114
128
  - lib/pragmater/formatters/general.rb
115
129
  - lib/pragmater/formatters/main.rb
116
130
  - lib/pragmater/formatters/shebang.rb
117
- - lib/pragmater/identity.rb
118
131
  - lib/pragmater/parsers/comments.rb
119
132
  - lib/pragmater/parsers/file.rb
120
133
  - lib/pragmater/processors/handler.rb
121
134
  - lib/pragmater/processors/inserter.rb
122
135
  - lib/pragmater/processors/remover.rb
123
136
  - lib/pragmater/runner.rb
137
+ - pragmater.gemspec
124
138
  homepage: https://www.alchemists.io/projects/pragmater
125
139
  licenses:
126
140
  - Hippocratic-3.0
@@ -128,6 +142,7 @@ metadata:
128
142
  bug_tracker_uri: https://github.com/bkuhlmann/pragmater/issues
129
143
  changelog_uri: https://www.alchemists.io/projects/pragmater/versions
130
144
  documentation_uri: https://www.alchemists.io/projects/pragmater
145
+ label: Pragmater
131
146
  rubygems_mfa_required: 'true'
132
147
  source_code_uri: https://github.com/bkuhlmann/pragmater
133
148
  post_install_message:
@@ -145,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
160
  - !ruby/object:Gem::Version
146
161
  version: '0'
147
162
  requirements: []
148
- rubygems_version: 3.3.4
163
+ rubygems_version: 3.3.5
149
164
  signing_key:
150
165
  specification_version: 4
151
166
  summary: A command line interface for managing/formatting source file pragma comments.
metadata.gz.sig CHANGED
@@ -1,3 +1 @@
1
- w��ր:}
2
- b����+�TX �� �﹈�{-upo�X���;-`j�O��bq���{0ؗRX�J�^��~;�Ίfi���d?���7Y^�t�J!��1Ro
3
- h��ܮ��p6~��Di�e��kI@|��Rż�cz`�^��U%i�����#?�D���&e�l�)�����@�,%�$2I|��� �aW���$غ�Z�=���� cm��s�6���J�fJ��L���h�v�~�g���Z��BEv�x uea�
1
+ s���~�\O�OF�WZ������AVg��W� y�_$ j �.ɝ�xf"}H"��jk� .�T���m�b�N%������2:�\����Orw�H��.��k\�fJ^m�:48M9O*��a73p[���ZJ@c*���1/��6���{����if
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Pragmater
4
- # Gem identity information.
5
- module Identity
6
- NAME = "pragmater"
7
- LABEL = "Pragmater"
8
- VERSION = "10.0.1"
9
- VERSION_LABEL = "#{LABEL} #{VERSION}".freeze
10
- SUMMARY = "A command line interface for managing/formatting source file pragma comments."
11
- end
12
- end