match_json 0.0.6 → 0.0.7

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: 3c7c510c21202dd35ddd777bb65d506e7ac9b0d9
4
- data.tar.gz: f0636b35b386bb55f6e9633483bdb8fc49f19ba2
3
+ metadata.gz: dbc46ca994f742211eef028282ffe68fd347348c
4
+ data.tar.gz: 8319a12a7de9cac7164d26055df0e0f4d2c92f21
5
5
  SHA512:
6
- metadata.gz: 5f4cb5db29a34ba6498967e6d2a623ebe35f9f31f407d75a3a0d9288034a170ae0a5ad4f9aca54f98b10c1991ac192680412dd6b7d1ed6c4e177048807bb94d5
7
- data.tar.gz: 33cd7763ee83844e16ccd025c3f6ef18e14a9a183373e37a738c9a1799bccc9fe9eb99d0e8ce73354b60b312dbea7883b4327ec4f2c8e40ebd4b119b16a8a3ce
6
+ metadata.gz: a5bab51f9a0988851bb3231fda9eb38d848ef3d376eb7288812866b562d407ddf394fe0fec43163b2e40833491024e7a6890818bc3eac40224c42dd4bfb6d17b
7
+ data.tar.gz: 7d78a70cfcc882073f20b7de4c55c760bacce249bcce889ff52a2555baf45e0bb5b27de5dff1c11f4e548a1237a4d043110b8a633ccaacad6a1cddcad7c700d0
@@ -1,2 +1,6 @@
1
+ ### 0.0.7
2
+ * solve issue with undefined method `configure' for RSpec:Module.
3
+ Now you should include ```match_json/rspec``` or ```match_json/minitest```
4
+ depending on your testing framework.
1
5
  ### 0.0.5
2
6
  * allow to use pattern for non-string values (by @marocchino)
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![Match JSON](assets/match.png "Match JSON")
4
4
 
5
- Test your JSON in RSpec and Cucumber, like a boss.
5
+ Test your JSON in RSpec, MiniTest or Cucumber, like a boss.
6
6
 
7
7
  > The **only** matcher I let my kids play with
8
8
  > -- Mom
@@ -76,6 +76,21 @@ gem 'match_json'
76
76
 
77
77
  - Run `bundle`
78
78
 
79
+ ### Rspec
80
+
81
+ In spec_helper.rb or rails_helper.rb include library as following:
82
+
83
+ ```
84
+ require 'match_json/rspec'
85
+ ```
86
+
87
+ ###
88
+
89
+ In minitest's test_helper.rb add this:
90
+
91
+ ```
92
+ require 'match_json/minitest'
93
+ ```
79
94
 
80
95
  ## Advanced usage
81
96
 
@@ -7,17 +7,3 @@ module MatchJson
7
7
  end
8
8
  end
9
9
  end
10
-
11
- if defined?(RSpec)
12
- RSpec.configure do |config|
13
- config.include MatchJson::Matchers
14
- end
15
-
16
- RSpec::Matchers.alias_matcher :match_json, :include_json
17
- elsif defined?(Minitest)
18
- class Minitest::Test
19
- include MatchJson::Matchers
20
-
21
- alias_method :match_json, :include_json
22
- end
23
- end
@@ -0,0 +1,7 @@
1
+ require 'match_json'
2
+
3
+ class Minitest::Test
4
+ include MatchJson::Matchers
5
+
6
+ alias_method :match_json, :include_json
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'match_json'
2
+
3
+ RSpec.configure do |config|
4
+ config.include MatchJson::Matchers
5
+ end
6
+
7
+ RSpec::Matchers.alias_matcher :match_json, :include_json
@@ -1,3 +1,3 @@
1
1
  module MatchJson
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -1,4 +1,4 @@
1
- require 'match_json'
1
+ require 'match_json/rspec'
2
2
  require 'byebug'
3
3
 
4
4
  Dir['./spec/support/**/*'].each do |f|
@@ -1,5 +1,5 @@
1
1
  gem 'minitest'
2
2
  require 'minitest/autorun'
3
3
  require 'minitest/matchers'
4
- require 'match_json'
4
+ require 'match_json/minitest'
5
5
  require 'minitest/byebug' if ENV['DEBUG']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: match_json
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Gabriel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-01 00:00:00.000000000 Z
12
+ date: 2017-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -119,6 +119,8 @@ files:
119
119
  - lib/match_json.rb
120
120
  - lib/match_json/matchers.rb
121
121
  - lib/match_json/matchers/include_json.rb
122
+ - lib/match_json/minitest.rb
123
+ - lib/match_json/rspec.rb
122
124
  - lib/match_json/version.rb
123
125
  - match_json.gemspec
124
126
  - spec/match_json/include_json_spec.rb
@@ -148,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
150
  version: '0'
149
151
  requirements: []
150
152
  rubyforge_project:
151
- rubygems_version: 2.5.1
153
+ rubygems_version: 2.6.8
152
154
  signing_key:
153
155
  specification_version: 4
154
156
  summary: RSpec matcher for JSON documents