validation_matcher 1.0.0 → 1.1.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: de98d854184510bd58687a881a4b14e068b33e89
4
- data.tar.gz: 97e3b4b6095c15094531492229edfe76d684a2f5
3
+ metadata.gz: 13456c24a2ebf2497c63161e49a9aaf5f235c661
4
+ data.tar.gz: 484ba6b0a3c2553d29f6ed3e47c7a3ea734a62b7
5
5
  SHA512:
6
- metadata.gz: c1da6ff6c7ab8b46f64ada3b378ba846acbf985c60682c3d78c28b400042a0a9a597297a328629bfbca62feef5acf25933ebc8a2202801ee2b6cf73df6e3a75b
7
- data.tar.gz: 15976e84767843914bf21ecb4e986d29ad63a34e20211ac76c0d5ae5cf0b93d6da790c78ad001693c22cef85f8d8a77ecfe76d882d0dfd1559a55f674a60de64
6
+ metadata.gz: 40e3aa3d07cd480d49b5b0a0b9093c20695c8a81632795eb85b5aecf580c76944db1bc7317eedf0c4d672109d79a067035ca9bd1f231ef2d4af8f125c8c7fb20
7
+ data.tar.gz: 69d9c78790bd5f638744dd666f4256dcf45dbd7cfc74cbf708968363430d99027d8b261c46c3c40fcb645e353c584e00c7624fd8975f63a278fa53ce7a2df063
data/.travis.yml CHANGED
@@ -1,6 +1,12 @@
1
+ bundler_args: --without development
2
+
3
+ cache: bundler
4
+
5
+ language: ruby
6
+
1
7
  rvm:
2
- - 1.9.2
3
8
  - 1.9.3
4
9
  - 2.0.0
10
+ - 2.1.1
5
11
 
6
12
  script: bundle exec rspec spec
data/Gemfile CHANGED
@@ -1,4 +1,10 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in validation_matcher.gemspec
4
- gemspec
4
+ gemspec :development_group => :test
5
+
6
+ group :development do
7
+ # install the appropriate pry debug tool
8
+ gem 'pry-byebug', require: false, platform: 'ruby_20'
9
+ gem 'pry-debugger', require: false, platform: 'ruby_19'
10
+ end
data/README.md CHANGED
@@ -4,7 +4,7 @@ Validation Matcher [![build status][ci-image]][ci] [![code climate][cc-image]][c
4
4
  About
5
5
  -----
6
6
 
7
- Use Rails 3 validation reflection to test validations.
7
+ Use Rails validation reflection to test validations.
8
8
 
9
9
  URLs:
10
10
 
@@ -49,4 +49,4 @@ Usage
49
49
 
50
50
  <!-- images -->
51
51
  [cc-image]: https://codeclimate.com/github/BM5k/validation_matcher.png
52
- [ci-image]: https://secure.travis-ci.org/BM5k/validation_matcher.png?branch=master
52
+ [ci-image]: https://secure.travis-ci.org/BM5k/validation_matcher.svg?branch=master
@@ -1,6 +1,24 @@
1
1
  require 'validation_matcher/version'
2
2
  require 'rspec'
3
3
 
4
+ unless Hash.instance_methods.include?(:diff)
5
+ class Hash
6
+
7
+ # Stolen from Rails 4.0.5 since this has been removed!
8
+ #
9
+ # Returns a hash that represents the difference between two hashes.
10
+ #
11
+ # {1 => 2}.diff(1 => 2) # => {}
12
+ # {1 => 2}.diff(1 => 3) # => {1 => 2}
13
+ # {}.diff(1 => 2) # => {1 => 2}
14
+ # {1 => 2, 3 => 4}.diff(1 => 2) # => {3 => 4}
15
+ def diff other
16
+ dup.delete_if { |k, v| other[k] == v }.merge!(other.dup.delete_if { |k, v| has_key?(k) })
17
+ end
18
+
19
+ end
20
+ end
21
+
4
22
  module ValidationMatcher
5
23
 
6
24
  RSpec::Matchers.define :validate do |kind|
@@ -1,3 +1,3 @@
1
1
  module ValidationMatcher
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -19,11 +19,9 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ['lib']
20
20
 
21
21
  s.add_dependency 'rspec', '~> 2'
22
- s.add_dependency 'activemodel', '~> 3'
23
- s.add_dependency 'activesupport', '~> 3'
24
22
 
23
+ s.add_development_dependency 'activemodel', '>= 3'
25
24
  s.add_development_dependency 'rake'
26
25
  s.add_development_dependency 'pry'
27
26
  s.add_development_dependency 'pry-doc'
28
- s.add_development_dependency 'pry-debugger'
29
27
  end
metadata CHANGED
@@ -1,111 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validation_matcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BM5k
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-29 00:00:00.000000000 Z
11
+ date: 2014-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2'
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
26
  version: '2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activemodel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ~>
39
- - !ruby/object:Gem::Version
40
- version: '3'
41
- - !ruby/object:Gem::Dependency
42
- name: activesupport
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ~>
46
- - !ruby/object:Gem::Version
47
- version: '3'
48
- type: :runtime
34
+ type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - ~>
38
+ - - ">="
53
39
  - !ruby/object:Gem::Version
54
40
  version: '3'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rake
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - '>='
45
+ - - ">="
60
46
  - !ruby/object:Gem::Version
61
47
  version: '0'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - '>='
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: pry
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - '>='
59
+ - - ">="
74
60
  - !ruby/object:Gem::Version
75
61
  version: '0'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - '>='
66
+ - - ">="
81
67
  - !ruby/object:Gem::Version
82
68
  version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: pry-doc
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - '>='
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '>='
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: pry-debugger
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '>='
73
+ - - ">="
102
74
  - !ruby/object:Gem::Version
103
75
  version: '0'
104
76
  type: :development
105
77
  prerelease: false
106
78
  version_requirements: !ruby/object:Gem::Requirement
107
79
  requirements:
108
- - - '>='
80
+ - - ">="
109
81
  - !ruby/object:Gem::Version
110
82
  version: '0'
111
83
  description: Use reflection to spec ActiveModel validations
@@ -115,9 +87,9 @@ executables: []
115
87
  extensions: []
116
88
  extra_rdoc_files: []
117
89
  files:
118
- - .gitignore
119
- - .rspec
120
- - .travis.yml
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".travis.yml"
121
93
  - Gemfile
122
94
  - README.md
123
95
  - Rakefile
@@ -135,17 +107,17 @@ require_paths:
135
107
  - lib
136
108
  required_ruby_version: !ruby/object:Gem::Requirement
137
109
  requirements:
138
- - - '>='
110
+ - - ">="
139
111
  - !ruby/object:Gem::Version
140
112
  version: '0'
141
113
  required_rubygems_version: !ruby/object:Gem::Requirement
142
114
  requirements:
143
- - - '>='
115
+ - - ">="
144
116
  - !ruby/object:Gem::Version
145
117
  version: '0'
146
118
  requirements: []
147
119
  rubyforge_project: validation_matcher
148
- rubygems_version: 2.1.5
120
+ rubygems_version: 2.2.2
149
121
  signing_key:
150
122
  specification_version: 4
151
123
  summary: RSpec matcher for ActiveModel validations