specstar-models 0.2.1 → 0.2.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/specstar/models.rb +3 -3
  3. metadata +14 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b065846863af4226a3ab27f23beeb016cac032f
4
- data.tar.gz: ea4bd2771757700817bd2b3396c83b850fd2164f
3
+ metadata.gz: a395c33cad9f0fbc979bd33b1d7a43a3eb196e4e
4
+ data.tar.gz: e701ceb6ad5eeb5ef1b769db321fdd500556413f
5
5
  SHA512:
6
- metadata.gz: 12403958e0e596f8a1661bd636a2376f45e11aa348e5f6ba25170d7f618f3543646ee61f2a130ba521a91318f25aacb13c8dc342c02e420239400c2447bf9d25
7
- data.tar.gz: 6c7da052912ab9798776ff0b49ee9f49d49313257ea88cd5081501a047cb1dd70151f7d9a44aaaeb3a51f25a6a06efd2b7ebb62fb84aa620b134b65a383c9774
6
+ metadata.gz: 343c163ba5cf9c005ccf7404f9ecbc982daac7363211c0f310e8209de3a25198f3f663ddf09881a2aee5b646289695c697bf47bbec6eb91f238ddffab0d1493b
7
+ data.tar.gz: a874b18c046fcf18013bc4a2e9336ea7925f440fba676f66f7e65058460b06d1d817521e1262c32b137900d074db30a8a574f520b8b3cfe0a865c0d7b65020b8
@@ -85,7 +85,7 @@ module Specstar
85
85
  match do |model|
86
86
  (has_attribute?(model, attr) || has_association?(model, attr)) &&
87
87
  model._validators[attr.to_sym].select do |validator|
88
- validator.instance_of?(ActiveModel::Validations::PresenceValidator) && (options.nil? || validate_presence_of_methods_in_options(model, options) && (options.to_a - validator.options.to_a).empty?)
88
+ validator.instance_of?(ActiveRecord::Validations::PresenceValidator) && (options.nil? || validate_presence_of_methods_in_options(model, options) && (options.to_a - validator.options.to_a).empty?)
89
89
  end.size > 0
90
90
  end
91
91
 
@@ -126,7 +126,7 @@ module Specstar
126
126
  match do |model|
127
127
  (has_attribute?(model, attr) || has_association?(model, attr)) &&
128
128
  model._validators[attr].select do |validator|
129
- validator.instance_of?(ActiveModel::Validations::InclusionValidator) && validator.options.merge(options) == validator.options
129
+ validator.instance_of?(ActiveRecord::Validations::InclusionValidator) && validator.options.merge(options) == validator.options
130
130
  end.size > 0
131
131
  end
132
132
 
@@ -145,7 +145,7 @@ module Specstar
145
145
  match do |model|
146
146
  (has_attribute?(model, attr) || has_association?(model, attr)) &&
147
147
  model._validators[attr].select do |validator|
148
- validator.instance_of?(ActiveModel::Validations::NumericalityValidator) && validator.options.merge(options) == validator.options
148
+ validator.instance_of?(ActiveRecord::Validations::NumericalityValidator) && validator.options.merge(options) == validator.options
149
149
  end.size > 0
150
150
  end
151
151
 
metadata CHANGED
@@ -1,44 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specstar-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sujoy Gupta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-25 00:00:00.000000000 Z
11
+ date: 2015-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '3.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec-expectations
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '3.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
41
- description:
40
+ version: '3.1'
41
+ description: This gem provides RSpec matchers for model attributes and validators.
42
42
  email: sujoyg@gmail.com
43
43
  executables: []
44
44
  extensions: []
@@ -55,17 +55,17 @@ require_paths:
55
55
  - lib
56
56
  required_ruby_version: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - '>='
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  requirements:
63
- - - '>='
63
+ - - ">="
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
67
  rubyforge_project:
68
- rubygems_version: 2.1.4
68
+ rubygems_version: 2.2.2
69
69
  signing_key:
70
70
  specification_version: 4
71
71
  summary: RSpec helpers for models.