validates_overlap 0.8.1 → 0.8.2

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: 03d095c00004db43b1b61ae30b0de3df1f7ca9b6
4
- data.tar.gz: 0f1df2c05348e4e972011eb36a9a969b02907f34
3
+ metadata.gz: 1772233fdb3f2ca60d51a043c16c4ba7262315f0
4
+ data.tar.gz: 0de150f4239778eeec8ee3d8e282dc5e1dcc255a
5
5
  SHA512:
6
- metadata.gz: 0730c4937d1ac05b221c96328bbd9dee9795352a0c62792921202ef7ba435ac395e01f5e66ffe7ec03c159848003642811330f17456b957e2c44e891d70771e5
7
- data.tar.gz: ec70192d3ba6a7633395a5ef3f036de336730fc9dc8d52655574de76b24e4af3328b9a85d27c5678fa03a82dfe975a2ff190aface62b023002aaaa9cc774a02e
6
+ metadata.gz: e973e5fe6f7136bea964215b8ce8cef173fa143febf8ba782ba85a6e47c50d23517e4acb076bc1e1a1d3161b2a7c1fb62f752d610f2bba62c5d6295910409a84
7
+ data.tar.gz: 2e4b0ae239225a3128c0855db6da2f87619e19d96d0b1df28c741d04333ef83bef1111adca6d8efec05642f5698f43d3a3c808699fc85d7fd225913ac0bcbfe5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.1
1
+ 0.8.2
@@ -187,7 +187,7 @@ class OverlapValidator < ActiveModel::EachValidator
187
187
  end
188
188
 
189
189
  def implement_enum?
190
- (ActiveRecord::VERSION::MAJOR > 5) || (ActiveRecord::VERSION::MAJOR > 4 && ActiveRecord::VERSION::MINOR > 1)
190
+ (ActiveRecord::VERSION::MAJOR >= 5) || (ActiveRecord::VERSION::MAJOR > 4 && ActiveRecord::VERSION::MINOR > 1)
191
191
  end
192
192
 
193
193
  # Allow to use scope, joins, includes methods before querying
@@ -3,7 +3,7 @@ class DocumentWithEnum < ActiveRecord::Base
3
3
  KINDS = [:contract, :fact, :draft]
4
4
 
5
5
 
6
- if (ActiveRecord::VERSION::MAJOR > 5) || (ActiveRecord::VERSION::MAJOR > 4 && ActiveRecord::VERSION::MINOR > 1)
6
+ if (ActiveRecord::VERSION::MAJOR >= 5) || (ActiveRecord::VERSION::MAJOR > 4 && ActiveRecord::VERSION::MINOR > 1)
7
7
  enum kind: KINDS
8
8
  else
9
9
  # Simulate enum functionality implemented in rails 4.1 and 5
@@ -47,7 +47,7 @@ describe DocumentWithEnum do
47
47
  it 'save and read attribute properly' do
48
48
  docuemnt = FactoryGirl.create(:document_with_enum, kind: :contract)
49
49
  docuemnt.reload
50
- expect(docuemnt.kind).to eq :contract
50
+ expect(docuemnt.kind.to_s).to eq "contract"
51
51
  end
52
52
  end
53
53
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validates_overlap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robin Bortlik