sharrando 0.6 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sharrando/social.rb +10 -10
- data/lib/sharrando/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58c68474e2a2cf5b57379bc801b0a7bc05acfc39
|
4
|
+
data.tar.gz: b7bd80eaef71432316dd4bed01930b6447434756
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22b8e78a8895b6fce9e26e871f09f21d703053ccae1b5b6afccebbac67620356fbb6e8238e3c55afe4fd18f61383f299ef64816f6fa8ad85cc2009235a6a9409
|
7
|
+
data.tar.gz: 4347244bad56040b80fe9706184952f887460fbc82592d6c3ebe9bf82be30698fcdfc27d7e78f0194b614d58926f82cbcbf7e719eb4781c2056baae9f2b347be
|
data/lib/sharrando/social.rb
CHANGED
@@ -10,15 +10,15 @@
|
|
10
10
|
|
11
11
|
module Sharrando
|
12
12
|
class Social
|
13
|
-
def email(subject:
|
13
|
+
def email(subject: '', body: '')
|
14
14
|
"mailto:?to=&subject=#{subject}&body=#{body.gsub("\n", "%0D%0A")}"
|
15
15
|
end
|
16
16
|
|
17
|
-
def twitter(text:
|
17
|
+
def twitter(text: '')
|
18
18
|
"https://twitter.com/home?status=#{text}"
|
19
19
|
end
|
20
20
|
|
21
|
-
def facebook(title:
|
21
|
+
def facebook(title: '', url: '', description: '', image: '')
|
22
22
|
if !description || description.empty?
|
23
23
|
"http://www.facebook.com/sharer.php?t=#{title}&u=#{url}"
|
24
24
|
else
|
@@ -26,11 +26,11 @@ module Sharrando
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
def google_plus(url:
|
29
|
+
def google_plus(url: '', text: '')
|
30
30
|
"https://plus.google.com/share?url=#{url}&t=#{text}"
|
31
31
|
end
|
32
32
|
|
33
|
-
def tumblr(data_type:
|
33
|
+
def tumblr(data_type: '', contents: '')
|
34
34
|
raise ArgumentError, "Data type must be <link>, <text>, <photo> or <quote>" unless %i(link text photo quote).include? data_type
|
35
35
|
|
36
36
|
"http://www.tumblr.com/share/#{data_type}?".tap do |url|
|
@@ -38,23 +38,23 @@ module Sharrando
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
def delicious(url:
|
41
|
+
def delicious(url: '', title: '')
|
42
42
|
"http://www.delicious.com/save?url=#{url}&title=#{title}&jump=yes&pic=#{image}"
|
43
43
|
end
|
44
44
|
|
45
|
-
def linkedin(url:
|
45
|
+
def linkedin(url: '', title: '', description: '', source: '')
|
46
46
|
"http://www.linkedin.com/shareArticle?mini=true&url=#{url}&title=#{title}&summary=#{description}&source=#{source}"
|
47
47
|
end
|
48
48
|
|
49
|
-
def pocket(url:
|
49
|
+
def pocket(url: '')
|
50
50
|
"https://getpocket.com/save?url=#{url}"
|
51
51
|
end
|
52
52
|
|
53
|
-
def pinterest(url:
|
53
|
+
def pinterest(url: '', image: '', description: '')
|
54
54
|
"http://pinterest.com/pin/create/button/?url=#{url}&media=#{image}&description=#{description}"
|
55
55
|
end
|
56
56
|
|
57
|
-
def whatsapp(description:
|
57
|
+
def whatsapp(description: '')
|
58
58
|
"whatsapp://send?text=#{description}"
|
59
59
|
end
|
60
60
|
|
data/lib/sharrando/version.rb
CHANGED