pragmater 10.0.0 → 10.3.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: 0c7a8f7f1c7fd255bf7fd180bbffbd0b22e96e3856fe48c03d16e86b2038cf93
4
- data.tar.gz: d40295785b03c6bdb9da02bb44ebc939978edcd41790081d4da009052e76a12c
3
+ metadata.gz: e70460db60dd9e0c70acc0c622ab3a9c4317ae733ad53d2b0399bc5da121a82d
4
+ data.tar.gz: f1fc4bf20cc7799bda1b87f2d2ff7de3d22780007add691321bcd6c56efcd235
5
5
  SHA512:
6
- metadata.gz: d7c75a205ae2056328eefde1d74f8a9aff4819a2db47a9ba3525ab053fd1d77c5b84542f525e4c26b58f17fdc780e8c7e8ec259e6d404f624e8d0de809d7b65c
7
- data.tar.gz: b3c77dcadbb22ec0caf49a0543f848acbb56ca82064411ff5d0100d286d8b94bbf9ddac35b73af17a0c07d948d22b1655f43a328b988da7a3dcc99cfc65002c3
6
+ metadata.gz: 6f5d846288bd285bd5f847f9bc3aba1cf78441c2bc062775a761834c3eea00be1f246f76f66345ee6440965ac97046651ca9e8a4a2cb2efeaa0435128e92bb01
7
+ data.tar.gz: c8eb6cd9a8891a986ec7894cd770c7e898a8c8b94dc788f49ebbfc238108de52b8a6427ff639c9027a86f6a5789ced9686683f561fe4ce3b3170c533de577c92
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -4,13 +4,6 @@
4
4
 
5
5
  = Pragmater
6
6
 
