rspec-resembles_json_matchers 0.5.0 → 0.5.2

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: 85c0060d722ce75ef9a360088d85b78f095cb7c0
4
- data.tar.gz: f51a19065d79d805b34f6745f494691379527538
3
+ metadata.gz: f4c1ec81c8d6ae7ed032c6c0fe6e570a4512e4cd
4
+ data.tar.gz: cae15755e1911db877633730b1ae0b4a0d6a36ba
5
5
  SHA512:
6
- metadata.gz: a2a0c803b0fa775e02f5077b76df085adbc1b065ffea9b11902a927c3600b2e891b44d6d256d2b6866fdcf067921f9c284ada4a2f158863d81fda0773e0c395b
7
- data.tar.gz: 7a402c3ca3573eeff8861b557ee7587affaf5cdf2049be860cc0af04eb2c81a57ff9a8a3156ffb46f4a958eea2de47ef2b48cfb421ebed699b125cdb0e77a816
6
+ metadata.gz: 895433b102df8420119a4daa125372224362f9e1920467f07ef67c4951ca0012432ca202617c29d3fcfe5adf75e320162da35b1c63990e7ed859e37305a4faaa
7
+ data.tar.gz: fcf3df9031572d5c4f22d7ed5cb382a17fe99a82e3652defaaaf05ebe2f249113b48351cf991bf36a90f4deca8720719d2629dd658f375bbdebb5e63fc3fa7b4
data/.travis.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.2
4
- - 2.3.0
3
+ - 2.3.1
5
4
  - ruby-head
6
5
  before_install: gem install bundler -v 1.11.2
7
6
  gemfile:
7
+ - gemfiles/rails_32.gemfile
8
8
  - gemfiles/rails_42.gemfile
9
9
  - gemfiles/rails_42_rspec_33.gemfile
10
10
  - gemfiles/rails_5.gemfile
data/Appraisals CHANGED
@@ -1,3 +1,7 @@
1
+ appraise "rails-32" do
2
+ gem "rails", "~> 3.2.0"
3
+ end
4
+
1
5
  appraise "rails-42" do
2
6
  gem "rails", "~> 4.2.0"
3
7
  gem "rspec", "~> 3.4.0"
