just_share 1.0.15 → 1.0.16

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: 3f3a2bff3e0c6ee761fb9bf8c09e5ae9ac220c0f
4
- data.tar.gz: 650bba76a7bcda094d2a3859e67c37b942a76451
3
+ metadata.gz: 3991e5c47268556ca45d617fc01e06251c64143b
4
+ data.tar.gz: cc5b2e079145ff155344fb59fadb2dbd7fb2171a
5
5
  SHA512:
6
- metadata.gz: 1cb3e3542e4471b9da439f4291bdee25f6589388f00379116bbdf355834d9e0f3f03a4d85eb010f41f75d434ce37fb6786c028acb768dec5b9a9232afa9fc3d0
7
- data.tar.gz: 4ce600898795672f34dd0058c24a161312732759c6454c8c115ce43abf4d9db82f8af4a80d6b3459e148ac8264eb6466530e154254b4204e39a8da1f1a9fcab7
6
+ metadata.gz: d32da65c8c5f197909ed3ffe8deb33ab619df3cdcd2cc713513c63e3b126e0165aeb065a1f79fe13153711916ab83860ae8d03e43140f30412060ce1d4bdedab
7
+ data.tar.gz: 6a90297e7915561b208e889409d0687fd5dcce4c676751b753ff75effbd9373e689db2d0bd9b74bcb9e9c81d07b036dbf6ae9ada2082dd311048026b7362c310
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- just_share (1.0.15)
4
+ just_share (1.0.16)
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)
data/lib/just_share.rb CHANGED
@@ -6,7 +6,7 @@ require 'rest_client'
6
6
  files = [
7
7
  :version, :string, :social_linker, :blogger,
8
8
  :facebook, :google_plus, :linked_in, :pinterest,
9
- :twitter, :delicious, :tumblr
9
+ :twitter, :delicious, :tumblr, :reddit, :vk, :xing
10
10
  ]
11
11
  files.each { |lib| require "just_share/#{lib}" }
12
12
 
@@ -2,7 +2,7 @@ class JustShare::Reddit < JustShare::SocialLinker
2
2
  def setup_attrs
3
3
  # Base URL
4
4
  self.domain='http://www.reddit.com'
5
- self.path='/submit'
5
+ self.path='submit'
6
6
 
7
7
  # Params (only the link is working, the others are deprecated for the sharer.php & won't work)
8
8
  url_param = "url=#{self.link}"
@@ -1,6 +1,6 @@
1
1
  module JustShare
2
2
  MAJOR = 1
3
3
  MINOR = 0
4
- PATCH = 15
4
+ PATCH = 16
5
5
  VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}"
6
- end
6
+ end
data/lib/just_share/vk.rb CHANGED
@@ -2,7 +2,7 @@ class JustShare::Vk < JustShare::SocialLinker
2
2
  def setup_attrs
3
3
  # Base URL
4
4
  self.domain='http://vk.com'
5
- self.path='/share.php'
5
+ self.path='share.php'
6
6
 
7
7
  # Params (only the link is working, the others are deprecated for the sharer.php & won't work)
8
8
  url_param = "url=#{self.link}"
@@ -2,7 +2,7 @@ class JustShare::Xing < JustShare::SocialLinker
2
2
  def setup_attrs
3
3
  # Base URL
4
4
  self.domain='https://www.xing.com'
5
- self.path='/spi/shares/new'
5
+ self.path='spi/shares/new'
6
6
 
7
7
  # Params (only the link is working, the others are deprecated for the sharer.php & won't work)
8
8
  url_param = "url=#{self.link}"
@@ -32,9 +32,9 @@ describe JustShare do
32
32
  @delicious_expected_url = "https://delicious.com/save?mini=true&url=#{@link}&title=#{@title}&tags=#{JustShare.array_to_str_params(@hash_tags)}&note=#{@message}"
33
33
 
34
34
  # New expected URLs
35
- @reddit_url = "http://www.reddit.com/submit?url=#{@link}"
36
- @xing_url = "https://www.xing.com/spi/shares/new?url=#{@link}"
37
- @vk_url = "http://vk.com/share.php?url=#{@link}"
35
+ @reddit_expected_url = "http://www.reddit.com/submit?url=#{@link}"
36
+ @xing_expected_url = "https://www.xing.com/spi/shares/new?url=#{@link}"
37
+ @vk_expected_url = "http://vk.com/share.php?url=#{@link}"
38
38
  end
39
39
 
40
40
  # SetUp for each tests
@@ -129,5 +129,27 @@ describe JustShare do
129
129
  expect(@url_generated).to be_equals @delicious_expected_url
130
130
  #expect(accessible?(@url_generated)).to be_truthy
131
131
  end
132
+
133
+ it "Reddit" do
134
+ @base_hash[:social] = :reddit
135
+ @url_generated = JustShare.on(@base_hash)
136
+ puts @url_generated
137
+ expect(@url_generated).to be_equals @reddit_expected_url
138
+ #expect(accessible?(@url_generated)).to be_truthy
139
+ end
140
+
141
+ it "Vk" do
142
+ @base_hash[:social] = :vk
143
+ @url_generated = JustShare.on(@base_hash)
144
+ puts @url_generated
145
+ expect(@url_generated).to be_equals @vk_expected_url
146
+ end
147
+
148
+ it "Xing" do
149
+ @base_hash[:social] = :xing
150
+ @url_generated = JustShare.on(@base_hash)
151
+ puts @url_generated
152
+ expect(@url_generated).to be_equals @xing_expected_url
153
+ end
132
154
  end
133
155
  end
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.15
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilton Garcia