rubocop-extension-generator 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rubocop/extension/generator/cli.rb +10 -1
- data/lib/rubocop/extension/generator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 493a33fb15b6f6a243d2341c7e2a481c13a5c0e2d52e9b565a5b395747cc8906
|
4
|
+
data.tar.gz: 941e29fef38cd1ef2dd9a088e1decadeb80517afbb0b48007bb96c254c976bc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c58446442375acabe73542045e9a85340802261cfd4cfce0326c628c195b9be7df7b5c940e9ad129f1f888f3e94911dccf64ca2dfb7364245305158f70153860
|
7
|
+
data.tar.gz: ebbcdab4a7048d35d17072c39f2d2ed05046c1cf36e17f5d48271074585a4447177e8097c3cc4a84df64430fd24e077c0e4ab2d79aa43c6a38178ef3e0fb1aec
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,8 @@ module RuboCop
|
|
4
4
|
class CLI
|
5
5
|
BANNER = <<~TEXT
|
6
6
|
Usage: rubocop-extension-generator NAME
|
7
|
+
|
8
|
+
The NAME must start with rubocop-, like rubocop-rspec.
|
7
9
|
TEXT
|
8
10
|
|
9
11
|
def self.run(argv)
|
@@ -17,13 +19,20 @@ module RuboCop
|
|
17
19
|
def run
|
18
20
|
# For --help
|
19
21
|
opt = OptionParser.new(BANNER)
|
22
|
+
opt.version = VERSION
|
20
23
|
args = opt.parse(@argv)
|
21
24
|
|
22
25
|
name = args.first
|
23
|
-
|
26
|
+
fail!(opt) unless name
|
27
|
+
fail!(opt) unless name.match?(/\Arubocop-\w+\z/)
|
24
28
|
|
25
29
|
Generator.new(name).generate
|
26
30
|
end
|
31
|
+
|
32
|
+
private def fail!(opt)
|
33
|
+
puts opt.help
|
34
|
+
exit 1
|
35
|
+
end
|
27
36
|
end
|
28
37
|
end
|
29
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-extension-generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masataka Pocke Kuwabara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|