7
- [link=http://badge.fury.io/rb/pragmater]
8
- image::https://badge.fury.io/rb/pragmater.svg[Gem Version]
9
- [link=https://www.alchemists.io/projects/code_quality]
10
- image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
11
- [link=https://circleci.com/gh/bkuhlmann/pragmater]
12
- image::https://circleci.com/gh/bkuhlmann/pragmater.svg?style=svg[Circle CI Status]
13
-
14
7
  A command line interface that does one thing well by being entirely focused on managing/formatting
15
8
  source file https://en.wikipedia.org/wiki/Directive_(programming)[directive pragmas] (a.k.a. _magic
16
9
  comments_). Examples:
@@ -279,35 +272,17 @@ To test, run:
279
272
  bundle exec rake
280
273
  ----
281
274
 
282
- == Versioning
283
-
284
- Read link:https://semver.org[Semantic Versioning] for details. Briefly, it means:
285
-
286
- * Major (X.y.z) - Incremented for any backwards incompatible public API changes.
287
- * Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
288
- * Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
289
-
290
- == Code of Conduct
291
-
292
- Please note that this project is released with a link:CODE_OF_CONDUCT.adoc[CODE OF CONDUCT]. By
293
- participating in this project you agree to abide by its terms.
294
-
295
- == Contributions
296
-
297
- Read link:CONTRIBUTING.adoc[CONTRIBUTING] for details.
298
-
299
- == Community
275
+ == link:https://www.alchemists.io/policies/license[License]
300
276
 
301
- Feel free to link:https://www.alchemists.io/community[join the commmunity] for discussions related
302
- to this project and much more.
277
+ == link:https://www.alchemists.io/policies/security[Security]
303
278
 
304
- == License
279
+ == link:https://www.alchemists.io/policies/code_of_conduct[Code of Conduct]
305
280
 
306
- Read link:LICENSE.adoc[LICENSE] for details.
281
+ == link:https://www.alchemists.io/policies/contributions[Contributions]
307
282
 
308
- == Changes
283
+ == link:https://www.alchemists.io/projects/pragmater/versions[Versions]
309
284
 
310
- Read link:CHANGES.adoc[CHANGES] for details.
285
+ == link:https://www.alchemists.io/community[Community]
311
286
 
312
287
  == Credits
313
288
 
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 = specification.labeled_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 { specification.labeled_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
 
@@ -3,6 +3,7 @@
3
3
  require "dry-container"
4
4
  require "logger"
5
5
  require "pastel"
6
+ require "spek"
6
7
 
7
8
  module Pragmater
8
9
  # Provides a global gem container for injection into other objects.
@@ -10,6 +11,7 @@ module Pragmater
10
11
  extend Dry::Container::Mixin
11
12
 
12
13
  register(:configuration) { Configuration::Loader.call }
14
+ register(:specification) { Spek::Loader.call "#{__dir__}/../../pragmater.gemspec" }
13
15
  register(:colorizer) { Pastel.new enabled: $stdout.tty? }
14
16
  register(:kernel) { Kernel }
15
17
 
data/pragmater.gemspec ADDED
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "pragmater"
5
+ spec.version = "10.3.0"
6
+ spec.authors = ["Brooke Kuhlmann"]
7
+ spec.email = ["brooke@alchemists.io"]
8
+ spec.homepage = "https://www.alchemists.io/projects/pragmater"
9
+ spec.summary = "A command line interface for managing/formatting source file pragma comments."
10
+ spec.license = "Hippocratic-3.0"
11
+
12
+ spec.metadata = {
13
+ "bug_tracker_uri" => "https://github.com/bkuhlmann/pragmater/issues",
14
+ "changelog_uri" => "https://www.alchemists.io/projects/pragmater/versions",
15
+ "documentation_uri" => "https://www.alchemists.io/projects/pragmater",
16
+ "label" => "Pragmater",
17
+ "rubygems_mfa_required" => "true",
18
+ "source_code_uri" => "https://github.com/bkuhlmann/pragmater"
19
+ }
20
+
21
+ spec.signing_key = Gem.default_key_path
22
+ spec.cert_chain = [Gem.default_cert_path]
23
+
24
+ spec.required_ruby_version = "~> 3.1"
25
+ spec.add_dependency "dry-container", "~> 0.9"
26
+ spec.add_dependency "pastel", "~> 0.8"
27
+ spec.add_dependency "refinements", "~> 9.2"
28
+ spec.add_dependency "runcom", "~> 8.2"
29
+ spec.add_dependency "spek", "~> 0.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
+ 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.0
4
+ version: 10.3.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: 2021-12-29 00:00:00.000000000 Z
31
+ date: 2022-02-12 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: dry-container
@@ -44,34 +44,62 @@ 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.2'
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.2'
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: runcom
63
77
  requirement: !ruby/object:Gem::Requirement
64
78
  requirements:
65
79
  - - "~>"
66
80
  - !ruby/object:Gem::Version
67
- version: '8.0'
81
+ version: '8.2'
82
+ type: :runtime
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '8.2'
89
+ - !ruby/object:Gem::Dependency
90
+ name: spek
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '0.0'
68
96
  type: :runtime
69
97
  prerelease: false
70
98
  version_requirements: !ruby/object:Gem::Requirement
71
99
  requirements:
72
100
  - - "~>"
73
101
  - !ruby/object:Gem::Version
74
- version: '8.0'
102
+ version: '0.0'
75
103
  - !ruby/object:Gem::Dependency
76
104
  name: zeitwerk
77
105
  requirement: !ruby/object:Gem::Requirement
@@ -114,20 +142,21 @@ files:
114
142
  - lib/pragmater/formatters/general.rb
115
143
  - lib/pragmater/formatters/main.rb
116
144
  - lib/pragmater/formatters/shebang.rb
117
- - lib/pragmater/identity.rb
118
145
  - lib/pragmater/parsers/comments.rb
119
146
  - lib/pragmater/parsers/file.rb
120
147
  - lib/pragmater/processors/handler.rb
121
148
  - lib/pragmater/processors/inserter.rb
122
149
  - lib/pragmater/processors/remover.rb
123
150
  - lib/pragmater/runner.rb
151
+ - pragmater.gemspec
124
152
  homepage: https://www.alchemists.io/projects/pragmater
125
153
  licenses:
126
154
  - Hippocratic-3.0
127
155
  metadata:
128
156
  bug_tracker_uri: https://github.com/bkuhlmann/pragmater/issues
129
- changelog_uri: https://www.alchemists.io/projects/pragmater/changes.html
157
+ changelog_uri: https://www.alchemists.io/projects/pragmater/versions
130
158
  documentation_uri: https://www.alchemists.io/projects/pragmater
159
+ label: Pragmater
131
160
  rubygems_mfa_required: 'true'
132
161
  source_code_uri: https://github.com/bkuhlmann/pragmater
133
162
  post_install_message:
@@ -145,7 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
174
  - !ruby/object:Gem::Version
146
175
  version: '0'
147
176
  requirements: []
148
- rubygems_version: 3.3.3
177
+ rubygems_version: 3.3.7
149
178
  signing_key:
150
179
  specification_version: 4
151
180
  summary: A command line interface for managing/formatting source file pragma comments.
metadata.gz.sig CHANGED
@@ -1 +1 @@
1
- g ��Y"Vxqd3�tD?� i�[PЕ����\E2���jS=��E,�Dr�, t���*d��@J3`���aHe&��4��q,BZg}6�����T@>Hg� w2��fKZ��i�/m5�ty�gِ:�*�Ĩg�sl��=9�V#FtL��Oe {D� =b�u/y�~�w��oh �Yn����B9�@��U�`.�a�8D�u
1
+ dc�-Ě�*|.���W��}D/.�gi�����lO�֤.m����:j�{��y������+c�@7b�=oJ�ꎈ���IS(��HWWN "���KnVHO3ұ�Ʊ�{f>6��Ú-��X��Z���3��Z8��m4V��Vf��� @PxRwR4�η����$YJ��w�Q:��4�����3ʦ
@@ -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.0"
9
- VERSION_LABEL = "#{LABEL} #{VERSION}".freeze
10
- SUMMARY = "A command line interface for managing/formatting source file pragma comments."
11
- end
12
- end