so_cial 0.0.3 → 0.0.4

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 CHANGED
@@ -1,6 +1,6 @@
1
- # SoCial
1
+ # so_cial (So Social)
2
2
 
3
- TODO: Write a gem description
3
+ This gem adds atm. twitters sharebutton on your page
4
4
 
5
5
  ## Installation
6
6
 
@@ -18,7 +18,7 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ In your viewfile add <%= social_button_for(:twitter) %> to get the twitter sharebutton
22
22
 
23
23
  ## Contributing
24
24
 
@@ -2,8 +2,9 @@
2
2
  module SoCial
3
3
  module Helper
4
4
  def social_button_for(service, opts = {})
5
+ data = opts[:data]
5
6
  html = []
6
- html << link_to('Tweet', 'https://twitter.com/share', class: 'twitter-share-button')
7
+ html << link_to('Tweet', 'https://twitter.com/share', class: 'twitter-share-button', data: data)
7
8
  html << '<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>'
8
9
  raw html.join("\n")
9
10
  end
@@ -1,3 +1,3 @@
1
1
  module SoCial
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: so_cial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: