optionable 0.1.0 → 0.1.1

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: 05abcff0632b217f377d6b25eca962591f2e6b0f
4
- data.tar.gz: c64a040f884e222841a93e796194e3648b17aeab
3
+ metadata.gz: 198b619f4a71038fcb8f5d2b7b0beb81d393f408
4
+ data.tar.gz: f5d4a0df739bc012faa4e5edd3f646f0c857af6d
5
5
  SHA512:
6
- metadata.gz: c9a204f1685ea3090b229f4d54e5c926d99b9810d75cb3d76a3ae28c59da5768363d34942e2a62bddbfbf601f1976aed9ad40de91249b3bd8338815256161a14
7
- data.tar.gz: f5655b60fb44aaf901a63d2abcf41bd3be2aaca506fb72d0a67dbbbb250eb50df49d0107218ebdbd92b6dbbb684cca70cb8e0eb1c7f4e6fd53d9f72564b97a97
6
+ metadata.gz: e34e673ddc316c189d90b07e557b70574f6e7f80cb4c234deb002bd8df6cdd9b2ddd697c619ef1557a4effb086aa69c867e61052d7c9e75e982ceebb9cf65318
7
+ data.tar.gz: 9bfe6a413779ad23accb7991aef7919cf59cb43a80908f00e4a2b073d1ae0b21e06a9e0712fcfc9023cc1e5263ed4d357b44840df49ed3c5a09d650ee448f5b8
@@ -68,7 +68,7 @@ module Optionable
68
68
  # @since 0.0.0
69
69
  def match?(value)
70
70
  allowed_values.any? do |allowed|
71
- value == allowed
71
+ allowed == value
72
72
  end
73
73
  end
74
74
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Optionable
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
@@ -11,6 +11,7 @@ describe Optionable do
11
11
  option(:update).allow(int: Optionable.any(Integer))
12
12
  option(:update).allow(str: "exact")
13
13
  option(:update).allow(flt: 10.5)
14
+ option(:name).allow(Optionable.any(String))
14
15
 
15
16
  def initialize(options = {})
16
17
  validate_strict(options)
@@ -58,7 +59,8 @@ describe Optionable do
58
59
 
59
60
  it "does not raise an error for correct type" do
60
61
  expect {
61
- Model.new(write: 10)
62
+ # Model.new(write: 10)
63
+ Model.new(name: "test")
62
64
  }.to_not raise_error
63
65
  end
64
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optionable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Durran Jordan