yano 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +3 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -1
- data/lib/yano.rb +3 -3
- data/lib/yano/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e01b9cfd500df508bdaa190ee253ff244177eb7f557ac9c4d085e3e64afab34
|
4
|
+
data.tar.gz: 724d7c0ee6624c6b8b1bfd5a0ebc174701dba010fbd8d998e7623c4353c92b7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97091e2612df1e552d438269d6bd91c4711f9407cb683bbe45031e165e8f3c3421b57b739bd78e4b335645bc341981b9e462b993af3ad7a957f3cdabb92f3daa
|
7
|
+
data.tar.gz: 8c5e052ae6812e80dfec6d0e2377b82571ebeed452eea40385bba811d2a779988f89a03aff65ef800122b133b239ac7b43791a98c065a7c383fb2a74cca74914
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/lib/yano.rb
CHANGED
@@ -4,13 +4,13 @@ require 'yano/version'
|
|
4
4
|
require 'yano/lenient'
|
5
5
|
|
6
6
|
module Yano
|
7
|
-
VALID_YES_VALUE = /^(y|yes|true|1)$/i
|
8
|
-
VALID_NO_VALUE = /^(n|no|false|0)$/i
|
7
|
+
VALID_YES_VALUE = /^(y|yes|true|1)$/i.freeze
|
8
|
+
VALID_NO_VALUE = /^(n|no|false|0)$/i.freeze
|
9
9
|
|
10
10
|
def self.parse(val, opts = {})
|
11
11
|
val = val.to_s.strip
|
12
|
-
return Lenient.check_lenient_values(val) if opts.delete(:lenient)
|
13
12
|
return true if val =~ VALID_YES_VALUE
|
14
13
|
return false if val =~ VALID_NO_VALUE
|
14
|
+
return Lenient.check_lenient_values(val) if opts.delete(:lenient)
|
15
15
|
end
|
16
16
|
end
|
data/lib/yano/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Palaniuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -61,8 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
|
-
|
65
|
-
rubygems_version: 2.7.6
|
64
|
+
rubygems_version: 3.0.3
|
66
65
|
signing_key:
|
67
66
|
specification_version: 4
|
68
67
|
summary: Parse yes/no like values, useful for CLI prompts
|