bearcat 0.9.3 → 0.9.4

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.
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '0.9.3' unless defined?(Bearcat::VERSION)
2
+ VERSION = '0.9.4' unless defined?(Bearcat::VERSION)
3
3
  end
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.3
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-02-18 00:00:00.000000000 Z
12
+ date: 2014-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake