maybe_so 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f804350c62df7af2cf73422bfaa3a9cc219ce8a5
4
- data.tar.gz: 0f5a5092a9149b39f1660f820f0cdd5ec1151a24
3
+ metadata.gz: 961792b671a9c7a12cd2e3c930300b421ff001da
4
+ data.tar.gz: 3aaf43a8af889c5fec7621031a9aa1346a811569
5
5
  SHA512:
6
- metadata.gz: 0b7105d8f3f7e5a756b4169687f7d5f820f219f5660ddf5c22ff949a0c017ceed22f71e73f787e9d7c084d51882f71e3f239f2a61da9b915074f102a49f4b090
7
- data.tar.gz: 6aa63ce3a34660f2ba0b01e0741774ff87b67ad7d861570a70dec5e88e79cf8fcd1a5f69a78347a1d984afd198e6b332f4b72c91ff5efe0b3714293c97dabe87
6
+ metadata.gz: 7b9bdbaf236de2cdf5aa8eee9f971d266a6c2eac14857299a4912d6a9d4f23d36cec812f04a007b9af6aa838216d0fabc1c30ea4818b15fbb2464deb245177a1
7
+ data.tar.gz: 2491a28268c8d3ab544cf06258c50c285211e540e038b07ce6ca5de030ad947c5495d3a61770af0d685189521cb3c0a6621fcc90faca2d7b7cf12c8a5739dde6
@@ -31,7 +31,7 @@ module MaybeSo
31
31
  # assignment.
32
32
  unless skip_validator
33
33
  instance_eval do
34
- validates_inclusion_of attribute.to_sym, in: [true, false]
34
+ validates_inclusion_of attribute.to_sym, in: [true, false], allow_blank: true
35
35
  end
36
36
  end
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module MaybeSo
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -2,8 +2,12 @@ require "spec_helper"
2
2
 
3
3
  describe MaybeSo::ActiveModel::BooleanAttribute do
4
4
  before do
5
- @klass = Class.new
6
- @klass.send(:include, ActiveModel::Model)
5
+ @klass = Class.new do
6
+ def self.name
7
+ "Bazinga"
8
+ end
9
+ include ActiveModel::Model
10
+ end
7
11
  end
8
12
 
9
13
  it "has the #boolean_attribute method on the class" do
@@ -56,6 +60,9 @@ describe MaybeSo::ActiveModel::BooleanAttribute do
56
60
  expect(@record.hidden).to eq(false)
57
61
  end
58
62
 
63
+ it "is a valid record without setting anything" do
64
+ expect(@record).to be_valid
65
+ end
59
66
  end
60
67
  end
61
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maybe_so
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Miller