data/Changelog.md ADDED
@@ -0,0 +1,9 @@
1
+
2
+ # 0.5.2
3
+
4
+ - Fix an error that was included in master by mistake
5
+
6
+ # 0.5.1 (yanked)
7
+
8
+ - Add support for Rails 3.2 by monkey-patching String#index if it's not already
9
+
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.2.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,160 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ rspec-resembles_json_matchers (0.5.0)
5
+ activesupport (>= 3.0)
6
+ rspec (>= 2.0, < 4.0.0.a)
7
+ rspec-expectations (>= 2.0, < 4.0.0.a)
8
+
9
+ GEM
10
+ remote: https://rubygems.org/
11
+ specs:
12
+ actionmailer (3.2.22.2)
13
+ actionpack (= 3.2.22.2)
14
+ mail (~> 2.5.4)
15
+ actionpack (3.2.22.2)
16
+ activemodel (= 3.2.22.2)
17
+ activesupport (= 3.2.22.2)
18
+ builder (~> 3.0.0)
19
+ erubis (~> 2.7.0)
20
+ journey (~> 1.0.4)
21
+ rack (~> 1.4.5)
22
+ rack-cache (~> 1.2)
23
+ rack-test (~> 0.6.1)
24
+ sprockets (~> 2.2.1)
25
+ activemodel (3.2.22.2)
26
+ activesupport (= 3.2.22.2)
27
+ builder (~> 3.0.0)
28
+ activerecord (3.2.22.2)
29
+ activemodel (= 3.2.22.2)
30
+ activesupport (= 3.2.22.2)
31
+ arel (~> 3.0.2)
32
+ tzinfo (~> 0.3.29)
33
+ activeresource (3.2.22.2)
34
+ activemodel (= 3.2.22.2)
35
+ activesupport (= 3.2.22.2)
36
+ activesupport (3.2.22.2)
37
+ i18n (~> 0.6, >= 0.6.4)
38
+ multi_json (~> 1.0)
39
+ appraisal (2.1.0)
40
+ bundler
41
+ rake
42
+ thor (>= 0.14.0)
43
+ arel (3.0.3)
44
+ awesome_print (1.7.0)
45
+ builder (3.0.4)
46
+ coderay (1.1.1)
47
+ diff-lcs (1.2.5)
48
+ erubis (2.7.0)
49
+ ffi (1.9.14)
50
+ formatador (0.2.5)
51
+ guard (2.14.0)
52
+ formatador (>= 0.2.4)
53
+ listen (>= 2.7, < 4.0)
54
+ lumberjack (~> 1.0)
55
+ nenv (~> 0.1)
56
+ notiffany (~> 0.0)
57
+ pry (>= 0.9.12)
58
+ shellany (~> 0.0)
59
+ thor (>= 0.18.1)
60
+ guard-compat (1.2.1)
61
+ guard-rspec (4.7.3)
62
+ guard (~> 2.1)
63
+ guard-compat (~> 1.1)
64
+ rspec (>= 2.99.0, < 4.0)
65
+ hike (1.2.3)
66
+ i18n (0.7.0)
67
+ journey (1.0.4)
68
+ json (1.8.3)
69
+ listen (3.1.5)
70
+ rb-fsevent (~> 0.9, >= 0.9.4)
71
+ rb-inotify (~> 0.9, >= 0.9.7)
72
+ ruby_dep (~> 1.2)
73
+ lumberjack (1.0.10)
74
+ mail (2.5.4)
75
+ mime-types (~> 1.16)
76
+ treetop (~> 1.4.8)
77
+ method_source (0.8.2)
78
+ mime-types (1.25.1)
79
+ multi_json (1.12.1)
80
+ nenv (0.3.0)
81
+ notiffany (0.1.1)
82
+ nenv (~> 0.1)
83
+ shellany (~> 0.0)
84
+ polyglot (0.3.5)
85
+ pry (0.10.4)
86
+ coderay (~> 1.1.0)
87
+ method_source (~> 0.8.1)
88
+ slop (~> 3.4)
89
+ rack (1.4.7)
90
+ rack-cache (1.6.1)
91
+ rack (>= 0.4)
92
+ rack-ssl (1.3.4)
93
+ rack
94
+ rack-test (0.6.3)
95
+ rack (>= 1.0)
96
+ rails (3.2.22.2)
97
+ actionmailer (= 3.2.22.2)
98
+ actionpack (= 3.2.22.2)
99
+ activerecord (= 3.2.22.2)
100
+ activeresource (= 3.2.22.2)
101
+ activesupport (= 3.2.22.2)
102
+ bundler (~> 1.0)
103
+ railties (= 3.2.22.2)
104
+ railties (3.2.22.2)
105
+ actionpack (= 3.2.22.2)
106
+ activesupport (= 3.2.22.2)
107
+ rack-ssl (~> 1.3.2)
108
+ rake (>= 0.8.7)
109
+ rdoc (~> 3.4)
110
+ thor (>= 0.14.6, < 2.0)
111
+ rake (10.5.0)
112
+ rb-fsevent (0.9.7)
113
+ rb-inotify (0.9.7)
114
+ ffi (>= 0.5.0)
115
+ rdoc (3.12.2)
116
+ json (~> 1.4)
117
+ rspec (3.5.0)
118
+ rspec-core (~> 3.5.0)
119
+ rspec-expectations (~> 3.5.0)
120
+ rspec-mocks (~> 3.5.0)
121
+ rspec-core (3.5.3)
122
+ rspec-support (~> 3.5.0)
123
+ rspec-expectations (3.5.0)
124
+ diff-lcs (>= 1.2.0, < 2.0)
125
+ rspec-support (~> 3.5.0)
126
+ rspec-mocks (3.5.0)
127
+ diff-lcs (>= 1.2.0, < 2.0)
128
+ rspec-support (~> 3.5.0)
129
+ rspec-support (3.5.0)
130
+ ruby_dep (1.4.0)
131
+ shellany (0.0.1)
132
+ slop (3.6.0)
133
+ sprockets (2.2.3)
134
+ hike (~> 1.2)
135
+ multi_json (~> 1.0)
136
+ rack (~> 1.0)
137
+ tilt (~> 1.1, != 1.3.0)
138
+ thor (0.19.1)
139
+ tilt (1.4.1)
140
+ treetop (1.4.15)
141
+ polyglot
142
+ polyglot (>= 0.3.1)
143
+ tzinfo (0.3.46)
144
+
145
+ PLATFORMS
146
+ ruby
147
+
148
+ DEPENDENCIES
149
+ appraisal
150
+ awesome_print
151
+ bundler (~> 1.11)
152
+ guard
153
+ guard-rspec
154
+ rails (~> 3.2.0)
155
+ rake (~> 10.0)
156
+ rspec (~> 3.0)
157
+ rspec-resembles_json_matchers!
158
+
159
+ BUNDLED WITH
160
+ 1.12.5
@@ -1,4 +1,3 @@
1
- require "active_support/core_ext/string/indent" # indent
2
1
  require "active_support/core_ext/hash/keys" # stringify_keys
3
2
 
4
3
  require "json"
@@ -81,5 +80,3 @@ module RSpec::ResemblesJsonMatchers
81
80
 
82
81
  end
