linkedin_orbit 0.5.1 → 0.5.2

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
  SHA256:
3
- metadata.gz: e40d5cbbc3c822d02e6c4a37706413f68a0a5a6ef06ddbc0814e3dcfeb4f9f4e
4
- data.tar.gz: 0ed2bc12b430d788d9c6bc7c31e53936a0bec2ceadbfcc94645c2c780e14c5fc
3
+ metadata.gz: 3e0016e89f5f2e752e9b2283140b23632fb7a880fdb1c7c57990904edf7eb420
4
+ data.tar.gz: fa4e850eb2265d43fd379a6fd7f3e0895a133c761e2935232815d1112a29cae2
5
5
  SHA512:
6
- metadata.gz: ac438b786ed497bff09b45556dc1ffde00dd9380d0035d5e5e86e8b9bfeab42495ebd9826d5d64659af5ec1c10e5397b7626b68a5412d5c1f59a7c61019a4407
7
- data.tar.gz: e2d025027f454283f7f0385394d4628e3a22bd48144978404130ea52d64a72cada877ffd2f9f77c4eed7af06c3fd1078293ae4f11bc6242a3d51a92b1978dbed
6
+ metadata.gz: 0d86e1f418da951fd06c5e069513e78fa6a37a6992fa29f62ecbacbc75acb2280e8bc0b1de13b3ad5d449c6c879a5f3e088afdca4e4e8b213757601f4d4d0c7b
7
+ data.tar.gz: 181276efcd19799c13ab226ee3eeada3443aa014659d5574126811325c70675b73f2e9b87672797b1e2072386684968fc2eb5c170583b8f499ea89f1e1aeaa1d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- linkedin_orbit (0.2.0)
4
+ linkedin_orbit (0.5.2)
5
5
  dotenv (~> 2.7)
6
6
  http (~> 4.4)
7
7
  json (~> 2.5)
@@ -23,23 +23,29 @@ GEM
23
23
  domain_name (0.5.20190701)
24
24
  unf (>= 0.0.5, < 1.0.0)
25
25
  dotenv (2.7.6)
26
- faraday (1.5.1)
26
+ faraday (1.9.3)
27
27
  faraday-em_http (~> 1.0)
28
28
  faraday-em_synchrony (~> 1.0)
29
29
  faraday-excon (~> 1.1)
30
- faraday-httpclient (~> 1.0.1)
30
+ faraday-httpclient (~> 1.0)
31
+ faraday-multipart (~> 1.0)
31
32
  faraday-net_http (~> 1.0)
32
- faraday-net_http_persistent (~> 1.1)
33
+ faraday-net_http_persistent (~> 1.0)
33
34
  faraday-patron (~> 1.0)
34
- multipart-post (>= 1.2, < 3)
35
+ faraday-rack (~> 1.0)
36
+ faraday-retry (~> 1.0)
35
37
  ruby2_keywords (>= 0.0.4)
36
38
  faraday-em_http (1.0.0)
37
39
  faraday-em_synchrony (1.0.0)
38
40
  faraday-excon (1.1.0)
39
41
  faraday-httpclient (1.0.1)
42
+ faraday-multipart (1.0.3)
43
+ multipart-post (>= 1.2, < 3)
40
44
  faraday-net_http (1.0.1)
41
- faraday-net_http_persistent (1.1.0)
45
+ faraday-net_http_persistent (1.2.0)
42
46
  faraday-patron (1.0.0)
47
+ faraday-rack (1.0.0)
48
+ faraday-retry (1.0.3)
43
49
  ffi (1.15.3)
44
50
  ffi-compiler (1.0.1)
45
51
  ffi (>= 1.0.0)
@@ -57,7 +63,7 @@ GEM
57
63
  http-parser (1.2.3)
58
64
  ffi-compiler (>= 1.0, < 2.0)
59
65
  json (2.5.1)
60
- jwt (2.2.3)
66
+ jwt (2.3.0)
61
67
  linkedin (1.1.1)
62
68
  hashie (~> 3.0)
63
69
  multi_json (~> 1.0)
@@ -110,8 +116,8 @@ GEM
110
116
  rubocop-ast (1.7.0)
111
117
  parser (>= 3.0.1.1)
112
118
  ruby-progressbar (1.11.0)
113
- ruby2_keywords (0.0.4)
114
- thor (1.1.0)
119
+ ruby2_keywords (0.0.5)
120
+ thor (1.2.1)
115
121
  unf (0.1.4)
116
122
  unf_ext
117
123
  unf_ext (0.0.7.7)
@@ -135,4 +141,4 @@ DEPENDENCIES
135
141
  webmock (~> 3.12)
136
142
 
137
143
  BUNDLED WITH
138
- 2.2.16
144
+ 2.2.32
@@ -86,20 +86,28 @@ module LinkedinOrbit
86
86
 
87
87
  response = https.request(request)
88
88
 
89
- response = JSON.parse(response.body)
89
+ if response.code == "401"
90
+ puts "⛔️ Your LinkedIn auth token is expired or invalid."
91
+ puts "✨ Great news! LinkedIn is going to be available as a Plug & Play integration in Orbit late February 2022."
92
+ puts "Keep an eye on Canny for updates: https://orbit.canny.io/integrations"
93
+ return []
94
+ end
95
+
96
+ parsed_response = JSON.parse(response.body)
90
97
 
91
- total = response["paging"]["total"] if page == 0
98
+ total = parsed_response["paging"]["total"] if page == 0
92
99
 
93
- return response["message"] if response["serviceErrorCode"]
100
+ return parsed_response["message"] if parsed_response["serviceErrorCode"]
94
101
 
95
- if response["elements"].nil? || response["elements"].empty?
96
- return <<~HEREDOC
102
+ if parsed_response["elements"].nil? || parsed_response["elements"].empty?
103
+ puts <<~HEREDOC
97
104
  No new posts to process from your LinkedIn organization.
98
105
  If you suspect this is incorrect, verify your LinkedIn organization schema is correct in your credentials.
99
106
  HEREDOC
107
+ return []
100
108
  end
101
109
 
102
- response["elements"].each do |element|
110
+ parsed_response["elements"].each do |element|
103
111
  next if element["id"].nil?
104
112
  posts << {
105
113
  "id" => element["id"],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LinkedinOrbit
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.2"
5
5
  end
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkedin_orbit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orbit DevRel
8
8
  - Ben Greenberg
9
9
  - Colin Loretz
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-12-21 00:00:00.000000000 Z
13
+ date: 2022-02-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http
@@ -184,7 +184,7 @@ metadata:
184
184
  homepage_uri: https://github.com/orbit-love/community-ruby-linkedin-orbit
185
185
  source_code_uri: https://github.com/orbit-love/community-ruby-linkedin-orbit
186
186
  changelog_uri: https://github.com/orbit-love/community-ruby-linkedin-orbit/blob/main/CHANGELOG.md
187
- post_install_message:
187
+ post_install_message:
188
188
  rdoc_options: []
189
189
  require_paths:
190
190
  - lib
@@ -199,8 +199,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
199
  - !ruby/object:Gem::Version
200
200
  version: '0'
201
201
  requirements: []
202
- rubygems_version: 3.1.4
203
- signing_key:
202
+ rubygems_version: 3.2.32
203
+ signing_key:
204
204
  specification_version: 4
205
205
  summary: Integrate LinkedIn interactions into Orbit
206
206
  test_files: []