vindetta 0.14.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vindetta/cli.rb +19 -5
- data/lib/vindetta/decoder/result.rb +1 -1
- data/lib/vindetta/generator.rb +1 -1
- data/lib/vindetta/locale/en.yml +1 -0
- data/lib/vindetta/version.rb +1 -1
- data/vindetta.gemspec +5 -5
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3900e8e738013d538a9ad3640ed2fce1d2dd0d4
|
4
|
+
data.tar.gz: fa7efc3df758cf3dc570db2d96866f47b606f14c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a5040aa6110a0c377317820296587847c2f681af4b530038f1f196cfc9f612e74f6c7a558fc932df0fc20c9e22a972d7549efb96179cdd13041185b178f2746
|
7
|
+
data.tar.gz: bac8e88bfc0e74ccd1f52e4909e3f356b684c45ab3f828f603f6567b7913559f5230510bff1fe48a70d490f056a0755e4408f806edab3e31b153e1088b7a47db
|
data/lib/vindetta/cli.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
require "gli"
|
2
2
|
require "vindetta/version"
|
3
|
-
require "
|
3
|
+
require "i18n"
|
4
|
+
|
5
|
+
I18n.load_path << Dir["./lib/vindetta/locale/*.yml"]
|
6
|
+
I18n.backend.load_translations
|
4
7
|
|
5
8
|
module Vindetta
|
6
9
|
class CLI
|
@@ -8,9 +11,11 @@ module Vindetta
|
|
8
11
|
|
9
12
|
program_desc "Vehicle Identification Number (VIN) CLI"
|
10
13
|
version Vindetta::VERSION
|
14
|
+
error_device = error_device
|
11
15
|
|
12
16
|
desc "Transliterates a VIN character"
|
13
17
|
arg_name "character"
|
18
|
+
|
14
19
|
command %i[transliterate t] do |c|
|
15
20
|
c.action do |_global, _options, args|
|
16
21
|
puts Vindetta::Transliterator.run(args.first)
|
@@ -18,24 +23,33 @@ module Vindetta
|
|
18
23
|
end
|
19
24
|
|
20
25
|
desc "Validates a VIN"
|
26
|
+
|
21
27
|
command %i[validate v] do |c|
|
22
28
|
c.action do |_global, _options, args|
|
23
|
-
|
29
|
+
vin = args.first
|
30
|
+
|
31
|
+
exit_now!(I18n.t("required"), 1) if vin.nil?
|
32
|
+
|
33
|
+
valid = Vindetta::Validator.run(vin)
|
34
|
+
|
35
|
+
puts valid ? 1 : 0
|
24
36
|
end
|
25
37
|
end
|
26
38
|
|
27
39
|
desc "Decodes a VIN"
|
40
|
+
|
28
41
|
command %i[decode d] do |c|
|
29
|
-
c.action do |_global, _options,
|
30
|
-
vin =
|
42
|
+
c.action do |_global, _options, args|
|
43
|
+
vin = args.first
|
31
44
|
|
32
|
-
exit_now!("
|
45
|
+
exit_now!(I18n.t("required"), 1) if vin.nil?
|
33
46
|
|
34
47
|
puts Vindetta::Decoder.decode_vin(vin).to_json
|
35
48
|
end
|
36
49
|
end
|
37
50
|
|
38
51
|
desc "Generates a random VIN"
|
52
|
+
|
39
53
|
command %i[generate g] do |c|
|
40
54
|
c.action do |_global, _options, _args|
|
41
55
|
puts Vindetta::Generator.generate
|
data/lib/vindetta/generator.rb
CHANGED
data/lib/vindetta/locale/en.yml
CHANGED
data/lib/vindetta/version.rb
CHANGED
data/vindetta.gemspec
CHANGED
@@ -25,16 +25,16 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_dependency "activemodel", "~> 5.1"
|
26
26
|
spec.add_dependency "activesupport", "~> 5.1"
|
27
27
|
spec.add_dependency "gli", "~> 2.16"
|
28
|
-
spec.add_dependency "i18n", "~> 0.
|
28
|
+
spec.add_dependency "i18n", "~> 0.9.1"
|
29
29
|
spec.add_dependency "httparty", "~> 0.15.6"
|
30
30
|
|
31
31
|
spec.add_development_dependency "bundler", "~> 1.14"
|
32
|
-
spec.add_development_dependency "
|
32
|
+
spec.add_development_dependency "factory_bot", "~> 4.8.2"
|
33
33
|
spec.add_development_dependency "guard-rspec", "~> 4.7.3"
|
34
34
|
spec.add_development_dependency "pry", "~> 0.10"
|
35
|
-
spec.add_development_dependency "rake", "~>
|
35
|
+
spec.add_development_dependency "rake", "~> 12.3.0"
|
36
36
|
spec.add_development_dependency "rspec", "~> 3.0"
|
37
37
|
spec.add_development_dependency "rubocop", "~> 0.49"
|
38
|
-
spec.add_development_dependency "webmock", "~> 3.
|
39
|
-
spec.add_development_dependency "vcr", "~>
|
38
|
+
spec.add_development_dependency "webmock", "~> 3.1.1"
|
39
|
+
spec.add_development_dependency "vcr", "~> 4.0.0"
|
40
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vindetta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyle Decot
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.9.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.9.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: httparty
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,19 +95,19 @@ dependencies:
|
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.14'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: factory_bot
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 4.8.
|
103
|
+
version: 4.8.2
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 4.8.
|
110
|
+
version: 4.8.2
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: guard-rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 12.3.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 12.3.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rspec
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,28 +184,28 @@ dependencies:
|
|
184
184
|
requirements:
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: 3.
|
187
|
+
version: 3.1.1
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: 3.
|
194
|
+
version: 3.1.1
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: vcr
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
198
198
|
requirements:
|
199
199
|
- - "~>"
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version:
|
201
|
+
version: 4.0.0
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
|
-
version:
|
208
|
+
version: 4.0.0
|
209
209
|
description: Ruby gem for generating VINs
|
210
210
|
email:
|
211
211
|
- kyle@joinroot.com
|