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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8c3c1664cd21178b5a13bd8c5232476f2ce00304a228a80e76cc55f978864bc
4
- data.tar.gz: 3780633c1390da38836dda8e2fefc0f5c14960cd844ee0d1e7791f34aad17f6c
3
+ metadata.gz: 2e01b9cfd500df508bdaa190ee253ff244177eb7f557ac9c4d085e3e64afab34
4
+ data.tar.gz: 724d7c0ee6624c6b8b1bfd5a0ebc174701dba010fbd8d998e7623c4353c92b7f
5
5
  SHA512:
6
- metadata.gz: d62a6054705233a06c5489d806227fa5e291806067ca5cf76cb297c0441c76b052ea1151203a99fd046affaed6d378a8a279e8f1d42d3453a74a958eb44edab3
7
- data.tar.gz: a4ec229d570d5071b7f5f04cdf14d9b546b045932dcf14663b90af6dd1d81b65317b872b72e5c14fbf0218ed2f36fe3c66b321f3c02486fb07b97cf4500ae73a
6
+ metadata.gz: 97091e2612df1e552d438269d6bd91c4711f9407cb683bbe45031e165e8f3c3421b57b739bd78e4b335645bc341981b9e462b993af3ad7a957f3cdabb92f3daa
7
+ data.tar.gz: 8c5e052ae6812e80dfec6d0e2377b82571ebeed452eea40385bba811d2a779988f89a03aff65ef800122b133b239ac7b43791a98c065a7c383fb2a74cca74914
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
@@ -3,3 +3,6 @@ Metrics:
3
3
 
4
4
  Style/Documentation:
5
5
  Enabled: false
6
+
7
+ Layout/LineLength:
8
+ Enabled: false
data/Gemfile CHANGED
@@ -2,8 +2,12 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
+ gem 'rake'
6
+
5
7
  group :test do
8
+ gem 'pry'
6
9
  gem 'rspec'
10
+ gem 'rubocop'
7
11
  end
8
12
 
9
13
  gemspec
data/Rakefile CHANGED
@@ -7,4 +7,4 @@ require 'rubocop/rake_task'
7
7
  RSpec::Core::RakeTask.new(:spec)
8
8
  RuboCop::RakeTask.new
9
9
 
10
- task default: %i[spec]
10
+ task default: %i[spec rubocop:auto_correct]
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Yano
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
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
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: 2018-08-26 00:00:00.000000000 Z
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
- rubyforge_project:
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