linkedin_v2 1.0.1 → 1.1.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
  SHA256:
3
- metadata.gz: 05c0fac1f40a9fbcf272a17062b54374b9659fce7be67d27c72081b239c2be05
4
- data.tar.gz: 29928e3f89b9cb29eefa7a213f5ae4c4e439e4e99dfd6749ffa107d494f5ff6c
3
+ metadata.gz: 9999c8d21bbf187746e9be9834b724a0cfaea9b9ac3e78c4d22f8b1b3263d119
4
+ data.tar.gz: 3b18a093ccbc6469d32c98f59f56b28754da975d25f4ff73ee37cc33c141d5af
5
5
  SHA512:
6
- metadata.gz: 88d47a37ebfc95db3578c35548281fb8e0bad45e0f159fe60e8556e94fa5d9a04a76d0808d783ebba30b36bf4a2e1f21514b5d80cc19c75a85fea526ad4a10fb
7
- data.tar.gz: d500d99a7e0948a2ad5af93d14931e300548969df6e6cced355fe1dc6cb5f6f7c45fcca627ebb928887188ce74492d639d4fb5f4a00ccaa80ec5e48ba8ff1301
6
+ metadata.gz: fb38f8190c5209ed13d8583b61be40af864959ae4ff85fe18cf2436ba11ffced16c408f14a9b592cc314b86d1cbe286e13f49867d6c6e80f1d49589f875fe3ed
7
+ data.tar.gz: d2bb448c2a96248b3c24924f04ab787c32e593d7c43a1584ae41adb6980ab0d0957c9ba5aa7830cbf6d470fb3c8a18fcb0f901626e9fda32c8e84846a34394e5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- linkedin_v2 (1.0.1)
4
+ linkedin_v2 (1.1.0)
5
5
  down (~> 4.8, >= 4.8.1)
6
6
  rest-client (~> 2.0, >= 2.0.2)
7
7
 
@@ -31,12 +31,7 @@ module LinkedinV2
31
31
  "contentEntities" => [
32
32
  {
33
33
  "entityLocation" => url,
34
- "thumbnails" => [
35
- {
36
- "resolvedUrl": thumbnail,
37
- }
38
- ],
39
- }
34
+ }.merge(thumbnail_attribute)
40
35
  ]
41
36
  },
42
37
  "distribution" => {
@@ -78,6 +73,18 @@ module LinkedinV2
78
73
  options.fetch(:description, nil)
79
74
  end
80
75
 
76
+ def thumbnail_attribute
77
+ return {} if thumbnail.to_s.empty?
78
+
79
+ {
80
+ "thumbnails" => [
81
+ {
82
+ "resolvedUrl": thumbnail,
83
+ }
84
+ ],
85
+ }
86
+ end
87
+
81
88
  def description_attribute
82
89
  {
83
90
  "content" => {
@@ -1,3 +1,3 @@
1
1
  module LinkedinV2
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linkedin_v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Teles
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-03 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client