validation_matcher 1.1.0 → 2.0.0

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: 13456c24a2ebf2497c63161e49a9aaf5f235c661
4
- data.tar.gz: 484ba6b0a3c2553d29f6ed3e47c7a3ea734a62b7
3
+ metadata.gz: 6317b7828b8591caf64ffeed93606045fd4ce25d
4
+ data.tar.gz: 6a55e8db45b52cc2635b170e3f759dc561547752
5
5
  SHA512:
6
- metadata.gz: 40e3aa3d07cd480d49b5b0a0b9093c20695c8a81632795eb85b5aecf580c76944db1bc7317eedf0c4d672109d79a067035ca9bd1f231ef2d4af8f125c8c7fb20
7
- data.tar.gz: 69d9c78790bd5f638744dd666f4256dcf45dbd7cfc74cbf708968363430d99027d8b261c46c3c40fcb645e353c584e00c7624fd8975f63a278fa53ce7a2df063
6
+ metadata.gz: 51a29945a76cdb46fcb7538f4769a81edc737425153c31feef679aad0657e1668243addaf50e1a69f96323581fa4f18243108666575004d8aef0c3c5345b9d9a
7
+ data.tar.gz: 2873dc12ef33c3f768497dc54db7e11b890e572a39025d287524ded92879bc9bf720ea20daf021b071f80c0135af6019416481089d9f5eb93e133940ace1865e
data/.travis.yml CHANGED
@@ -7,6 +7,9 @@ language: ruby
7
7
  rvm:
8
8
  - 1.9.3
9
9
  - 2.0.0
10
- - 2.1.1
10
+ - 2.1.4
11
+ - 2.2.0
11
12
 
12
13
  script: bundle exec rspec spec
14
+
15
+ sudo: false
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
- Validation Matcher [![build status][ci-image]][ci] [![code climate][cc-image]][cc]
2
- ==================================================================================
1
+ Validation Matcher [![code climate][cc-image]][cc] [![build status][ci-image]][ci] [![gem version][gem-image]][gem]
2
+ ===================================================================================================================
3
3
 
4
4
  About
5
5
  -----
@@ -21,6 +21,9 @@ Add to your Gemfile and run the `bundle` command to install it.
21
21
  gem 'validation_matcher'
22
22
  ```
23
23
 
24
+ - specify '~> 1.1.0' for rails 4 & rspec 2
25
+ - specify '~> 1.0.0' for rails 3 & rspec 2
26
+
24
27
  **Requires Ruby 1.9.2 or later.**
25
28
 
26
29
  Usage
@@ -46,7 +49,9 @@ Usage
46
49
  <!-- links -->
47
50
  [cc]: https://codeclimate.com/github/BM5k/validation_matcher "code climate"
48
51
  [ci]: http://travis-ci.org/BM5k/validation_matcher "build status"
52
+ [gem]: http://badge.fury.io/rb/validation_matcher "gem version"
49
53
 
50
54
  <!-- images -->
51
- [cc-image]: https://codeclimate.com/github/BM5k/validation_matcher.png
55
+ [cc-image]: https://codeclimate.com/github/BM5k/validation_matcher.svg
52
56
  [ci-image]: https://secure.travis-ci.org/BM5k/validation_matcher.svg?branch=master
57
+ [gem-image]:https://badge.fury.io/rb/validation_matcher.svg
@@ -1,3 +1,3 @@
1
1
  module ValidationMatcher
2
- VERSION = '1.1.0'
2
+ VERSION = '2.0.0'
3
3
  end
@@ -1,5 +1,5 @@
1
1
  require 'validation_matcher/version'
2
- require 'rspec'
2
+ require 'rspec/expectations'
3
3
 
4
4
  unless Hash.instance_methods.include?(:diff)
5
5
  class Hash
@@ -33,11 +33,11 @@ module ValidationMatcher
33
33
  msg
34
34
  end
35
35
 
36
- failure_message_for_should do
36
+ failure_message do
37
37
  "Expected #{ described_class } to validate the #{ kind } of #{ @field.inspect } #{ diff }"
38
38
  end
39
39
 
40
- failure_message_for_should_not do
40
+ failure_message_when_negated do
41
41
  "Expected #{ described_class } not to validate the #{ kind } of #{ @field.inspect } #{ diff }"
42
42
  end
43
43
 
@@ -46,7 +46,7 @@ module ValidationMatcher
46
46
  end
47
47
 
48
48
  def validator
49
- @validator ||= actual.class.validators_on(@field).detect { |v| @expected.include? v.kind }
49
+ @validator ||= actual.class.validators_on(@field).detect { |v| expected == v.kind }
50
50
  end
51
51
 
52
52
  def validator_options
@@ -18,10 +18,11 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
19
  s.require_paths = ['lib']
20
20
 
21
- s.add_dependency 'rspec', '~> 2'
21
+ s.add_dependency 'rspec-expectations', '~> 3.1'
22
22
 
23
23
  s.add_development_dependency 'activemodel', '>= 3'
24
- s.add_development_dependency 'rake'
25
24
  s.add_development_dependency 'pry'
26
25
  s.add_development_dependency 'pry-doc'
26
+ s.add_development_dependency 'rake'
27
+ s.add_development_dependency 'rspec'
27
28
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validation_matcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BM5k
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-06 00:00:00.000000000 Z
11
+ date: 2014-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rspec
14
+ name: rspec-expectations
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2'
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: '2'
26
+ version: '3.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: pry
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: pry
56
+ name: pry-doc
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,21 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: pry-doc
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ">="
@@ -117,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
131
  version: '0'
118
132
  requirements: []
119
133
  rubyforge_project: validation_matcher
120
- rubygems_version: 2.2.2
134
+ rubygems_version: 2.4.2
121
135
  signing_key:
122
136
  specification_version: 4
123
137
  summary: RSpec matcher for ActiveModel validations