social-share-button 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{Changelogs.md → CHANGELOG.md} +4 -0
- data/README.md +3 -1
- data/lib/social_share_button/helper.rb +3 -1
- data/lib/social_share_button/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9430e7b222b8e9d46ff2bc5e51ef3588f3af3e75
|
4
|
+
data.tar.gz: affd382d1ee70767dc1096fcca7505c695100443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb5d93022fec8d82aeb734d69985bdedd4cb213220ad621247698250aec2db67d8ea15548ce710b859940489453989b602cef4b9561bc947f2922de884429c6b
|
7
|
+
data.tar.gz: 73c6c2f804623b0d35e6e4284e96e38b6e1061cfa42bd593408f0eb93c8e636bbb860e02fd5546e37dec9927aaad1facd838b330e5cd8ae4b28683c8eed00339
|
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/
|
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
|
-
|
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
|
|
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.
|
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-
|
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
|
-
-
|
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.
|
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,
|