jsend-rails 0.9.4 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jsend-rails/test/response.rb +6 -5
- data/lib/jsend-rails/version.rb +1 -1
- metadata +7 -9
@@ -6,23 +6,23 @@ module JSend
|
|
6
6
|
module Test
|
7
7
|
module Response
|
8
8
|
def json
|
9
|
-
ActiveSupport::JSON.decode(body)
|
9
|
+
HashWithIndifferentAccess.new(ActiveSupport::JSON.decode(body))
|
10
10
|
end
|
11
11
|
|
12
12
|
def jsend_code
|
13
|
-
json[
|
13
|
+
json[:code]
|
14
14
|
end
|
15
15
|
|
16
16
|
def jsend_message
|
17
|
-
json[
|
17
|
+
json[:message]
|
18
18
|
end
|
19
19
|
|
20
20
|
def jsend_status
|
21
|
-
json[
|
21
|
+
json[:status]
|
22
22
|
end
|
23
23
|
|
24
24
|
def jsend_data
|
25
|
-
json[
|
25
|
+
json[:data]
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -30,3 +30,4 @@ module JSend
|
|
30
30
|
end
|
31
31
|
|
32
32
|
ActionController::TestResponse.send :include, JSend::Rails::Test::Response
|
33
|
+
ActionDispatch::TestResponse.send :include, JSend::Rails::Test::Response
|
data/lib/jsend-rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsend-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
default_executable:
|
12
|
+
date: 2012-05-31 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rails
|
17
|
-
requirement: &
|
16
|
+
requirement: &70345554166580 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
19
|
- - ~>
|
@@ -22,10 +21,10 @@ dependencies:
|
|
22
21
|
version: '3.0'
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *70345554166580
|
26
25
|
- !ruby/object:Gem::Dependency
|
27
26
|
name: rspec
|
28
|
-
requirement: &
|
27
|
+
requirement: &70345554165960 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
29
|
requirements:
|
31
30
|
- - ! '>='
|
@@ -33,7 +32,7 @@ dependencies:
|
|
33
32
|
version: '0'
|
34
33
|
type: :development
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
35
|
+
version_requirements: *70345554165960
|
37
36
|
description: Extensions to Rails 3 for rendering JSend responses
|
38
37
|
email:
|
39
38
|
- bcm@copious.com
|
@@ -49,7 +48,6 @@ files:
|
|
49
48
|
- lib/jsend-rails/version.rb
|
50
49
|
- lib/jsend-rails.rb
|
51
50
|
- README.md
|
52
|
-
has_rdoc: true
|
53
51
|
homepage: http://github.com/utahstreetlabs/jsend-rails
|
54
52
|
licenses: []
|
55
53
|
post_install_message:
|
@@ -70,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
68
|
version: '0'
|
71
69
|
requirements: []
|
72
70
|
rubyforge_project:
|
73
|
-
rubygems_version: 1.
|
71
|
+
rubygems_version: 1.8.11
|
74
72
|
signing_key:
|
75
73
|
specification_version: 3
|
76
74
|
summary: Extends Rails 3 to render JSON responses in the JSend format
|