just_share 1.0.14 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Gemfile.lock +4 -1
- data/lib/just_share/facebook.rb +1 -1
- data/lib/just_share/reddit.rb +13 -0
- data/lib/just_share/version.rb +1 -1
- data/lib/just_share/vk.rb +13 -0
- data/lib/just_share/xing.rb +13 -0
- data/spec/just_share/just_share_spec.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f3a2bff3e0c6ee761fb9bf8c09e5ae9ac220c0f
|
4
|
+
data.tar.gz: 650bba76a7bcda094d2a3859e67c37b942a76451
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cb3e3542e4471b9da439f4291bdee25f6589388f00379116bbdf355834d9e0f3f03a4d85eb010f41f75d434ce37fb6786c028acb768dec5b9a9232afa9fc3d0
|
7
|
+
data.tar.gz: 4ce600898795672f34dd0058c24a161312732759c6454c8c115ce43abf4d9db82f8af4a80d6b3459e148ac8264eb6466530e154254b4204e39a8da1f1a9fcab7
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
just_share (1.0.
|
4
|
+
just_share (1.0.15)
|
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)
|
@@ -50,3 +50,6 @@ DEPENDENCIES
|
|
50
50
|
rake (~> 10.3, >= 10.3.2)
|
51
51
|
rspec (~> 3.1, >= 3.1.0)
|
52
52
|
simplecov (~> 0.7, >= 0.7.1)
|
53
|
+
|
54
|
+
BUNDLED WITH
|
55
|
+
1.11.2
|
data/lib/just_share/facebook.rb
CHANGED
@@ -11,7 +11,7 @@ class JustShare::Facebook < JustShare::SocialLinker
|
|
11
11
|
self.params = "#{url_param}"
|
12
12
|
end
|
13
13
|
|
14
|
-
def self.invite_friends
|
14
|
+
def self.invite_friends(app_id, msg, redir_url)
|
15
15
|
# Base URL
|
16
16
|
domain='https://www.facebook.com'
|
17
17
|
path='dialog/apprequests'
|
data/lib/just_share/reddit.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
class JustShare::Reddit < JustShare::SocialLinker
|
2
|
+
def setup_attrs
|
3
|
+
# Base URL
|
4
|
+
self.domain='http://www.reddit.com'
|
5
|
+
self.path='/submit'
|
6
|
+
|
7
|
+
# Params (only the link is working, the others are deprecated for the sharer.php & won't work)
|
8
|
+
url_param = "url=#{self.link}"
|
9
|
+
|
10
|
+
# build the params
|
11
|
+
self.params = "#{url_param}"
|
12
|
+
end
|
13
|
+
end
|
data/lib/just_share/version.rb
CHANGED
data/lib/just_share/vk.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
class JustShare::Vk < JustShare::SocialLinker
|
2
|
+
def setup_attrs
|
3
|
+
# Base URL
|
4
|
+
self.domain='http://vk.com'
|
5
|
+
self.path='/share.php'
|
6
|
+
|
7
|
+
# Params (only the link is working, the others are deprecated for the sharer.php & won't work)
|
8
|
+
url_param = "url=#{self.link}"
|
9
|
+
|
10
|
+
# build the params
|
11
|
+
self.params = "#{url_param}"
|
12
|
+
end
|
13
|
+
end
|
data/lib/just_share/xing.rb
CHANGED
@@ -0,0 +1,13 @@
|
|
1
|
+
class JustShare::Xing < JustShare::SocialLinker
|
2
|
+
def setup_attrs
|
3
|
+
# Base URL
|
4
|
+
self.domain='https://www.xing.com'
|
5
|
+
self.path='/spi/shares/new'
|
6
|
+
|
7
|
+
# Params (only the link is working, the others are deprecated for the sharer.php & won't work)
|
8
|
+
url_param = "url=#{self.link}"
|
9
|
+
|
10
|
+
# build the params
|
11
|
+
self.params = "#{url_param}"
|
12
|
+
end
|
13
|
+
end
|
@@ -30,6 +30,11 @@ describe JustShare do
|
|
30
30
|
@blogger_expected_url = "https://www.blogger.com/blog_this.pyra?u=#{@link}&n=#{@message}"
|
31
31
|
@linked_in_expected_url = "https://www.linkedin.com/shareArticle?mini=true&url=#{@link}&title=#{@title}&summary=#{@message}&source=#{@url_image}"
|
32
32
|
@delicious_expected_url = "https://delicious.com/save?mini=true&url=#{@link}&title=#{@title}&tags=#{JustShare.array_to_str_params(@hash_tags)}¬e=#{@message}"
|
33
|
+
|
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}"
|
33
38
|
end
|
34
39
|
|
35
40
|
# SetUp for each tests
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: just_share
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilton Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
220
|
version: '0'
|
221
221
|
requirements: []
|
222
222
|
rubyforge_project:
|
223
|
-
rubygems_version: 2.4.
|
223
|
+
rubygems_version: 2.4.8
|
224
224
|
signing_key:
|
225
225
|
specification_version: 4
|
226
226
|
summary: Create share links to many social networks
|