hubble_observatory 1.1.0 → 1.1.1

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: 6f06b9d11add7467d2c7e71ef80ec058425eab3e
4
- data.tar.gz: 87f023ed808ea3c9b7251a7d72d8b6472491751f
3
+ metadata.gz: 3b8493a894893686c916eaa8cfe94d94c6c68215
4
+ data.tar.gz: 027ce9145847ce1c01413c3345c2288856c7aaa1
5
5
  SHA512:
6
- metadata.gz: 8903f5084cbf6394de3f63dd90d0885f976fcfc7e6a6f172ca1f254780f78092ebea987855fb00fad3f728cc64c009e7fa2e6618a5dd1cc2929a41e3e238f7e3
7
- data.tar.gz: 665e0b018980a3271e652fb45e92f5264b5e8f5cb2b5b71e6001da48d9e84591788a5a35786f829c21cbfa5540ce82654e5cace509c780c42f05ce1105b45816
6
+ metadata.gz: 7a0c9728dcab090f94d215f6086277aa089f3990e25ece5fd00b68c52742daec38cee0f92f23e194decc2b417d62a5abe68b2e53f0a4bc7ac9ee833f4713029e
7
+ data.tar.gz: 75f2edf38a92f95f96e7de1e775d9e4d1809091ab8b15a419a029d54adf144af1f5803a25e3c9899f065118e1af4d36b8d08ec4b0a754385a81a77c42a8923ab
data/.travis.yml CHANGED
@@ -1,8 +1,13 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.2
3
+ - 2.1.2
4
4
  before_install:
5
5
  - gem install bundler -v 1.14.6
6
6
  script:
7
- - bundle exec rspec
8
- - bundle exec yard stats | grep "100.00% documented"
7
+ - bundle exec rspec
8
+ - bundle exec yard stats | grep "100.00% documented"
9
+ notifications:
10
+ slack:
11
+ secure: o/+iJrZTKqv+1dRmqCyQRk4RnO/30phrwg6gwR2465fFNOBns+sqwZpFRXBXn9vJSTtw6jRp3/UL60Baj4BNTV/sfBWaPCxRzHC0O1QHh3XlRTkOtolKRUD4htjcnJ7/OvQwGaHFhFp6pW3RNQpZtrjkzmBC5n/efgF89AAlS0MK957nvvg9PTDq/C38MRg/F0bKk23zmyDyHfbPoGl0BvwVaqa48J1KgqTqRY7ve47ShrISwSQPehmuBOKblspf+cvrqAra9CVUnPJCEhnNsI7dzHLcUYiMajzXMEW0Kth7FqUWjxFJ3EMO9nOSEbU1fgWCACVgE8z8kiY1vD+GgpU3tKrqtyp046SvdoXNXVdGHhZ2wNFuUMs2h/5Cu2SLDsta83bw8vpFayplcL7Skf5n0QtNmlzFTSldL1XQ8nkdFbCd7pTObMebMnsr+XU/HIKXqQSjo2GMFFDM8ec8mjVTxmtuPKEDoGM02OxZ/hAiJPQhulnavSe+rtnRPI8BHmWT84ETI6RU7AF+wFv3NDfTz5sZxLzzT9NAQIsnY4CutzK2CIvnaikKwZcdofrRJfmrfkxIDW6zfx8cftynHeUX0wo3k10vt062rUoM5chUhNptmR1CImx4Yq8f8dTF/NNzhWXXV+r/gT2QfZwwj51b+aLiWCOtYa6nVQgfPTA=
12
+ on_success: never
13
+ on_failure: change
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ For more information about changelogs, check
6
6
  [Keep a Changelog](http://keepachangelog.com) and
7
7
  [Vandamme](http://tech-angels.github.io/vandamme).
8
8
 
9
+ ## 1.1.1 - 2017-06-26
10
+
11
+ * [BUGFIX] - Update internal calls to the Hubble API. The
12
+ Hubble API now expects a PATCH request to a different endpoint to
13
+ obtain the hubble uuid on update.
14
+
9
15
  ## 1.1.0 - 2017-06-02
10
16
 
11
17
  * [FEATURE] Add `FsEmployee#create`
@@ -4,7 +4,7 @@ module HubbleObservatory
4
4
  class FsEmployee
5
5
  # @return [String] the token associated with the employee
6
6
  def self.create(access_token:)
7
- request = HubbleObservatory::Request.new(attrs: {request_type: :get, route: "fs-employees/jwt-token", query_params: { access_token: access_token}, include_auth_header: false} )
7
+ request = HubbleObservatory::Request.new(attrs: {request_type: :get, route: "fs-employees/jwt-token", query_params: { access_token: access_token}, auth_header: false} )
8
8
  response= request.run_request
9
9
  if response && response[:data]
10
10
  response[:data][:attributes][:jwt_token]
@@ -16,7 +16,7 @@ module HubbleObservatory
16
16
 
17
17
  # @return [String] the hubble uuid associated with the email
18
18
  def update(email:)
19
- request = HubbleObservatory::Request.new(attrs: {body_attrs: {email: email}, route: "talent-accounts/#{@hubble_uuid}", request_type: :put, auth_header: true})
19
+ request = HubbleObservatory::Request.new(attrs: {body_attrs: {email: email}, route: "talent-accounts/hubble-uuid/#{@hubble_uuid}", request_type: :patch, auth_header: true})
20
20
  @response = request.run_request
21
21
  self.class.process_account_data(@response)
22
22
  end
@@ -24,13 +24,14 @@ module HubbleObservatory
24
24
  private
25
25
 
26
26
  def self.process_account_data(account_data)
27
- if account_data
28
- extract_attribute_from_data(data: account_data, attribute: :id) || extract_uuid_from_errors(data: account_data)
29
- end
27
+ hubble_uuid = if account_data
28
+ extract_attribute_from_data(data: account_data, attribute: :hubble_uuid) || extract_uuid_from_errors(data: account_data)
29
+ end
30
+ hubble_uuid.to_s if !hubble_uuid.nil?
30
31
  end
31
32
 
32
33
  def self.extract_attribute_from_data(data:, attribute:)
33
- data.fetch(:data, {}).fetch(attribute, nil)
34
+ data.fetch(:data, {}).fetch(:attributes, {}).fetch(attribute, nil)
34
35
  end
35
36
 
36
37
  def self.extract_uuid_from_errors(data:)
@@ -1,4 +1,4 @@
1
1
  module HubbleObservatory
2
2
  # current version of gem
3
- VERSION = '1.1.0'
3
+ VERSION = '1.1.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubble_observatory
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruce Park
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-06-02 00:00:00.000000000 Z
12
+ date: 2017-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler