sifiapi 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ module Faraday
4
4
 
5
5
  def call(env)
6
6
  @app.call(env).on_complete do
7
- if env[:response_headers]["content-type"].include?("application/json")
7
+ if (env[:response_headers]["content-type"] || "").include?("application/json")
8
8
  env[:body] = convert_to_json(env[:body])
9
9
  end
10
10
  end
@@ -32,7 +32,6 @@ class SifiApi::Resource
32
32
  resource_name = resource.to_s.pluralize
33
33
  response = @connection.post(@user_key, self.resource + "/#{resource_name}", params)
34
34
  if response && response.body
35
- handle_response
36
35
  record = response.body[resource_name].first
37
36
  SifiApi.const_get(resource.to_s.classify).new(record, @connection, @user_key)
38
37
  end
@@ -94,7 +93,7 @@ class SifiApi::Resource
94
93
  execute_with_rescue do
95
94
  response = @connection.send(action["method"].downcase, @user_key, action["href"])
96
95
  if response && response.status == 200
97
- if response[:content_type].include?("application/json")
96
+ if (response[:content_type] || "").include?("application/json")
98
97
  @json = response.body[resource_name].first
99
98
  return self
100
99
  elsif ["text/csv", "application/zip"].include?(response[:content_type])
@@ -1,7 +1,7 @@
1
1
  module SifiApi
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 12
4
+ MINOR = 13
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sifiapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-26 00:00:00.000000000Z
12
+ date: 2012-10-03 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
- requirement: &2154035060 !ruby/object:Gem::Requirement
16
+ requirement: &2156231220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.7.6
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2154035060
24
+ version_requirements: *2156231220
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: multi_json
27
- requirement: &2154034300 !ruby/object:Gem::Requirement
27
+ requirement: &2156230600 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.3
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *2154034300
35
+ version_requirements: *2156230600
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activesupport
38
- requirement: &2154033680 !ruby/object:Gem::Requirement
38
+ requirement: &2156229820 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 3.0.10
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *2154033680
46
+ version_requirements: *2156229820
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: i18n
49
- requirement: &2154032760 !ruby/object:Gem::Requirement
49
+ requirement: &2156229160 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 0.5.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *2154032760
57
+ version_requirements: *2156229160
58
58
  description: ''
59
59
  email:
60
60
  - brandon@simpli.fi