just_share 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48a2a15de6b595e9a6bc6220c64dc887709e4b76
4
- data.tar.gz: 7420d60139bbdcb9855c0ebbde60ef5ced03b546
3
+ metadata.gz: 6f59e9e53849d07d3eb93f8349876c49c11413ab
4
+ data.tar.gz: 1b0ed33abf976da2da3fa0ce236c1660570cff2a
5
5
  SHA512:
6
- metadata.gz: ebfad60a3450e2267e9e7e3f3e6fddd0873f8c01c5a9d40b794f8d5df51b7840d7b0375a82f1c5dca783f8f325f9b0d87272e66f78888369cb849791ac6e6ee2
7
- data.tar.gz: 3deb9790c5bc2db7fbccb9ea20748ebac020eeec5b750ca010310f99a54fb46bf6c284c5c1989ff5e1fdb388835a3dc725a3be3fc1a4f421b121fff1998b1fe4
6
+ metadata.gz: ff30075a5ad7428c4a1346e26907ed6ac4137a321964e89df945ce21fe6e1c2ccee34f7ba5f8c57bcd5ba1723fd8021d856bae047f4c12350e60f7f184ad4119
7
+ data.tar.gz: 9df69e1c2019b66ba50230de6e648ce9608ccb2268ec3c98efdf1acfa88047badc27bd308cd1781dbf4f125a1cc0e93a2635eda3824fbbca34cbc719311d37a5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- just_share (1.0.10)
4
+ just_share (1.0.11)
5
5
  colorize (~> 0.7.3, >= 0.7.3)
6
6
  multi_json (~> 1.10, >= 1.10.1)
7
7
  rest-client (~> 1.7, >= 1.7.2)
@@ -1,6 +1,6 @@
1
1
  module JustShare
2
2
  MAJOR = 1
3
3
  MINOR = 0
4
- PATCH = 10
4
+ PATCH = 11
5
5
  VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
6
6
  end
data/lib/just_share.rb CHANGED
@@ -30,7 +30,13 @@ module JustShare
30
30
  @image_url = params[:image_url] || JustShare.image_url
31
31
 
32
32
  # Dynamic instantiate the social network & get it generated link
33
- social_network = "JustShare::#{params[:social].to_s.capitalize_humanized}".to_constant.new params
33
+ begin
34
+ social_network = "JustShare::#{params[:social].to_s.capitalize_humanized}".to_constant.new params
35
+ rescue Exception => e
36
+ params[:social] = 'linked-in' if e.to_s.index('Linkedin')
37
+ social_network = "JustShare::#{params[:social].to_s.capitalize_humanized}".to_constant.new params
38
+ end
39
+
34
40
  social_network.get_post_link
35
41
  end
36
42
 
@@ -73,7 +73,7 @@ describe JustShare do
73
73
  end
74
74
 
75
75
  it "LinkedIn" do
76
- @base_hash[:social] = 'linked-in'
76
+ @base_hash[:social] = 'linkedin'
77
77
  @url_generated = JustShare.on(@base_hash)
78
78
  puts @url_generated
79
79
  expect(@url_generated).to be_equals @linked_in_expected_url
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just_share
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilton Garcia