83
82
  end
84
-
85
-
@@ -1,5 +1,3 @@
1
- require "active_support/core_ext/string/indent" # indent
2
-
3
1
  module RSpec::ResemblesJsonMatchers
4
2
  class ResemblesHashMatcher
5
3
  include Helpers
@@ -0,0 +1,22 @@
1
+ module RSpec
2
+ module ResemblesJsonMatchers
3
+ module StringIndent
4
+ def indent!(amount, indent_string = nil, indent_empty_lines = false)
5
+ indent_string = indent_string || self[/^[ \t]/] || ' '
6
+ re = indent_empty_lines ? /^/ : /^(?!$)/
7
+ gsub!(re, indent_string * amount)
8
+ end
9
+
10
+ def indent(amount, indent_string = nil, indent_empty_lines = false)
11
+ dup.tap { |me| me.indent!(amount, indent_string, indent_empty_lines) }
12
+ end
13
+ end
14
+ end
15
+ end
16
+
17
+ # String#indent was added in ActiveSupport 4 and appears here in order to support ActiveSupport 3
18
+ begin
19
+ require "active_support/core_ext/string/indent" # indent
20
+ rescue LoadError
21
+ String.send(:include, RSpec::ResemblesJsonMatchers::StringIndent)
22
+ end
@@ -1,5 +1,5 @@
1
1
  module Rspec
2
2
  module ResemblesJsonMatchers
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.2"
4
4
  end
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require "rspec/resembles_json_matchers/version"
2
+ require "rspec/resembles_json_matchers/string_indent"
2
3
 
3
4
  module RSpec
4
5
  module ResemblesJsonMatchers
@@ -50,7 +51,7 @@ module RSpec
50
51
  end
51
52
 
52
53
  def self.resembles_matcher_for(expected, **a)
53
- resembles_matcher_candidates.detect { |candidate| candidate.can_match?(expected) }
54
+ resembles_matcher_candidates.detect { |candidate| candidate.can_match?(expected) } || raise("No matcher available for #{expected.inspect}")
54
55
  end
55
56
 
56
57
  end
@@ -35,5 +35,5 @@ Gem::Specification.new do |spec|
35
35
 
36
36
  spec.add_runtime_dependency "rspec", ">= 2.0", "< 4.0.0.a"
37
37
  spec.add_runtime_dependency "rspec-expectations", ">= 2.0", "< 4.0.0.a"
38
- spec.add_runtime_dependency "activesupport", ">= 4.0" # For String#indent
38
+ spec.add_runtime_dependency "activesupport", ">= 3.0" # For core extensions
39
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-resembles_json_matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Sadauskas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-24 00:00:00.000000000 Z
11
+ date: 2016-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,14 +154,14 @@ dependencies:
154
154
  requirements:
155
155
  - - ">="
156
156
  - !ruby/object:Gem::Version
157
- version: '4.0'
157
+ version: '3.0'
158
158
  type: :runtime
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
161
161
  requirements:
162
162
  - - ">="
163
163
  - !ruby/object:Gem::Version
164
- version: '4.0'
164
+ version: '3.0'
165
165
  description:
166
166
  email:
167
167
  - psadauskas@gmail.com
@@ -173,11 +173,14 @@ files:
173
173
  - ".rspec"
174
174
  - ".travis.yml"
175
175
  - Appraisals
176
+ - Changelog.md
176
177
  - Gemfile
177
178
  - Guardfile
178
179
  - README.md
179
180
  - Rakefile
180
181
  - examples/example_spec.rb
182
+ - gemfiles/rails_32.gemfile
183
+ - gemfiles/rails_32.gemfile.lock
181
184
  - gemfiles/rails_42.gemfile
182
185
  - gemfiles/rails_42.gemfile.lock
183
186
  - gemfiles/rails_42_rspec_33.gemfile
@@ -198,6 +201,7 @@ files:
198
201
  - lib/rspec/resembles_json_matchers/resembles_numeric_matcher.rb
199
202
  - lib/rspec/resembles_json_matchers/resembles_route_matcher.rb
200
203
  - lib/rspec/resembles_json_matchers/resembles_string_matcher.rb
204
+ - lib/rspec/resembles_json_matchers/string_indent.rb
201
205
  - lib/rspec/resembles_json_matchers/version.rb
202
206
  - rspec-resembles_json_matchers.gemspec
203
207
  homepage: https://github.com/paul/rspec-resembles_json_matchers
@@ -219,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
223
  version: '0'
220
224
  requirements: []
221
225
  rubyforge_project:
222
- rubygems_version: 2.5.1
226
+ rubygems_version: 2.6.6
223
227
  signing_key:
224
228
  specification_version: 4
225
229
  summary: Helpful matchers for comparing JSON documents.