social_share_hub 0.0.2 → 0.0.3
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.
- data/README.md +41 -3
- data/lib/social_share_hub/helper.rb +4 -0
- data/lib/social_share_hub/version.rb +1 -1
- data/screenshorts/social_share_hub.png +0 -0
- metadata +4 -3
data/README.md
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# SocialShareHub
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
SocialShareHub is a gem that can easy your share process without authenticating. It support Sina Weibo, QQ Weibo, Renren, Douban.
|
|
4
|
+
|
|
5
|
+
## Screenshorts
|
|
6
|
+
|
|
7
|
+
![img][1]
|
|
4
8
|
|
|
5
9
|
## Installation
|
|
6
10
|
|
|
7
11
|
Add this line to your application's Gemfile:
|
|
8
12
|
|
|
9
|
-
gem 'social_share_hub'
|
|
13
|
+
gem 'social_share_hub', '~> 0.0.3'
|
|
10
14
|
|
|
11
15
|
And then execute:
|
|
12
16
|
|
|
@@ -16,9 +20,41 @@ Or install it yourself as:
|
|
|
16
20
|
|
|
17
21
|
$ gem install social_share_hub
|
|
18
22
|
|
|
23
|
+
|
|
24
|
+
Then you need to run a generate script to add the SocialShareHub configuration file by:
|
|
25
|
+
|
|
26
|
+
$ rails g social_share_hub:install
|
|
27
|
+
|
|
28
|
+
The configuration file will be this:
|
|
29
|
+
|
|
30
|
+
``` ruby
|
|
31
|
+
SocialShareHub.configure do |config|
|
|
32
|
+
config.allowed_sites = %w(weibo douban qq renren)
|
|
33
|
+
end
|
|
34
|
+
```
|
|
35
|
+
|
|
19
36
|
## Usage
|
|
20
37
|
|
|
21
|
-
|
|
38
|
+
You have to add mandatory asset files in your javascript and css files:
|
|
39
|
+
|
|
40
|
+
`app/assets/javascripts/application.js`
|
|
41
|
+
|
|
42
|
+
``` ruby
|
|
43
|
+
//= require social_share_hub
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
`app/assets/stylesheets/application.css`
|
|
48
|
+
|
|
49
|
+
``` ruby
|
|
50
|
+
*= require social_share_hub
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Using helper to render social share links defined in your configuration file:
|
|
54
|
+
|
|
55
|
+
``` ruby
|
|
56
|
+
<%= social_share_link("Your title", "/Path-to-your-image.png") %>
|
|
57
|
+
```
|
|
22
58
|
|
|
23
59
|
## Contributing
|
|
24
60
|
|
|
@@ -27,3 +63,5 @@ TODO: Write usage instructions here
|
|
|
27
63
|
3. Commit your changes (`git commit -am 'Added some feature'`)
|
|
28
64
|
4. Push to the branch (`git push origin my-new-feature`)
|
|
29
65
|
5. Create new Pull Request
|
|
66
|
+
|
|
67
|
+
[1]: https://github.com/jerryshen/social_share_hub/blob/master/screenshorts/social_share_hub.png "screenshort"
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: social_share_hub
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-06-
|
|
12
|
+
date: 2012-06-29 00:00:00.000000000Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: Social Share Hub
|
|
15
15
|
email:
|
|
@@ -42,6 +42,7 @@ files:
|
|
|
42
42
|
- lib/social_share_hub/helper.rb
|
|
43
43
|
- lib/social_share_hub/railtie.rb
|
|
44
44
|
- lib/social_share_hub/version.rb
|
|
45
|
+
- screenshorts/social_share_hub.png
|
|
45
46
|
- social_share_hub.gemspec
|
|
46
47
|
homepage: ''
|
|
47
48
|
licenses: []
|
|
@@ -63,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
63
64
|
version: '0'
|
|
64
65
|
requirements: []
|
|
65
66
|
rubyforge_project:
|
|
66
|
-
rubygems_version: 1.8.
|
|
67
|
+
rubygems_version: 1.8.10
|
|
67
68
|
signing_key:
|
|
68
69
|
specification_version: 3
|
|
69
70
|
summary: Social Share Hub, quick share buttons for social websites
|