social-share-button 0.6.0 → 0.7.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: fed00dc7290c906823859d4661dfbfe02dc98ccf
4
- data.tar.gz: 88ec06c668483ee8ceb881617d337232b4dbfb38
3
+ metadata.gz: d05f17a47ed6cce4eac350fb163f351af6eb713e
4
+ data.tar.gz: 852dd157f397a3b193a23e205329c725eba29b2e
5
5
  SHA512:
6
- metadata.gz: 6958c7a0600fdaf3204fe68232c0e861339c01ddcc26364951d8452d48979596e08f56536c2329dcd333602eb03abaed467867e98c86c5bcf6f286f018d85b91
7
- data.tar.gz: 13f6133e3c9cfedefe6dc04e831ac1ba959b2da19aba97f40e8f07e7e002099d8fc4f0258aeb49b06fe164c66c83f999ef688b24d917f18ee6af2a706921bbd1
6
+ metadata.gz: 4fe8e5c1dcdc55254179faca1712d7ce615bd8fbdbb0619d59190b2a6dd145c92fd011643daee0f4c85611e1279d1107e92a3fe60e9b3510fc6f80861e14b082
7
+ data.tar.gz: 3f37be5e68614f74b37657a97407cd0675b9ec23e1232a8c03ac5cd082fc13442306d302aec38ab8de28879652094d8e0625b9274e565501d0403406abfefa8f
@@ -1,3 +1,8 @@
1
+ == 0.7.0
2
+
3
+ * Add support for Reddit (#98)
4
+ * Use ActiveSupport.on_load looks to inject behavior into ActionView::Base (#82)
5
+
1
6
  == 0.6.0
2
7
 
3
8
  * Add support for xing social network (#95)
data/README.md CHANGED
@@ -21,6 +21,7 @@ This is a gem to helper you quick create a share feature in you Rails apps.
21
21
  * WeChat (Weixin)
22
22
  * Vkontakte
23
23
  * Xing
24
+ * Reddit
24
25
 
25
26
  ## Screenshot
26
27
 
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="256" height="256" viewBox="0, 0, 256, 256">
4
+ <g id="tumblr">
5
+ <path d="M40,0 L216,0 C238.091,0 256,17.909 256,40 L256,216 C256,238.091 238.091,256 216,256 L40,256 C17.909,256 0,238.091 0,216 L0,40 C0,17.909 17.909,0 40,0 z" fill="#FF4200" id="bg"/>
6
+ <text transform="matrix(1, 0, 0, 1, 128, 128)" id="icon">
7
+ <tspan x="-112" y="76" font-family="FontAwesome" font-size="224" fill="#FFFFFF"></tspan>
8
+ </text>
9
+ </g>
10
+ </svg>
@@ -82,4 +82,7 @@ window.SocialShareButton =
82
82
  "/#{path}?#{params}"
83
83
 
84
84
  SocialShareButton.openUrl("http://www.tumblr.com/share#{tumblr_params()}")
85
+
86
+ when "reddit"
87
+ SocialShareButton.openUrl("http://www.reddit.com/submit?url=#{url}&newwindow=1", 555, 400)
85
88
  false
@@ -11,7 +11,7 @@ $size: 18px;
11
11
  }
12
12
 
13
13
  @each $site in twitter, facebook, google_bookmark, google_plus, weibo, qq,
14
- delicious, linkedin, tumblr, pinterest, douban, wechat, vkontakte, xing, email {
14
+ delicious, linkedin, tumblr, pinterest, douban, wechat, vkontakte, xing, email, reddit {
15
15
  .ssb-#{$site} {
16
16
  background-image: image-url('social-share-button/#{$site}.svg');
17
17
  }
@@ -17,3 +17,4 @@ en:
17
17
  wechat_footer: Open your WeChat, click "Discover" button then click the "Scan QR Code" menu.
18
18
  vkontakte: Vkontakte
19
19
  xing: Xing
20
+ reddit: Reddit
@@ -17,3 +17,4 @@ fr:
17
17
  wechat_footer: Open your WeChat, click "Discover" button then click the "Scan QR Code" menu.
18
18
  vkontakte: Vkontakte
19
19
  xing: Xing
20
+ reddit: Reddit
@@ -17,3 +17,4 @@
17
17
  wechat_footer: 打开微信,点击底部的“发现”,<br/> 使用“扫一扫”即可将网页分享至朋友圈。
18
18
  vkontakte: Vkontakte
19
19
  xing: Xing
20
+ reddit: Reddit
@@ -17,3 +17,4 @@
17
17
  wechat_footer: 打開微信,點擊底部的“發現”,<br/> 使用“掃一掃”即可將網頁分享至朋友圈。
18
18
  vkontakte: Vkontakte
19
19
  xing: Xing
20
+ reddit: Reddit
@@ -14,4 +14,6 @@ module SocialShareButton
14
14
  end
15
15
  end
16
16
 
17
- ActionView::Base.send :include, SocialShareButton::Helper
17
+ ActiveSupport.on_load(:action_view) do
18
+ include SocialShareButton::Helper
19
+ end
@@ -23,6 +23,7 @@ module SocialShareButton
23
23
  # - linkedin
24
24
  # - wechat
25
25
  # - vkontakte
26
+ # - reddit
26
27
  attr_accessor :allow_sites
27
28
 
28
29
  def initialize
@@ -1,3 +1,3 @@
1
1
  module SocialShareButton
2
- VERSION = '0.6.0'
2
+ VERSION = '0.7.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.6.0
4
+ version: 0.7.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: 2016-09-27 00:00:00.000000000 Z
11
+ date: 2016-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -71,6 +71,7 @@ files:
71
71
  - app/assets/images/social-share-button/linkedin.svg
72
72
  - app/assets/images/social-share-button/pinterest.svg
73
73
  - app/assets/images/social-share-button/qq.svg
74
+ - app/assets/images/social-share-button/reddit.svg
74
75
  - app/assets/images/social-share-button/tumblr.svg
75
76
  - app/assets/images/social-share-button/twitter.svg
76
77
  - app/assets/images/social-share-button/vkontakte.svg