cb-api 21.4.2 → 22.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 482222ce1172e041d2696aa069b3c9e3bf1e8eb1
4
- data.tar.gz: 891df094403536c218d404ce54b7226d9c07c3d2
3
+ metadata.gz: 7c1c372fd5391bebc46037c63268e907c900b226
4
+ data.tar.gz: ba5a92998b4e64f9e84268726714e7d741b241ea
5
5
  SHA512:
6
- metadata.gz: 346045c57853fbc0c3ab4bd849de011efc47899bf3ebd45302c02147671857d760053ac4eee9e7bc9d3f4058e06d870fc2b86edcad8e361a91c113c118a051af
7
- data.tar.gz: 275aeed5e81e6c8ca26b304e974cc5ea8568e44a0ec31c9ceabaa16e7c8225135f18161d38127cc3125a7a8ad63734949fb945c292a1e7e567cef8055178f49b
6
+ metadata.gz: 00a1ab93fba95b42ca3b2e9ab1136d78f555fadb15d86a2fec467453c41d0641bb968881c454a74f19ccbe3e00b5b76aad9b5348a05f4a890739fb793d6a2351
7
+ data.tar.gz: 76c4eba4721bbc2f2a0ed4aaf3ef4ec4fc85a06bbed7e7fb60af1cfde4ddad5ef8c927cb25b8d00115d951e723020cef09c0b01d58744fa083a9cc4ad87ced7a
@@ -2,6 +2,7 @@ Version History
2
2
  ====
3
3
  * All Version bumps are required to update this file as well!!
4
4
  ----
5
+ * 22.0.0 Return a hash from Job rather than a model
5
6
  * 21.4.2 Catch branding exceptions so that we don't blow up the job details call. The side effect of a second API call is silly anyway
6
7
  * 21.4.1 Update test for Ruby 2.3.1. `ArgumentError`'s error message changed from "wrong number of arguments (0 for 1)" to "wrong number of arguments (given 0, expected 1)" in Ruby 2.3.0.
7
8
  * 21.4.0 Add jc_custom_fields to Cb::Models::Job
@@ -8,23 +8,13 @@
8
8
  # distributed under the License is distributed on an "AS IS" BASIS,
9
9
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  # See the License for the specific language governing permissions and limitations under the License.
11
- require 'json'
12
11
  require_relative 'base'
13
12
  module Cb
14
13
  module Clients
15
14
  class Job < Base
16
15
  class << self
17
- def find_by_criteria(criteria)
18
- query = cb_client.class.criteria_to_hash(criteria)
19
- json_response = cb_client.cb_get(Cb.configuration.uri_job_find, query: query)
20
- Responses::Job::Singular.new(json_response)
21
- end
22
-
23
- def find_by_did(did)
24
- criteria = Cb::Criteria::Job::Details.new
25
- criteria.did = did
26
- criteria.show_custom_values = true
27
- find_by_criteria(criteria)
16
+ def get(args={})
17
+ cb_client.cb_get(Cb.configuration.uri_job_find, query: args)
28
18
  end
29
19
  end
30
20
  end
@@ -63,10 +63,6 @@ module Cb
63
63
  Cb::Clients::JobBranding
64
64
  end
65
65
 
66
- def job_details_criteria
67
- Cb::Criteria::Job::Details.new
68
- end
69
-
70
66
  def job_insights
71
67
  Cb::Clients::JobInsights
72
68
  end
@@ -9,5 +9,5 @@
9
9
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
10
  # See the License for the specific language governing permissions and limitations under the License.
11
11
  module Cb
12
- VERSION = '21.4.2'
12
+ VERSION = '22.0.0'
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cb-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.4.2
4
+ version: 22.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The CareerBuilder.com Niche and Consumer Development teams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-28 00:00:00.000000000 Z
11
+ date: 2016-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -238,7 +238,6 @@ files:
238
238
  - lib/cb/criteria/application/response.rb
239
239
  - lib/cb/criteria/application/resume.rb
240
240
  - lib/cb/criteria/application/update.rb
241
- - lib/cb/criteria/job/details.rb
242
241
  - lib/cb/criteria/resumes/get_by_hash.rb
243
242
  - lib/cb/criteria/user/change_password.rb
244
243
  - lib/cb/criteria/user/delete.rb
@@ -322,7 +321,6 @@ files:
322
321
  - lib/cb/responses/errors.rb
323
322
  - lib/cb/responses/job/report.rb
324
323
  - lib/cb/responses/job/search.rb
325
- - lib/cb/responses/job/singular.rb
326
324
  - lib/cb/responses/metadata.rb
327
325
  - lib/cb/responses/nil_model.rb
328
326
  - lib/cb/responses/resumes/resume.rb
@@ -1,21 +0,0 @@
1
- # Copyright 2015 CareerBuilder, LLC
2
- # Licensed under the Apache License, Version 2.0 (the "License");
3
- # you may not use this file except in compliance with the License.
4
- # You may obtain a copy of the License at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- # Unless required by applicable law or agreed to in writing, software
8
- # distributed under the License is distributed on an "AS IS" BASIS,
9
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- # See the License for the specific language governing permissions and limitations under the License.
11
- module Cb
12
- module Criteria
13
- module Job
14
- class Details
15
- extend Cb::Utils::FluidAttributes
16
-
17
- fluid_attr_accessor :did, :show_job_skin, :site_id, :lhs, :cobrand, :show_apply_requirements, :show_custom_values, :retrieve_onet_code
18
- end
19
- end
20
- end
21
- end
@@ -1,46 +0,0 @@
1
- # Copyright 2015 CareerBuilder, LLC
2
- # Licensed under the Apache License, Version 2.0 (the "License");
3
- # you may not use this file except in compliance with the License.
4
- # You may obtain a copy of the License at
5
- #
6
- # http://www.apache.org/licenses/LICENSE-2.0
7
- # Unless required by applicable law or agreed to in writing, software
8
- # distributed under the License is distributed on an "AS IS" BASIS,
9
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
- # See the License for the specific language governing permissions and limitations under the License.
11
- module Cb
12
- module Responses
13
- module Job
14
- class Singular < ApiResponse
15
- protected
16
-
17
- def validate_api_hash
18
- required_response_field(root_node, response)
19
- required_response_field(model_node, response[root_node])
20
- end
21
-
22
- def hash_containing_metadata
23
- response[root_node]
24
- end
25
-
26
- def extract_models
27
- Models::Job.new(model_hash)
28
- end
29
-
30
- private
31
-
32
- def root_node
33
- 'ResponseJob'
34
- end
35
-
36
- def model_node
37
- 'Job'
38
- end
39
-
40
- def model_hash
41
- response[root_node][model_node]
42
- end
43
- end
44
- end
45
- end
46
- end