pragmater 8.0.0 → 9.1.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.tar.gz.sig +0 -0
- data/LICENSE.adoc +1 -1
- data/README.adoc +20 -20
- data/bin/pragmater +0 -3
- data/lib/pragmater/cli/options/configuration.rb +1 -1
- data/lib/pragmater/cli/options/core.rb +1 -1
- data/lib/pragmater/cli/options/insert_remove.rb +1 -1
- data/lib/pragmater/formatters/general.rb +1 -1
- data/lib/pragmater/formatters/shebang.rb +1 -1
- data/lib/pragmater/identity.rb +1 -1
- data/lib/pragmater/runner.rb +3 -8
- metadata +8 -204
- 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: b0b29538cfc7a5cbaf42c89922bb15f6cf5379cc9ecbfe605f312cbb7d97145e
|
4
|
+
data.tar.gz: 49827d23e0f2f63757a20c4ee31556ebeca3f9572d1abb42e05af57c9cf51075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1b705c1cdbac1143048ff4dcc0bcb77cce3ef25a433eada573675e4e496bfc7b8f5a564ff2430c0d4dd41d6d9bafe4efb152a34a1b7f0f23c1133837c941f8b
|
7
|
+
data.tar.gz: 4af3f71787f0c2746e16301e8a605c6bbc32690ecdff0eed684636b4e34731c7e3c1478029485b4c7ef77e5e171f85651d4809f81425bce142dc8cf8ddfe049d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/LICENSE.adoc
CHANGED
@@ -150,7 +150,7 @@ additional liability.
|
|
150
150
|
|
151
151
|
END OF TERMS AND CONDITIONS
|
152
152
|
|
153
|
-
Copyright link:https://www.alchemists.io[
|
153
|
+
Copyright 2015 link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
154
154
|
|
155
155
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
156
156
|
compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
|
data/README.adoc
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
[link=http://badge.fury.io/rb/pragmater]
|
8
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]
|
9
11
|
[link=https://circleci.com/gh/bkuhlmann/pragmater]
|
10
12
|
image::https://circleci.com/gh/bkuhlmann/pragmater.svg?style=svg[Circle CI Status]
|
11
13
|
|
@@ -45,8 +47,6 @@ image::https://www.alchemists.io/images/screencasts/pragmater/cover.svg[Screenca
|
|
45
47
|
|
46
48
|
== Setup
|
47
49
|
|
48
|
-
=== Production
|
49
|
-
|
50
50
|
To install, run:
|
51
51
|
|
52
52
|
[source,bash]
|
@@ -54,24 +54,6 @@ To install, run:
|
|
54
54
|
gem install pragmater
|
55
55
|
----
|
56
56
|
|
57
|
-
=== Development
|
58
|
-
|
59
|
-
To contribute, run:
|
60
|
-
|
61
|
-
[source,bash]
|
62
|
-
----
|
63
|
-
git clone https://github.com/bkuhlmann/pragmater.git
|
64
|
-
cd pragmater
|
65
|
-
bin/setup
|
66
|
-
----
|
67
|
-
|
68
|
-
You can also use the IRB console for direct access to all objects:
|
69
|
-
|
70
|
-
[source,bash]
|
71
|
-
----
|
72
|
-
bin/console
|
73
|
-
----
|
74
|
-
|
75
57
|
== Usage
|
76
58
|
|
77
59
|
=== Command Line Interface (CLI)
|
@@ -284,6 +266,24 @@ presented together for a visual comparison:
|
|
284
266
|
One oddity to the above is the use of `# !/usr/bin/env ruby` is not allowed but `#! /usr/bin/env
|
285
267
|
ruby` is which is why spacing is slightly different for shell pragmas.
|
286
268
|
|
269
|
+
== Development
|
270
|
+
|
271
|
+
To contribute, run:
|
272
|
+
|
273
|
+
[source,bash]
|
274
|
+
----
|
275
|
+
git clone https://github.com/bkuhlmann/pragmater.git
|
276
|
+
cd pragmater
|
277
|
+
bin/setup
|
278
|
+
----
|
279
|
+
|
280
|
+
You can also use the IRB console for direct access to all objects:
|
281
|
+
|
282
|
+
[source,bash]
|
283
|
+
----
|
284
|
+
bin/console
|
285
|
+
----
|
286
|
+
|
287
287
|
== Tests
|
288
288
|
|
289
289
|
To test, run:
|
data/bin/pragmater
CHANGED
@@ -13,7 +13,7 @@ module Pragmater
|
|
13
13
|
def call
|
14
14
|
parser.banner = "#{Identity::LABEL} - #{Identity::SUMMARY}"
|
15
15
|
parser.separator "\nUSAGE:\n"
|
16
|
-
private_methods.grep(/add_/).each
|
16
|
+
private_methods.grep(/add_/).each { |method| __send__ method }
|
17
17
|
parser
|
18
18
|
end
|
19
19
|
|
data/lib/pragmater/identity.rb
CHANGED
data/lib/pragmater/runner.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "pathname"
|
4
3
|
require "refinements/pathnames"
|
5
4
|
|
6
5
|
module Pragmater
|
@@ -18,17 +17,13 @@ module Pragmater
|
|
18
17
|
end
|
19
18
|
|
20
19
|
def call
|
21
|
-
Pathname(context.root_dir).files("{#{context.includes.join ","}}").map
|
20
|
+
Pathname(context.root_dir).files("{#{context.includes.join ","}}").map do |path|
|
21
|
+
path.write parser.call(path, context.comments, action: context.action).join
|
22
|
+
end
|
22
23
|
end
|
23
24
|
|
24
25
|
private
|
25
26
|
|
26
27
|
attr_reader :context, :parser
|
27
|
-
|
28
|
-
def write path
|
29
|
-
path.tap do |a_path|
|
30
|
-
a_path.write parser.call(a_path, context.comments, action: context.action).join
|
31
|
-
end
|
32
|
-
end
|
33
28
|
end
|
34
29
|
end
|
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:
|
4
|
+
version: 9.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
|
29
29
|
QWc=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date:
|
31
|
+
date: 2021-01-20 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: refinements
|
@@ -36,224 +36,28 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '8.0'
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '8.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: runcom
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '7.0'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: bundler-audit
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0.6'
|
68
|
-
type: :development
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - "~>"
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0.6'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: gemsmith
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '14.2'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '14.2'
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: git-lint
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - "~>"
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '1.0'
|
96
|
-
type: :development
|
97
|
-
prerelease: false
|
98
|
-
version_requirements: !ruby/object:Gem::Requirement
|
99
|
-
requirements:
|
100
|
-
- - "~>"
|
101
|
-
- !ruby/object:Gem::Version
|
102
|
-
version: '1.0'
|
103
|
-
- !ruby/object:Gem::Dependency
|
104
|
-
name: guard-rspec
|
105
|
-
requirement: !ruby/object:Gem::Requirement
|
106
|
-
requirements:
|
107
|
-
- - "~>"
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
version: '4.7'
|
110
|
-
type: :development
|
111
|
-
prerelease: false
|
112
|
-
version_requirements: !ruby/object:Gem::Requirement
|
113
|
-
requirements:
|
114
|
-
- - "~>"
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: '4.7'
|
117
|
-
- !ruby/object:Gem::Dependency
|
118
|
-
name: pry
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - "~>"
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '0.13'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - "~>"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '0.13'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: pry-byebug
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - "~>"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '3.9'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - "~>"
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '3.9'
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: rake
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - "~>"
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: '13.0'
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - "~>"
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: '13.0'
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: reek
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - "~>"
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '6.0'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - "~>"
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '6.0'
|
173
|
-
- !ruby/object:Gem::Dependency
|
174
|
-
name: rspec
|
175
|
-
requirement: !ruby/object:Gem::Requirement
|
176
|
-
requirements:
|
177
|
-
- - "~>"
|
178
|
-
- !ruby/object:Gem::Version
|
179
|
-
version: '3.9'
|
180
|
-
type: :development
|
181
|
-
prerelease: false
|
182
|
-
version_requirements: !ruby/object:Gem::Requirement
|
183
|
-
requirements:
|
184
|
-
- - "~>"
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
version: '3.9'
|
187
|
-
- !ruby/object:Gem::Dependency
|
188
|
-
name: rubocop
|
189
|
-
requirement: !ruby/object:Gem::Requirement
|
190
|
-
requirements:
|
191
|
-
- - "~>"
|
192
|
-
- !ruby/object:Gem::Version
|
193
|
-
version: '0.89'
|
194
|
-
type: :development
|
195
|
-
prerelease: false
|
196
|
-
version_requirements: !ruby/object:Gem::Requirement
|
197
|
-
requirements:
|
198
|
-
- - "~>"
|
199
|
-
- !ruby/object:Gem::Version
|
200
|
-
version: '0.89'
|
201
|
-
- !ruby/object:Gem::Dependency
|
202
|
-
name: rubocop-performance
|
203
|
-
requirement: !ruby/object:Gem::Requirement
|
204
|
-
requirements:
|
205
|
-
- - "~>"
|
206
|
-
- !ruby/object:Gem::Version
|
207
|
-
version: '1.5'
|
208
|
-
type: :development
|
209
|
-
prerelease: false
|
210
|
-
version_requirements: !ruby/object:Gem::Requirement
|
211
|
-
requirements:
|
212
|
-
- - "~>"
|
213
|
-
- !ruby/object:Gem::Version
|
214
|
-
version: '1.5'
|
215
|
-
- !ruby/object:Gem::Dependency
|
216
|
-
name: rubocop-rake
|
217
|
-
requirement: !ruby/object:Gem::Requirement
|
218
|
-
requirements:
|
219
|
-
- - "~>"
|
220
|
-
- !ruby/object:Gem::Version
|
221
|
-
version: '0.5'
|
222
|
-
type: :development
|
223
|
-
prerelease: false
|
224
|
-
version_requirements: !ruby/object:Gem::Requirement
|
225
|
-
requirements:
|
226
|
-
- - "~>"
|
227
|
-
- !ruby/object:Gem::Version
|
228
|
-
version: '0.5'
|
229
|
-
- !ruby/object:Gem::Dependency
|
230
|
-
name: rubocop-rspec
|
231
|
-
requirement: !ruby/object:Gem::Requirement
|
232
|
-
requirements:
|
233
|
-
- - "~>"
|
234
|
-
- !ruby/object:Gem::Version
|
235
|
-
version: '1.39'
|
236
|
-
type: :development
|
237
|
-
prerelease: false
|
238
|
-
version_requirements: !ruby/object:Gem::Requirement
|
239
|
-
requirements:
|
240
|
-
- - "~>"
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
version: '1.39'
|
243
|
-
- !ruby/object:Gem::Dependency
|
244
|
-
name: simplecov
|
245
|
-
requirement: !ruby/object:Gem::Requirement
|
246
|
-
requirements:
|
247
|
-
- - "~>"
|
248
|
-
- !ruby/object:Gem::Version
|
249
|
-
version: '0.18'
|
250
|
-
type: :development
|
251
|
-
prerelease: false
|
252
|
-
version_requirements: !ruby/object:Gem::Requirement
|
253
|
-
requirements:
|
254
|
-
- - "~>"
|
255
|
-
- !ruby/object:Gem::Version
|
256
|
-
version: '0.18'
|
60
|
+
version: '7.0'
|
257
61
|
description:
|
258
62
|
email:
|
259
63
|
- brooke@alchemists.io
|
@@ -303,14 +107,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
303
107
|
requirements:
|
304
108
|
- - "~>"
|
305
109
|
- !ruby/object:Gem::Version
|
306
|
-
version: '
|
110
|
+
version: '3.0'
|
307
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
308
112
|
requirements:
|
309
113
|
- - ">="
|
310
114
|
- !ruby/object:Gem::Version
|
311
115
|
version: '0'
|
312
116
|
requirements: []
|
313
|
-
rubygems_version: 3.
|
117
|
+
rubygems_version: 3.2.5
|
314
118
|
signing_key:
|
315
119
|
specification_version: 4
|
316
120
|
summary: A command line interface for managing/formatting source file pragma comments.
|
metadata.gz.sig
CHANGED
Binary file
|