action_dispatch-test_response-json 6.1.0 → 6.2.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
  SHA256:
3
- metadata.gz: 46a805a52e5ffec5f69b45ba2739f4e9f3aeacb881651c4b8fe2735995fa2911
4
- data.tar.gz: bf97a52602d01f64ab37ab33731b11237fd82dae62f072d41f53bc3826a4aca9
3
+ metadata.gz: 46bfd3a62006ed1d1ba7e3b0ed818d03fb9565edb6b9db0aea42956dbff374f2
4
+ data.tar.gz: 2d33a857ebff8c5014ebc7dec286b837f03828c2f2f73da2e4b70ceaab92b7f6
5
5
  SHA512:
6
- metadata.gz: 133475b7fe1a68efa6bec5032e33cdfb45558b0466c693b9dad8f3148da8ac02eb80aadcce76d62c60279ca802ecf3c6f05478a83f78aa8234683bf922afce81
7
- data.tar.gz: 131874fda6ea6d7cda922451d2207f042e7404c460b3a596aa6b5f3af29191ea1a7aa33dc2968644dc4464cff980cbd3fb5cbd4a0229aabfae58a16554300ae8
6
+ metadata.gz: ee6c7cb43ea48c5bc16a31259581eb4f3e982284370d2a06c88703ad2b409b7e78dae19c64e08d9770c0d4915d02b65c58ad84fe766aefb09c82f8ced3484102
7
+ data.tar.gz: 81898060df368a1fb5133771003346882bb8f2e8815e0ad481e7b41083c3a4035ccf1f8a9db089f294252ba1bdf06b96ee79409c90e87ae1f0759760767d347e
data/Gemfile.lock CHANGED
@@ -3,53 +3,56 @@ PATH
3
3
  specs:
4
4
  action_dispatch-test_response-json (6.1.0)
5
5
  actionpack (~> 6.1.0)
6
+ nokogiri
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
- actionpack (6.1.0)
11
- actionview (= 6.1.0)
12
- activesupport (= 6.1.0)
11
+ actionpack (6.1.4.6)
12
+ actionview (= 6.1.4.6)
13
+ activesupport (= 6.1.4.6)
13
14
  rack (~> 2.0, >= 2.0.9)
14
15
  rack-test (>= 0.6.3)
15
16
  rails-dom-testing (~> 2.0)
16
17
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
17
- actionview (6.1.0)
18
- activesupport (= 6.1.0)
18
+ actionview (6.1.4.6)
19
+ activesupport (= 6.1.4.6)
19
20
  builder (~> 3.1)
20
21
  erubi (~> 1.4)
21
22
  rails-dom-testing (~> 2.0)
22
23
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
23
- activesupport (6.1.0)
24
+ activesupport (6.1.4.6)
24
25
  concurrent-ruby (~> 1.0, >= 1.0.2)
25
26
  i18n (>= 1.6, < 2)
26
27
  minitest (>= 5.1)
27
28
  tzinfo (~> 2.0)
28
29
  zeitwerk (~> 2.3)
29
30
  builder (3.2.4)
30
- concurrent-ruby (1.1.7)
31
+ concurrent-ruby (1.1.9)
31
32
  crass (1.0.6)
32
33
  erubi (1.10.0)
33
- i18n (1.8.6)
34
+ i18n (1.10.0)
34
35
  concurrent-ruby (~> 1.0)
35
- loofah (2.8.0)
36
+ loofah (2.14.0)
36
37
  crass (~> 1.0.2)
37
38
  nokogiri (>= 1.5.9)
38
- mini_portile2 (2.4.0)
39
- minitest (5.14.2)
40
- nokogiri (1.10.10)
41
- mini_portile2 (~> 2.4.0)
39
+ mini_portile2 (2.7.1)
40
+ minitest (5.15.0)
41
+ nokogiri (1.13.1)
42
+ mini_portile2 (~> 2.7.0)
43
+ racc (~> 1.4)
44
+ racc (1.6.0)
42
45
  rack (2.2.3)
43
46
  rack-test (1.1.0)
44
47
  rack (>= 1.0, < 3)
45
48
  rails-dom-testing (2.0.3)
46
49
  activesupport (>= 4.2.0)
47
50
  nokogiri (>= 1.6)
48
- rails-html-sanitizer (1.3.0)
51
+ rails-html-sanitizer (1.4.2)
49
52
  loofah (~> 2.3)
50
53
  tzinfo (2.0.4)
51
54
  concurrent-ruby (~> 1.0)
52
- zeitwerk (2.4.2)
55
+ zeitwerk (2.5.4)
53
56
 
54
57
  PLATFORMS
55
58
  ruby
@@ -58,4 +61,4 @@ DEPENDENCIES
58
61
  action_dispatch-test_response-json!
59
62
 
60
63
  BUNDLED WITH
61
- 1.17.2
64
+ 2.2.32
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["yalab"]
10
10
  spec.email = ["rudeboyjet@gmail.com"]
11
11
 
12
- spec.summary = "You can use `response.json` yey."
13
- spec.description = "This gem provide response.json on your test."
12
+ spec.summary = "You can use `response.json` or `response.html` yey."
13
+ spec.description = "This gem provide response.json or response.html on your test."
14
14
  spec.homepage = "https://github.com/yalab/action_dispatch-test_response-json"
15
15
  spec.license = "MIT"
16
16
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.require_paths = ["lib"]
22
22
 
23
23
  spec.add_dependency "actionpack", '~> 6.1.0'
24
+ spec.add_dependency "nokogiri"
24
25
  end
@@ -1,7 +1,7 @@
1
1
  module ActionDispatch
2
2
  class TestResponse
3
3
  module Json
4
- VERSION = "6.1.0"
4
+ VERSION = "6.2.0"
5
5
  end
6
6
  end
7
7
  end
@@ -1,7 +1,12 @@
1
1
  require "action_dispatch/test_response/json/version"
2
+ require "nokogiri"
2
3
 
3
4
  ActionDispatch::Response.module_eval do
4
5
  def json
5
- @json ||= JSON.parse(body).with_indifferent_access
6
+ @json ||= JSON.parse(body, object_class: ActiveSupport::HashWithIndifferentAccess)
7
+ end
8
+
9
+ def html
10
+ @html ||= Nokogiri::HTML(body)
6
11
  end
7
12
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_dispatch-test_response-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yalab
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-04 00:00:00.000000000 Z
11
+ date: 2022-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -24,7 +24,21 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 6.1.0
27
- description: This gem provide response.json on your test.
27
+ - !ruby/object:Gem::Dependency
28
+ name: nokogiri
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: This gem provide response.json or response.html on your test.
28
42
  email:
29
43
  - rudeboyjet@gmail.com
30
44
  executables: []
@@ -47,7 +61,7 @@ homepage: https://github.com/yalab/action_dispatch-test_response-json
47
61
  licenses:
48
62
  - MIT
49
63
  metadata: {}
50
- post_install_message:
64
+ post_install_message:
51
65
  rdoc_options: []
52
66
  require_paths:
53
67
  - lib
@@ -62,8 +76,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
76
  - !ruby/object:Gem::Version
63
77
  version: '0'
64
78
  requirements: []
65
- rubygems_version: 3.1.0.pre3
66
- signing_key:
79
+ rubygems_version: 3.3.3
80
+ signing_key:
67
81
  specification_version: 4
68
- summary: You can use `response.json` yey.
82
+ summary: You can use `response.json` or `response.html` yey.
69
83
  test_files: []