bearcat 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bearcat/api_array.rb +2 -4
- data/lib/bearcat/version.rb +1 -1
- metadata +2 -2
data/lib/bearcat/api_array.rb
CHANGED
@@ -5,7 +5,7 @@ module Bearcat
|
|
5
5
|
attr_reader :status, :headers, :members
|
6
6
|
|
7
7
|
def self.process_response(response, api_client)
|
8
|
-
if response.is_a?(Array)
|
8
|
+
if response.body.is_a?(Array)
|
9
9
|
ApiArray.new(response, api_client)
|
10
10
|
elsif key = array_key(response)
|
11
11
|
ApiArray.new(response, api_client, key)
|
@@ -118,9 +118,7 @@ module Bearcat
|
|
118
118
|
|
119
119
|
#TODO: This is a quick fix for JSONAPI responses if we need to do this for anything else we need to do this a better way
|
120
120
|
def self.array_key(response)
|
121
|
-
if response.env[:method] == :get && response.env[:url].path.match(/.*\/(courses||groups)\/\d+\/conferences/)
|
122
|
-
'conferences'
|
123
|
-
end
|
121
|
+
'conferences' if (response.env[:method] == :get && response.env[:url].path.match(/.*\/(courses||groups)\/\d+\/conferences/))
|
124
122
|
end
|
125
123
|
|
126
124
|
def process_body(response)
|
data/lib/bearcat/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bearcat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
prerelease:
|
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: 2014-
|
12
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|