capybara-json 0.3.0.beta1 → 0.3.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/lib/capybara/httpclient_json/driver.rb +3 -1
- data/lib/capybara/json.rb +6 -0
- data/lib/capybara/json/driver/base.rb +1 -1
- data/lib/capybara/rack_test_json/driver.rb +3 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.0.
|
1
|
+
0.3.0.beta2
|
@@ -29,9 +29,11 @@ class Capybara::HTTPClientJson::Driver < Capybara::Json::Driver::Base
|
|
29
29
|
response.code
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
32
|
+
def raw_json
|
33
33
|
response.body
|
34
34
|
end
|
35
|
+
alias source raw_json # almost deprecated
|
36
|
+
alias html raw_json # hack for capybara2
|
35
37
|
|
36
38
|
def body
|
37
39
|
MultiJson.load(source) || {}
|
data/lib/capybara/json.rb
CHANGED
@@ -3,7 +3,7 @@ module Capybara::Json::Driver
|
|
3
3
|
%w[ get post put delete get! post! put! delete!
|
4
4
|
reset!
|
5
5
|
current_url
|
6
|
-
source body response_headers status_code
|
6
|
+
raw_json json source body response_headers status_code
|
7
7
|
].each do |method|
|
8
8
|
define_method(method) do
|
9
9
|
raise NotImplementedError
|
@@ -55,9 +55,11 @@ class Capybara::RackTestJson::Driver < Capybara::Json::Driver::Base
|
|
55
55
|
last_request.url
|
56
56
|
end
|
57
57
|
|
58
|
-
def
|
58
|
+
def raw_json
|
59
59
|
last_response.body
|
60
60
|
end
|
61
|
+
alias source raw_json # almost deprecated
|
62
|
+
alias html raw_json # hack for capybara2
|
61
63
|
|
62
64
|
def body
|
63
65
|
MultiJson.load(source) || {}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0.
|
4
|
+
version: 0.3.0.beta2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capybara
|