so_cial 0.0.1 → 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.
@@ -0,0 +1,7 @@
1
+ # coding: utf-8
2
+ module SoCial
3
+ module Rails
4
+ class Engine < ::Rails::Engine
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ # encoding: utf-8
2
+ module SoCial
3
+ module Helper
4
+ def social_button_for(service, opts = {})
5
+ html = []
6
+ html << link_to('Tweet', 'https://twitter.com/share', class: 'twitter-share-button')
7
+ 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
+ raw html.join("\n")
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module SoCial
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/so_cial.rb CHANGED
@@ -1,5 +1,10 @@
1
1
  require "so_cial/version"
2
+ require "so_cial/helper"
2
3
 
3
4
  module SoCial
4
- # Your code goes here...
5
+ module Rails
6
+ require "so_cial/engine"
7
+ end
5
8
  end
9
+
10
+ ActionView::Base.send :include, SoCial::Helper
data/so_cial.gemspec CHANGED
@@ -1,5 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/so_cial/version', __FILE__)
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "so_cial/version"
3
4
 
4
5
  Gem::Specification.new do |gem|
5
6
  gem.authors = ["Christian Hjalmarsson"]
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.1
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -24,6 +24,8 @@ files:
24
24
  - README.md
25
25
  - Rakefile
26
26
  - lib/so_cial.rb
27
+ - lib/so_cial/engine.rb
28
+ - lib/so_cial/helper.rb
27
29
  - lib/so_cial/version.rb
28
30
  - so_cial.gemspec
29
31
  homepage: http://jnx.github.com/so_cial