opto 1.5.1 → 1.5.2

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
  SHA1:
3
- metadata.gz: d82cd3ad90a9906318aca7572db5f59d1c094dbf
4
- data.tar.gz: e0930a914e3616434c14fe4e281efbebf7c427ea
3
+ metadata.gz: 469818920f19b0aa498df43ef2a9bb9efe13aa34
4
+ data.tar.gz: 78c94e65c48b602d14346252c015061fe78a3881
5
5
  SHA512:
6
- metadata.gz: cf04300dadf14338bc74a33f05ffe418ddc42dc722c0e8fd4210d52af763b292edc1a2fd8d758ff4d70207cc32e4d431c6f8d69decd817008b5ccd3bce9ce3dc
7
- data.tar.gz: d3a66ceed430d6588534c8a223c50c6aa88bf1816633249fa6731d5274969e02e6800a9a6746c9fa9cbc58d153576142f2f5ffd979d3da11214501f7fad43562
6
+ metadata.gz: ce178466bf44aa9d757db6753ff1b9976aaaafa303c31af143008281e06b8496ae9841d6af19b81d28f6f789df1b4d585d7ceb4accd1145a103b82c8ae1f403b
7
+ data.tar.gz: 34273a61230708482fc5067b8d985be327e1fa90fbe8d6c40c29e8112971bcca11bbc3f278ee6446461019aa49c703c286c09cf6a0db21058aba5593df4d57a5
data/README.md CHANGED
@@ -49,7 +49,8 @@ require 'opto'
49
49
  max_length: 30
50
50
  strip: true # remove leading / trailing whitespace
51
51
  upcase: true # make UPCASE
52
- env: FOO_USER # read value from ENV variable FOO_USER
52
+ from:
53
+ env: FOO_USER # read value from ENV variable FOO_USER
53
54
  ```
54
55
 
55
56
  ```yaml
@@ -340,6 +341,7 @@ Global validations:
340
341
  {
341
342
  min_length: nil, # minimum length
342
343
  max_length: nil, # maximum length
344
+ hexdigest: nil, # hexdigest output. options: md5, sha1, sha256, sha384 or sha512.
343
345
  empty_is_nil: true, # if string contains whitespace only, make value null
344
346
  encode_64: false, # encode content to base64
345
347
  decode_64: false, # decode content from base64
data/lib/opto/option.rb CHANGED
@@ -172,6 +172,8 @@ module Opto
172
172
  # @return [Opto::Type]
173
173
  def handler
174
174
  @handler ||= Type.for(type).new(type_options)
175
+ rescue StandardError => ex
176
+ raise ex, "#{name}: #{ex.message}"
175
177
  end
176
178
 
177
179
  # The value of this option. Will try to run resolvers.
data/lib/opto/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Opto
2
- VERSION = "1.5.1"
2
+ VERSION = "1.5.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kimmo Lehto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-05 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler