social-share-button 0.1.10 → 0.2.0

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: 0c12247c26eea96c0c8416014f259aae5b8be658
4
- data.tar.gz: b0f6278cd3a98721f4ac5bf4b2dec23532123e33
3
+ metadata.gz: 9c7352142b888a38c539b4fb46898ca2f1204b46
4
+ data.tar.gz: afb97a770bfdd89598ac7049d07c5351c39f4715
5
5
  SHA512:
6
- metadata.gz: 7c53ef2a438ec44b442a4deb10b380d2888abc46be9db4e96a257c6775d15217fad090a05acccf81b0cf962646db53cf6d36fd1eca803fdd4f6211d9fa409e9b
7
- data.tar.gz: f414dc63e0ceb821a230447ab6be8d3ee2bdc603c5ee83d1160959f8d91150188c2c0fefbd845cfcf87ea81badb9665df29ed869773d865adcdf9094183a61e7
6
+ metadata.gz: cfb93dc708f5843f9e3103305db1a6427f2ce58b7399d7cfb7ece5957b65e8a6a431a0cfce8981affa4876d9297a522352a2762b289504dfec2601f04278a3ef
7
+ data.tar.gz: c996babab24cb81df2cb147e18f7f95c0e6e0b3cd0463fe82616f3aa9a686775e84659c4363346979159b2ceb61b129c027a0aa1f2646ecc3d82e2d80507a47b
@@ -1,3 +1,11 @@
1
+ == 0.2.0
2
+
3
+ * Added social share with LinkedIn feature.
4
+
5
+ == 0.1.10
6
+
7
+ * Add `email` share
8
+
1
9
  == 0.1.9
2
10
 
3
11
  * Add `data-via` to allow `{ via: "MyTwitter" }`
data/README.md CHANGED
@@ -20,6 +20,7 @@ This is a gem to helper you quick create a share feature in you Rails apps.
20
20
  * Plurk
21
21
  * Pinterest
22
22
  * Email
23
+ * LinkedIn
23
24
 
24
25
  ## Screenshot
25
26
 
@@ -46,7 +47,7 @@ You can config `config/initializes/social_share_button.rb` to choose which site
46
47
 
47
48
  ```ruby
48
49
  SocialShareButton.configure do |config|
49
- config.allow_sites = %w(twitter facebook google_plus weibo douban tqq renren qq kaixin001 baidu tumblr plurk pinterest email)
50
+ config.allow_sites = %w(twitter facebook google_plus weibo douban tqq renren qq kaixin001 baidu google_bookmark delicious tumblr plurk pinterest email linkedin)
50
51
  end
51
52
  ```
52
53
 
@@ -66,6 +67,14 @@ You need add require css,js file in your app assets files:
66
67
  *= require social-share-button
67
68
  ```
68
69
 
70
+ In Rails 4.1.6 , use `@import` to require files:
71
+
72
+ `app/assets/stylesheets/application.css.scss`
73
+
74
+ ```
75
+ @import "social-share-button";
76
+ ```
77
+
69
78
  Then you can use `social_share_button_tag` helper in views, for example `app/views/posts/show.html.erb`
70
79
 
71
80
  ```erb
@@ -52,6 +52,8 @@ window.SocialShareButton =
52
52
  SocialShareButton.openUrl("http://www.plurk.com/?status=#{title}: #{url}&qualifier=shares", popup)
53
53
  when "pinterest"
54
54
  SocialShareButton.openUrl("http://www.pinterest.com/pin/create/button/?url=#{url}&media=#{img}&description=#{title}", popup)
55
+ when "linkedin"
56
+ SocialShareButton.openUrl("https://www.linkedin.com/shareArticle?url=#{url}&title=#{title}", popup)
55
57
  when "tumblr"
56
58
  get_tumblr_extra = (param) ->
57
59
  cutom_data = $(el).attr("data-#{param}")
@@ -19,6 +19,8 @@
19
19
  app/assets/images/sprites/social-share-button/tumblr.png (16x16)
20
20
  app/assets/images/sprites/social-share-button/twitter.png (16x16)
21
21
  app/assets/images/sprites/social-share-button/weibo.png (16x16)
22
+ app/assets/images/sprites/social-share-button/linkedin.png (16x16)
23
+
22
24
 
23
25
  Output files:
24
26
  app/assets/images/sprites/social-share-button.png
@@ -45,6 +47,8 @@
45
47
  .social-share-button-tumblr { display:inline-block; width: 16px; height: 16px; background: url(image-path('sprites/social-share-button.png')) -32px -48px no-repeat }
46
48
  .social-share-button-twitter { display:inline-block; width: 16px; height: 16px; background: url(image-path('sprites/social-share-button.png')) -48px -48px no-repeat }
47
49
  .social-share-button-weibo { display:inline-block; width: 16px; height: 16px; background: url(image-path('sprites/social-share-button.png')) -64px 0px no-repeat }
50
+ .social-share-button-linkedin { display:inline-block; width: 16px; height: 16px; background: url(image-path('sprites/social-share-button.png')) -64px -16px no-repeat }
51
+
48
52
 
49
53
  @media only screen and (-webkit-device-pixel-ratio: 2) {
50
54
  .social-share-button-baidu { display:inline-block; width: 16px; height: 16px; background: url(image-path('sprites/social-share-button@2x.png')) 0px 0px no-repeat; background-size:80px 64px; }
@@ -64,4 +68,5 @@
64
68
  .social-share-button-tumblr { display:inline-block; width: 16px; height: 16px; background: url(image-path('sprites/social-share-button@2x.png')) -32px -48px no-repeat; background-size:80px 64px; }
65
69
  .social-share-button-twitter { display:inline-block; width: 16px; height: 16px; background: url(image-path('sprites/social-share-button@2x.png')) -48px -48px no-repeat; background-size:80px 64px; }
66
70
  .social-share-button-weibo { display:inline-block; width: 16px; height: 16px; background: url(image-path('sprites/social-share-button@2x.png')) -64px 0px no-repeat; background-size:80px 64px; }
71
+ .social-share-button-linkedin { display:inline-block; width: 16px; height: 16px; background: url(image-path('sprites/social-share-button@2x.png')) -64px -16px no-repeat; background-size:80px 64px; }
67
72
  }
@@ -1,3 +1,3 @@
1
1
  SocialShareButton.configure do |config|
2
- config.allow_sites = %w(twitter facebook google_plus weibo douban tqq renren qq kaixin001 baidu google_bookmark delicious huaban tumblr plurk pinterest)
2
+ config.allow_sites = %w(twitter facebook google_plus weibo douban tqq renren qq kaixin001 baidu google_bookmark delicious huaban tumblr plurk pinterest email linkedin)
3
3
  end
@@ -17,3 +17,4 @@ en:
17
17
  plurk: Plurk
18
18
  pinterest: Pinterest
19
19
  email: Email
20
+ linkedin: Linkedin
@@ -17,3 +17,5 @@
17
17
  plurk: Plurk
18
18
  pinterest: Pinterest
19
19
  email: Email
20
+ linkedin: Linkedin
21
+
@@ -17,3 +17,5 @@
17
17
  plurk: 噗浪
18
18
  pinterest: Pinterest
19
19
  email: Email
20
+ linkedin: Linkedin
21
+
@@ -1,3 +1,3 @@
1
1
  module SocialShareButton
2
- VERSION = "0.1.10"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social-share-button
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2016-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  requirements: []
99
99
  rubyforge_project:
100
- rubygems_version: 2.4.8
100
+ rubygems_version: 2.6.2
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Helper for add social share feature in your Rails app. Twitter, Facebook,