social-share-button 0.2.0 → 0.2.1

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: 9c7352142b888a38c539b4fb46898ca2f1204b46
4
- data.tar.gz: afb97a770bfdd89598ac7049d07c5351c39f4715
3
+ metadata.gz: 9430e7b222b8e9d46ff2bc5e51ef3588f3af3e75
4
+ data.tar.gz: affd382d1ee70767dc1096fcca7505c695100443
5
5
  SHA512:
6
- metadata.gz: cfb93dc708f5843f9e3103305db1a6427f2ce58b7399d7cfb7ece5957b65e8a6a431a0cfce8981affa4876d9297a522352a2762b289504dfec2601f04278a3ef
7
- data.tar.gz: c996babab24cb81df2cb147e18f7f95c0e6e0b3cd0463fe82616f3aa9a686775e84659c4363346979159b2ceb61b129c027a0aa1f2646ecc3d82e2d80507a47b
6
+ metadata.gz: eb5d93022fec8d82aeb734d69985bdedd4cb213220ad621247698250aec2db67d8ea15548ce710b859940489453989b602cef4b9561bc947f2922de884429c6b
7
+ data.tar.gz: 73c6c2f804623b0d35e6e4284e96e38b6e1061cfa42bd593408f0eb93c8e636bbb860e02fd5546e37dec9927aaad1facd838b330e5cd8ae4b28683c8eed00339
@@ -1,3 +1,7 @@
1
+ == 0.2.1
2
+
3
+ * Allow for override of allowed sites in helper.
4
+
1
5
  == 0.2.0
2
6
 
3
7
  * Added social share with LinkedIn feature.
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  This is a gem to helper you quick create a share feature in you Rails apps.
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/social-share-button.svg)](https://badge.fury.io/rb/social-share-button)
6
+
5
7
  # Sites list
6
8
 
7
9
  * Facebook
@@ -43,7 +45,7 @@ $ rails generate social_share_button:install
43
45
 
44
46
  ## Configure
45
47
 
46
- You can config `config/initializes/social_share_button.rb` to choose which site do you want to use:
48
+ You can config `config/initializers/social_share_button.rb` to choose which site do you want to use:
47
49
 
48
50
  ```ruby
49
51
  SocialShareButton.configure do |config|
@@ -2,13 +2,15 @@
2
2
  module SocialShareButton
3
3
  module Helper
4
4
  def social_share_button_tag(title = "", opts = {})
5
+ opts[:allow_sites] ||= SocialShareButton.config.allow_sites
6
+
5
7
  extra_data = {}
6
8
  rel = opts[:rel]
7
9
  html = []
8
10
  html << "<div class='social-share-button' data-title='#{h title}' data-img='#{opts[:image]}'"
9
11
  html << "data-url='#{opts[:url]}' data-desc='#{opts[:desc]}' data-popup='#{opts[:popup]}' data-via='#{opts[:via]}'>"
10
12
 
11
- SocialShareButton.config.allow_sites.each do |name|
13
+ opts[:allow_sites].each do |name|
12
14
  extra_data = opts.select { |k, _| k.to_s.start_with?('data') } if name.eql?('tumblr')
13
15
  special_data = opts.select { |k, _| k.to_s.start_with?('data-' + name) }
14
16
 
@@ -1,3 +1,3 @@
1
1
  module SocialShareButton
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
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.2.0
4
+ version: 0.2.1
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-03-25 00:00:00.000000000 Z
11
+ date: 2016-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -60,7 +60,7 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
- - Changelogs.md
63
+ - CHANGELOG.md
64
64
  - README.md
65
65
  - app/assets/images/sprites/social-share-button.png
66
66
  - app/assets/images/sprites/social-share-button@2x.png
@@ -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.6.2
100
+ rubygems_version: 2.5.1
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Helper for add social share feature in your Rails app. Twitter, Facebook,