pragmater 7.1.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.adoc +25 -8
- data/lib/pragmater/formatter.rb +3 -3
- data/lib/pragmater/identity.rb +1 -1
- metadata +20 -20
- metadata.gz.sig +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17f31f5ee7db80b11e49894b0db270e17c1fcdedb97fd9fb19bfebc04af238c2
|
4
|
+
data.tar.gz: fe4b1203fb590733575f72ccc569481617b978a7949dd13605582fb7a52b7bfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e5f6b2b569226308f251b080d7e51df7352f23dfa33be98afef5424982566d9a8e55f234c052752554ba2e1f8c10740b22859ed39de06a8fd03d096e1dcd15c
|
7
|
+
data.tar.gz: 5961184d11177ccea0a041783b6df77e4cced27a5088c63325915ed75fc20748e2ea0c59a05d0071d4d8786154905e83fda922788a67c6386b6241d4025e7177
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -36,12 +36,12 @@ toc::[]
|
|
36
36
|
|
37
37
|
== Screencasts
|
38
38
|
|
39
|
-
[link=https://www.alchemists.io/screencasts/pragmater
|
40
|
-
image::https://www.alchemists.io/images/screencasts/pragmater/cover
|
39
|
+
[link=https://www.alchemists.io/screencasts/pragmater]
|
40
|
+
image::https://www.alchemists.io/images/screencasts/pragmater/cover.svg[Screencast,600,240,role=focal_point]
|
41
41
|
|
42
42
|
== Requirements
|
43
43
|
|
44
|
-
. https://www.ruby-lang.org[Ruby
|
44
|
+
. https://www.ruby-lang.org[Ruby]
|
45
45
|
|
46
46
|
== Setup
|
47
47
|
|
@@ -102,8 +102,8 @@ pragmater --add --comments "# frozen_string_literal: true" --includes "Gemfile"
|
|
102
102
|
----
|
103
103
|
|
104
104
|
The `--add` and `--remove` commands default to the current working directory so a path isn’t
|
105
|
-
necessary unless you want to run Pragmater on a directory structure
|
106
|
-
|
105
|
+
necessary unless you want to run Pragmater on a directory structure other than your current working
|
106
|
+
directory.
|
107
107
|
|
108
108
|
=== Customization
|
109
109
|
|
@@ -124,8 +124,7 @@ The default configuration is as follows:
|
|
124
124
|
:includes: []
|
125
125
|
----
|
126
126
|
|
127
|
-
Feel free to take
|
128
|
-
`configuration.yml`.
|
127
|
+
Feel free to take the above configuration, modify, and save as your own custom `configuration.yml`.
|
129
128
|
|
130
129
|
The `configuration.yml` file can be configured as follows:
|
131
130
|
|
@@ -271,6 +270,24 @@ _deduplicate_ all instances of the same string thus reducing your memory footpri
|
|
271
270
|
valuable in situations where you are not using the frozen string comment and need to selectively
|
272
271
|
freeze strings.
|
273
272
|
|
273
|
+
=== Consistency
|
274
|
+
|
275
|
+
As an added bonus, this gem ensures pragmas for all analyzed files are formatted in a consistent
|
276
|
+
style. This means there is always a space after the octothorpe (`#`). Here are multiple pragmas
|
277
|
+
presented together for a visual comparison:
|
278
|
+
|
279
|
+
[source,ruby]
|
280
|
+
----
|
281
|
+
#! /usr/bin/env ruby
|
282
|
+
# encoding: UTF-8
|
283
|
+
# coding: UTF-8
|
284
|
+
# frozen_string_literal: true
|
285
|
+
# warn_indent: true
|
286
|
+
----
|
287
|
+
|
288
|
+
One oddity to the above is the use of `# !/usr/bin/env ruby` is not allowed but `#! /usr/bin/env
|
289
|
+
ruby` is which is why spacing is slightly different for shell pragmas.
|
290
|
+
|
274
291
|
== Tests
|
275
292
|
|
276
293
|
To test, run:
|
@@ -307,4 +324,4 @@ Read link:CHANGES.adoc[CHANGES] for details.
|
|
307
324
|
|
308
325
|
== Credits
|
309
326
|
|
310
|
-
Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann
|
327
|
+
Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
|
data/lib/pragmater/formatter.rb
CHANGED
@@ -4,7 +4,7 @@ module Pragmater
|
|
4
4
|
# Formats pragma comments in a consistent manner.
|
5
5
|
class Formatter
|
6
6
|
def self.shebang_format
|
7
|
-
%r(\A
|
7
|
+
%r(\A\#!\s?/.*ruby\Z)
|
8
8
|
end
|
9
9
|
|
10
10
|
def self.pragma_format
|
@@ -13,9 +13,9 @@ module Pragmater
|
|
13
13
|
\# # Start of comment.
|
14
14
|
\s? # Space - optional.
|
15
15
|
\w+ # Key - 1 or more word characters only.
|
16
|
-
|
16
|
+
: # Key and value delimiter.
|
17
17
|
\s? # Space - optional.
|
18
|
-
[\w
|
18
|
+
[\w-]+ # Value - 1 or more word or dash characters.
|
19
19
|
\Z # End of line.
|
20
20
|
/x
|
21
21
|
end
|
data/lib/pragmater/identity.rb
CHANGED
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pragmater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
11
|
- |
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
|
29
29
|
QWc=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2020-
|
31
|
+
date: 2020-07-23 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: runcom
|
@@ -92,28 +92,28 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '14.
|
95
|
+
version: '14.2'
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '14.
|
102
|
+
version: '14.2'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
|
-
name: git-
|
104
|
+
name: git-lint
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
109
|
+
version: '1.0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '1.0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: guard-rspec
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,28 +134,28 @@ dependencies:
|
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: '0.
|
137
|
+
version: '0.13'
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '0.
|
144
|
+
version: '0.13'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: pry-byebug
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: '3.
|
151
|
+
version: '3.9'
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: '3.
|
158
|
+
version: '3.9'
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: rake
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,14 +204,14 @@ dependencies:
|
|
204
204
|
requirements:
|
205
205
|
- - "~>"
|
206
206
|
- !ruby/object:Gem::Version
|
207
|
-
version: '0.
|
207
|
+
version: '0.83'
|
208
208
|
type: :development
|
209
209
|
prerelease: false
|
210
210
|
version_requirements: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
212
|
- - "~>"
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version: '0.
|
214
|
+
version: '0.83'
|
215
215
|
- !ruby/object:Gem::Dependency
|
216
216
|
name: rubocop-performance
|
217
217
|
requirement: !ruby/object:Gem::Requirement
|
@@ -246,14 +246,14 @@ dependencies:
|
|
246
246
|
requirements:
|
247
247
|
- - "~>"
|
248
248
|
- !ruby/object:Gem::Version
|
249
|
-
version: '1.
|
249
|
+
version: '1.39'
|
250
250
|
type: :development
|
251
251
|
prerelease: false
|
252
252
|
version_requirements: !ruby/object:Gem::Requirement
|
253
253
|
requirements:
|
254
254
|
- - "~>"
|
255
255
|
- !ruby/object:Gem::Version
|
256
|
-
version: '1.
|
256
|
+
version: '1.39'
|
257
257
|
- !ruby/object:Gem::Dependency
|
258
258
|
name: simplecov
|
259
259
|
requirement: !ruby/object:Gem::Requirement
|
@@ -268,7 +268,7 @@ dependencies:
|
|
268
268
|
- - "~>"
|
269
269
|
- !ruby/object:Gem::Version
|
270
270
|
version: '0.18'
|
271
|
-
description:
|
271
|
+
description:
|
272
272
|
email:
|
273
273
|
- brooke@alchemists.io
|
274
274
|
executables:
|
@@ -296,7 +296,7 @@ metadata:
|
|
296
296
|
changelog_uri: https://www.alchemists.io/projects/pragmater/changes.html
|
297
297
|
documentation_uri: https://www.alchemists.io/projects/pragmater
|
298
298
|
source_code_uri: https://github.com/bkuhlmann/pragmater
|
299
|
-
post_install_message:
|
299
|
+
post_install_message:
|
300
300
|
rdoc_options: []
|
301
301
|
require_paths:
|
302
302
|
- lib
|
@@ -311,8 +311,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
311
|
- !ruby/object:Gem::Version
|
312
312
|
version: '0'
|
313
313
|
requirements: []
|
314
|
-
rubygems_version: 3.1.
|
315
|
-
signing_key:
|
314
|
+
rubygems_version: 3.1.4
|
315
|
+
signing_key:
|
316
316
|
specification_version: 4
|
317
317
|
summary: A command line interface for managing/formatting source file pragma comments.
|
318
318
|
test_files: []
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
4�
|
2
|
-
|
1
|
+
\K���u��ȥfg�Z5V����b�E67 s��c��Sf��3�#*F�4�\���i�j�]�@�Ǵ
|
2
|
+
����oD��� �07�q����_H}f$���T�?&{���߈�fE:������5[���
|
3
|
+
�c��a�h�9o�M���U��"�,��#
|