pragmater 1.1.0 → 1.2.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/README.md +6 -3
- data/lib/pragmater/cli.rb +8 -8
- data/lib/pragmater/formatter.rb +1 -8
- data/lib/pragmater/identity.rb +1 -1
- data.tar.gz.sig +3 -2
- metadata +61 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eae89a8953fc22340f54ee5a0ebbaa4b461f1df0
|
4
|
+
data.tar.gz: 78b918e61f371a29654240b8b37c5484138dae5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6e3b06955499cc80949af96846a7c1a735840af0a13a24a151b680693c7c06d40bf52aed0bcc244ee869ababe86df9cd349de468c0cd3f1c67a69de31281cb5
|
7
|
+
data.tar.gz: f3da09ed2bca12a708f5d698c22a4f4c5ff35a0e94c60cdbb769963574917d42d79ca3513b128ef5defe5d793b2be7df366dc76976bbb84ac99719b913062946
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -23,6 +23,7 @@ multiple Ruby source files in order to benefit from improved memory and concurre
|
|
23
23
|
# Table of Contents
|
24
24
|
|
25
25
|
- [Features](#features)
|
26
|
+
- [Screencasts](#screencasts)
|
26
27
|
- [Requirements](#requirements)
|
27
28
|
- [Setup](#setup)
|
28
29
|
- [Usage](#usage)
|
@@ -47,6 +48,8 @@ multiple Ruby source files in order to benefit from improved memory and concurre
|
|
47
48
|
- Ensures duplicate pragma comments never exist.
|
48
49
|
- Ensures pragma comments are always properly formatted.
|
49
50
|
|
51
|
+
# Screencasts
|
52
|
+
|
50
53
|
[![asciicast](https://asciinema.org/a/34038.png)](https://asciinema.org/a/34038)
|
51
54
|
|
52
55
|
# Requirements
|
@@ -57,7 +60,7 @@ multiple Ruby source files in order to benefit from improved memory and concurre
|
|
57
60
|
|
58
61
|
For a secure install, type the following (recommended):
|
59
62
|
|
60
|
-
gem cert --add <(curl
|
63
|
+
gem cert --add <(curl --location --silent https://www.alchemists.io/gem-public.pem)
|
61
64
|
gem install pragmater --trust-policy MediumSecurity
|
62
65
|
|
63
66
|
NOTE: A HighSecurity trust policy would be best but MediumSecurity enables signed gem verification while
|
@@ -74,10 +77,10 @@ For an insecure install, type the following (not recommended):
|
|
74
77
|
From the command line, type: `pragmater help`
|
75
78
|
|
76
79
|
pragmater -a, [--add=ADD] # Add pragma comments to source file(s).
|
77
|
-
pragmater -e, [--edit] # Edit
|
80
|
+
pragmater -e, [--edit] # Edit gem settings in default editor.
|
78
81
|
pragmater -h, [--help=HELP] # Show this message or get help for a command.
|
79
82
|
pragmater -r, [--remove=REMOVE] # Remove pragma comments from source file(s).
|
80
|
-
pragmater -v, [--version] # Show
|
83
|
+
pragmater -v, [--version] # Show gem version.
|
81
84
|
|
82
85
|
Both the `--add` and `--remove` options provide the ability to supply specific pragma comments and/or whitelisted files:
|
83
86
|
|
data/lib/pragmater/cli.rb
CHANGED
@@ -20,7 +20,7 @@ module Pragmater
|
|
20
20
|
end
|
21
21
|
|
22
22
|
desc "-a, [--add=ADD]", "Add pragma comments to source file(s)."
|
23
|
-
map %w
|
23
|
+
map %w[-a --add] => :add
|
24
24
|
method_option :comments, aliases: "-c", desc: "Pragma comments", type: :array, default: []
|
25
25
|
method_option :whitelist, aliases: "-w", desc: "File extension whitelist", type: :array, default: []
|
26
26
|
def add path
|
@@ -29,7 +29,7 @@ module Pragmater
|
|
29
29
|
end
|
30
30
|
|
31
31
|
desc "-r, [--remove=REMOVE]", "Remove pragma comments from source file(s)."
|
32
|
-
map %w
|
32
|
+
map %w[-r --remove] => :remove
|
33
33
|
method_option :comments, aliases: "-c", desc: "Pragma comments", type: :array, default: []
|
34
34
|
method_option :whitelist, aliases: "-w", desc: "File extension whitelist", type: :array, default: []
|
35
35
|
def remove path
|
@@ -37,24 +37,24 @@ module Pragmater
|
|
37
37
|
write path, settings, :remove
|
38
38
|
end
|
39
39
|
|
40
|
-
desc "-e, [--edit]", "Edit
|
41
|
-
map %w
|
40
|
+
desc "-e, [--edit]", "Edit gem settings in default editor."
|
41
|
+
map %w[-e --edit] => :edit
|
42
42
|
def edit
|
43
43
|
resource_file = File.join ENV["HOME"], Pragmater::Identity.file_name
|
44
44
|
info "Editing: #{resource_file}..."
|
45
45
|
`#{editor} #{resource_file}`
|
46
46
|
end
|
47
47
|
|
48
|
-
desc "-v, [--version]", "Show
|
49
|
-
map %w
|
48
|
+
desc "-v, [--version]", "Show gem version."
|
49
|
+
map %w[-v --version] => :version
|
50
50
|
def version
|
51
51
|
say Pragmater::Identity.version_label
|
52
52
|
end
|
53
53
|
|
54
54
|
desc "-h, [--help=HELP]", "Show this message or get help for a command."
|
55
|
-
map %w
|
55
|
+
map %w[-h --help] => :help
|
56
56
|
def help task = nil
|
57
|
-
say
|
57
|
+
say and super
|
58
58
|
end
|
59
59
|
|
60
60
|
private
|
data/lib/pragmater/formatter.rb
CHANGED
@@ -4,14 +4,7 @@ module Pragmater
|
|
4
4
|
# Formats pragma comments in a consistent manner.
|
5
5
|
class Formatter
|
6
6
|
def self.shebang_format
|
7
|
-
|
8
|
-
\A # Start of line.
|
9
|
-
\# # Start of comment.
|
10
|
-
\! # Bang.
|
11
|
-
\s? # Space - optional.
|
12
|
-
\/.*ruby # Absolute path to Ruby program.
|
13
|
-
\Z # End of line.
|
14
|
-
/x
|
7
|
+
%r(\A\#\!\s?\/.*ruby\Z)
|
15
8
|
end
|
16
9
|
|
17
10
|
def self.pragma_format
|
data/lib/pragmater/identity.rb
CHANGED
data.tar.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
���g�F�iJsch¬�������v�3A�dg8'Vs2�>jG���u��A��nu}Vdc�k�A$J��<5y)b�Pɚ\�d���B�ø6��䊛��K�e�_��u��O�l`71��w�{ؙ����2�ˇ��H���UYk��ǥ(�T�IY��c��˨�-�����L����D�@ʚ�p��_���?0�rs
|
2
|
+
���gC��B���?mp�ۣ��^
|
3
|
+
�j����3ZC+XF�ܺ�����D�
|
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: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
aSif+qBc6oHD7EQWPF5cZkzkIURuwNwPBngZGxIKaMAgRhjGFXzUMAaq++r59cS9
|
31
31
|
xTfQ4k6fglKEgpnLAXiKdo2c8Ym+X4rIKFfedQ==
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2016-
|
33
|
+
date: 2016-04-24 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: thor
|
@@ -66,14 +66,14 @@ dependencies:
|
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '2.
|
69
|
+
version: '2.2'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '2.
|
76
|
+
version: '2.2'
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: rake
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,6 +186,62 @@ dependencies:
|
|
186
186
|
- - ">="
|
187
187
|
- !ruby/object:Gem::Version
|
188
188
|
version: '0'
|
189
|
+
- !ruby/object:Gem::Dependency
|
190
|
+
name: bond
|
191
|
+
requirement: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
196
|
+
type: :development
|
197
|
+
prerelease: false
|
198
|
+
version_requirements: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0'
|
203
|
+
- !ruby/object:Gem::Dependency
|
204
|
+
name: wirb
|
205
|
+
requirement: !ruby/object:Gem::Requirement
|
206
|
+
requirements:
|
207
|
+
- - ">="
|
208
|
+
- !ruby/object:Gem::Version
|
209
|
+
version: '0'
|
210
|
+
type: :development
|
211
|
+
prerelease: false
|
212
|
+
version_requirements: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - ">="
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: '0'
|
217
|
+
- !ruby/object:Gem::Dependency
|
218
|
+
name: hirb
|
219
|
+
requirement: !ruby/object:Gem::Requirement
|
220
|
+
requirements:
|
221
|
+
- - ">="
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: '0'
|
224
|
+
type: :development
|
225
|
+
prerelease: false
|
226
|
+
version_requirements: !ruby/object:Gem::Requirement
|
227
|
+
requirements:
|
228
|
+
- - ">="
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: '0'
|
231
|
+
- !ruby/object:Gem::Dependency
|
232
|
+
name: awesome_print
|
233
|
+
requirement: !ruby/object:Gem::Requirement
|
234
|
+
requirements:
|
235
|
+
- - ">="
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: '0'
|
238
|
+
type: :development
|
239
|
+
prerelease: false
|
240
|
+
version_requirements: !ruby/object:Gem::Requirement
|
241
|
+
requirements:
|
242
|
+
- - ">="
|
243
|
+
- !ruby/object:Gem::Version
|
244
|
+
version: '0'
|
189
245
|
- !ruby/object:Gem::Dependency
|
190
246
|
name: rspec
|
191
247
|
requirement: !ruby/object:Gem::Requirement
|
@@ -341,7 +397,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
341
397
|
version: '0'
|
342
398
|
requirements: []
|
343
399
|
rubyforge_project:
|
344
|
-
rubygems_version: 2.
|
400
|
+
rubygems_version: 2.6.3
|
345
401
|
signing_key:
|
346
402
|
specification_version: 4
|
347
403
|
summary: A command line interface for managing/formatting source file pragma comments.
|
metadata.gz.sig
CHANGED
Binary file
|