cb-api 5.0.0 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module Cb
2
2
  class Config
3
- attr_accessor :dev_key, :base_uri, :debug_api, :time_out, :use_json, :host_site,
3
+ attr_accessor :dev_key, :base_uri, :debug_api, :time_out, :use_json, :host_site, :test_resources,
4
4
  :uri_job_search, :uri_job_find,
5
5
  :uri_company_find, :uri_job_category_search,
6
6
  :uri_education_code, :uri_employee_types,
@@ -125,6 +125,7 @@ module Cb
125
125
  @time_out = 5
126
126
  @use_json = true
127
127
  @host_site = Cb.country.US
128
+ @test_resources = false
128
129
 
129
130
  set_default_api_uris
130
131
  end
@@ -7,7 +7,7 @@ module Cb
7
7
  :cover_letter, :responses
8
8
 
9
9
  def to_json
10
- {
10
+ crit = {
11
11
  JobDID: job_did,
12
12
  IsSubmitted: is_submitted,
13
13
  ExternalUserID: external_user_id,
@@ -35,7 +35,9 @@ module Cb
35
35
  ResponseText: response.response_text
36
36
  }
37
37
  end
38
- }.to_json
38
+ }
39
+ crit[:Test] = true if Cb.configuration.test_resources
40
+ crit.to_json
39
41
  end
40
42
  end
41
43
  end
@@ -7,7 +7,7 @@ module Cb
7
7
  :ipath_id, :tn_did, :resume, :cover_letter, :responses
8
8
 
9
9
  def to_json
10
- {
10
+ crit = {
11
11
  ApplicationDID: application_did,
12
12
  JobDID: job_did,
13
13
  IsSubmitted: is_submitted,
@@ -36,7 +36,9 @@ module Cb
36
36
  ResponseText: response.response_text
37
37
  }
38
38
  end
39
- }.to_json
39
+ }
40
+ crit[:Test] = true if Cb.configuration.test_resources
41
+ crit.to_json
40
42
  end
41
43
  end
42
44
  end
@@ -3,7 +3,7 @@ module Cb
3
3
  module User
4
4
 
5
5
  class CheckExisting < ApiResponse
6
- class Model < Struct.new(:email, :status, :external_id, :oauth_token) ; end
6
+ class Model < Struct.new(:email, :status, :external_id, :oauth_token, :partner_id) ; end
7
7
 
8
8
  protected
9
9
 
@@ -20,6 +20,7 @@ module Cb
20
20
  model.status = response[root_node][user_check_status_node]
21
21
  model.external_id = response[root_node][external_id_node]
22
22
  model.oauth_token = response[root_node][oauth_token_node]
23
+ model.partner_id = response[root_node][partner_id_node]
23
24
  model
24
25
  end
25
26
 
@@ -57,6 +58,10 @@ module Cb
57
58
  'ResponseOAuthToken'
58
59
  end
59
60
 
61
+ def partner_id_node
62
+ 'ResponsePartnerID'
63
+ end
64
+
60
65
  end
61
66
 
62
67
  end
@@ -1,3 +1,3 @@
1
1
  module Cb
2
- VERSION = '5.0.0'
2
+ VERSION = '5.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.1.0
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-03-06 00:00:00.000000000 Z
12
+ date: 2014-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty