social_share 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: af6f47f1ac355363725b76bddab2f0211f4b353d
4
+ data.tar.gz: e6140aae91ccc49dbde4c94b6f0c0b864a6c82dd
5
+ SHA512:
6
+ metadata.gz: 45859b9fab2c9e6a6211386781669f4d47fd5450a592853e31faf1012037f294e7605bdd8e6c26b6ef0c3ae72be52762f0fddfade56660ecdd6cd145dfa10df4
7
+ data.tar.gz: dd65107abd0c22f6d2cdba4058e5912d75799b716fd67a1feb788ecbc99c441dce7f1df68c655eea2d7d4d532b4e2fb47c57c31d7286ed8431fe5a6e3648f231
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+ *.swp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in social_share.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 ldewald
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # SocialShare
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'social_share'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install social_share
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ 1. Fork it ( https://github.com/[my-github-username]/social_share/fork )
28
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
29
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
30
+ 4. Push to the branch (`git push origin my-new-feature`)
31
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
Binary file
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+ <svg xmlns="http://www.w3.org/2000/svg">
4
+ <metadata>Generated by IcoMoon</metadata>
5
+ <defs>
6
+ <font id="social_share" horiz-adv-x="1024">
7
+ <font-face units-per-em="1024" ascent="960" descent="-64" />
8
+ <missing-glyph horiz-adv-x="1024" />
9
+ <glyph unicode="&#x20;" d="" horiz-adv-x="512" />
10
+ <glyph unicode="&#xe600;" d="M863.371 438.857q0-95.621-47.126-176.374t-127.876-127.876-176.372-47.126q-50.784 0-99.739 14.639 26.996 42.546 35.686 75.032 4.119 15.555 24.706 96.534 9.152-17.842 33.398-30.882t52.158-13.039q55.361 0 98.824 31.34t67.257 86.242 23.791 123.532q0 52.158-27.227 97.912t-78.921 74.575-116.667 28.824q-48.039 0-89.673-13.266t-70.684-35.23-49.874-50.556-30.65-59.248-9.837-61.306q0-47.581 18.303-83.728t53.534-50.784q13.724-5.49 17.392 9.152 0.915 3.202 3.665 14.182t3.658 13.724q2.749 10.523-5.035 19.673-23.333 27.908-23.333 69.086 0 69.086 47.811 118.728t125.132 49.64q69.086 0 107.745-37.517t38.66-97.446q0-77.783-31.34-132.221t-80.294-54.445q-27.908 0-44.837 19.903t-10.523 47.811q3.658 16.013 12.123 42.778t13.724 47.122 5.261 34.541q0 22.875-12.357 37.976t-35.228 15.101q-28.366 0-48.039-26.079t-19.673-64.966q0-33.398 11.438-55.816l-45.294-191.241q-7.776-32.026-5.946-80.982-94.25 41.634-152.354 128.562t-58.101 193.53q0 95.621 47.126 176.372t127.876 127.876 176.374 47.126 176.374-47.126 127.876-127.876 47.126-176.372z" />
11
+ <glyph unicode="&#xe601;" d="M361.095 420.006q0-15.294 13.595-29.951t32.925-28.889 38.447-31.225 32.713-44.183 13.595-60.327q0-38.236-20.393-73.496-30.588-51.829-89.641-76.259t-126.602-24.428q-56.078 0-104.722 17.631t-72.859 58.416q-15.72 25.49-15.72 55.654 0 34.412 18.906 63.726t50.343 48.856q55.654 34.836 171.634 42.484-13.595 17.843-20.18 31.439t-6.584 31.012q0 15.294 8.922 36.111-19.543-1.699-28.889-1.699-62.875 0-105.996 40.997t-43.121 103.872q0 34.836 15.294 67.549t42.059 55.654q32.713 28.039 77.533 41.634t92.402 13.595h177.582l-58.627-37.386h-55.654q31.439-26.765 47.582-56.503t16.144-67.974q0-30.588-10.408-55.016t-25.066-39.51-29.526-27.614-25.278-26.128-10.408-28.039zM299.069 460.791q16.144 0 33.137 7.010t28.039 18.48q22.517 24.216 22.517 67.549 0 24.642-7.222 53.105t-20.604 55.016-35.899 43.971-49.706 17.418q-17.843 0-35.049-8.285t-27.827-22.303q-19.968-25.066-19.968-67.974 0-19.543 4.248-41.422t13.382-43.758 22.092-39.298 31.863-28.464 40.997-11.046zM299.919 89.907q24.641 0 47.369 5.522t42.059 16.568 31.012 31.012 11.683 46.308q0 10.621-2.974 20.817t-6.16 17.843-11.472 17.63-12.533 14.869-16.357 14.657-15.506 12.319-17.631 12.745-15.506 11.046q-6.798 0.85-20.393 0.85-22.517 0-44.608-2.974t-45.671-10.621-41.21-19.543-29.101-31.649-11.472-44.82q0-29.738 14.869-52.467t38.873-35.262 50.556-18.692 54.167-6.16zM644.037 462.065h90.49v-45.883h-90.49v-93.040h-44.608v93.040h-90.066v45.883h90.066v92.19h44.608v-92.19z" horiz-adv-x="805" />
12
+ <glyph unicode="&#xf099;" d="M925.714 717.714q-38.286-56-92.571-95.429 0.571-8 0.571-24 0-74.286-21.714-148.286t-66-142-105.429-120.286-147.429-83.429-184.571-31.143q-154.857 0-283.429 82.857 20-2.286 44.571-2.286 128.571 0 229.143 78.857-60 1.143-107.429 36.857t-65.143 91.143q18.857-2.857 34.857-2.857 24.571 0 48.571 6.286-64 13.143-106 63.714t-42 117.429v2.286q38.857-21.714 83.429-23.429-37.714 25.143-60 65.714t-22.286 88q0 50.286 25.143 93.143 69.143-85.143 168.286-136.286t212.286-56.857q-4.571 21.714-4.571 42.286 0 76.571 54 130.571t130.571 54q80 0 134.857-58.286 62.286 12 117.143 44.571-21.143-65.714-81.143-101.714 53.143 5.714 106.286 28.571z" horiz-adv-x="951" />
13
+ <glyph unicode="&#xf09a;" d="M529.75 871.347v-140.081h-83.306q-45.633 0-61.551-19.102t-15.919-57.306v-100.286h155.47l-20.694-157.061h-134.776v-402.734h-162.367v402.734h-135.306v157.061h135.306v115.673q0 98.694 55.184 153.081t146.98 54.387q78 0 120.98-6.367z" horiz-adv-x="585" />
14
+ </font></defs></svg>
Binary file
Binary file
@@ -0,0 +1,21 @@
1
+ window.SocialShare = {
2
+ openUrl: function() {
3
+ $('.social-share a').click(function(event) {
4
+ event.preventDefault()
5
+ windowName = $(event.target).attr('title')
6
+ var width = 575,
7
+ height = 400,
8
+ left = ($(window).width() - width) / 2,
9
+ top = ($(window).height() - height) / 2,
10
+ url = this.href,
11
+ opts = 'status=1' +
12
+ ',width=' + width +
13
+ ',height=' + height +
14
+ ',top=' + top +
15
+ ',left=' + left +
16
+ ',popupwindow';
17
+
18
+ window.open(url, windowName, opts);
19
+ })
20
+ }
21
+ };
@@ -0,0 +1,75 @@
1
+ .social-share a {
2
+ background-color: gray;
3
+ border-radius: 2px;
4
+ color: white;
5
+ display: inline-block;
6
+ font-size: 20px;
7
+ height: 30px;
8
+ line-height: 30px;
9
+ text-align: center;
10
+ width: 30px;
11
+ }
12
+
13
+ .social-share a:not(:last-child) {
14
+ margin-right: 5px;
15
+ }
16
+
17
+ .social-share a.facebook-share-button {
18
+ background: #3B5999;
19
+ }
20
+
21
+ .social-share a.twitter-share-button {
22
+ background: #55ACEE;
23
+ }
24
+
25
+ .social-share a.google-plus-share-button {
26
+ background: #DD4B39;
27
+ }
28
+
29
+ .social-share a.pinterest-share-button {
30
+ background: #C92228;
31
+ }
32
+
33
+ /* FONTS */
34
+
35
+ @font-face {
36
+ font-family: 'social_share';
37
+ src: url('<%= font_path('social_share.eot') %>');
38
+ }
39
+
40
+ @font-face {
41
+ font-family: 'social_share';
42
+ src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SDcQAAAC8AAAAYGNtYXDw1eaEAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5Zv62hYkAAAF4AAAEJGhlYWQE+mdaAAAFnAAAADZoaGVhB2ADyQAABdQAAAAkaG10eA8lAT8AAAX4AAAAIGxvY2EDzAK0AAAGGAAAABJtYXhwAA0AnQAABiwAAAAgbmFtZVQPZLUAAAZMAAABcnBvc3QAAwAAAAAHwAAAACAAAwQAAZAABQA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8fUwJPASMkOAMGDTMyQwIVAhkpKDAyK1UzNAUVFU02NjsMIUIkBhcAAQBH//sCEgNuABcAAAEVIyIHBh0BMwcjESMRIzUzNTQ3NjMyFwISVC0QEJsUh6KIiDc3XE4rA2eMExMmZJ3+bQGTnXNjNjcHAAAAAAEAAAABAABaI2WDXw889QALBAAAAAAA0R6RegAAAADRHpF6AAD/+wOeA24AAAAIAAIAAAAAAAAAAQAAA8D/wAAABAAAAAAAA54AAQAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAACAAAABAAAoQMlAD4DtwAZAkkARwAAAAAACgAUAB4AtAGSAewCEgAAAAEAAAAIAJsABAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAOAK4AAQAAAAAAAQAYAAAAAQAAAAAAAgAOAGoAAQAAAAAAAwAYAC4AAQAAAAAABAAYAHgAAQAAAAAABQAWABgAAQAAAAAABgAMAEYAAQAAAAAACgA0AJAAAwABBAkAAQAYAAAAAwABBAkAAgAOAGoAAwABBAkAAwAYAC4AAwABBAkABAAYAHgAAwABBAkABQAWABgAAwABBAkABgAYAFIAAwABBAkACgA0AJAAcwBvAGMAaQBhAGwAXwBzAGgAYQByAGUAVgBlAHIAcwBpAG8AbgAgADEALgAwAHMAbwBjAGkAYQBsAF8AcwBoAGEAcgBlc29jaWFsX3NoYXJlAHMAbwBjAGkAYQBsAF8AcwBoAGEAcgBlAFIAZQBnAHUAbABhAHIAcwBvAGMAaQBhAGwAXwBzAGgAYQByAGUARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff');
44
+ font-weight: normal;
45
+ font-style: normal;
46
+ }
47
+
48
+ [class^="ss-icon-"], [class*=" ss-icon-"] {
49
+ font-family: 'social_share';
50
+ speak: none;
51
+ font-style: normal;
52
+ font-weight: normal;
53
+ font-variant: normal;
54
+ text-transform: none;
55
+ line-height: 1;
56
+
57
+ -webkit-font-smoothing: antialiased;
58
+ -moz-osx-font-smoothing: grayscale;
59
+ }
60
+
61
+ .ss-icon-twitter:before {
62
+ content: "\f099";
63
+ }
64
+
65
+ .ss-icon-facebook:before {
66
+ content: "\f09a";
67
+ }
68
+
69
+ .ss-icon-pinterest:before {
70
+ content: "\e600";
71
+ }
72
+
73
+ .ss-icon-google-plus:before {
74
+ content: "\e601";
75
+ }
@@ -0,0 +1,26 @@
1
+ module SocialShare
2
+ module Helper
3
+ def social_share(title, url, services = [:facebook, :twitter])
4
+ content = ""
5
+ services.each { |service| content += self.send("#{service}_share", title, url) }
6
+ content += "#{javascript_tag 'SocialShare.openUrl()'}"
7
+ content_tag(:div, content.html_safe, class: 'social-share')
8
+ end
9
+
10
+ def facebook_share(title, url)
11
+ link_to(tag(:span, class: 'ss-icon-facebook'), "http://www.facebook.com/sharer/sharer.php?u=#{url}&title=#{title}", class: 'facebook-share-button', title: 'Share to Facebook')
12
+ end
13
+
14
+ def twitter_share(title, url)
15
+ link_to(tag(:span, class: 'ss-icon-twitter'), "http://twitter.com/share?text=#{title}", class: 'twitter-share-button', title: 'Share to Twitter')
16
+ end
17
+
18
+ def pinterest_share(title, url)
19
+ link_to(tag(:span, class: 'ss-icon-pinterest'), "http://pinterest.com/pin/create/button/?url=#{url}&description=#{title}", class: 'pinterest-share-button', title: 'Share to Pinterest')
20
+ end
21
+
22
+ def google_plus_share(title, url)
23
+ link_to(tag(:span, class: 'ss-icon-google-plus'), "http://plus.google.com/share?url=#{url}", class: 'google-plus-share-button', title: 'Share to Google Plus')
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,3 @@
1
+ module SocialShare
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,8 @@
1
+ require 'social_share/version'
2
+ require 'social_share/helper'
3
+
4
+ module SocialShare
5
+ class Engine < Rails::Engine
6
+ ActionView::Base.send(:include, SocialShare::Helper)
7
+ end
8
+ end
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'social_share/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'social_share'
8
+ spec.version = SocialShare::VERSION
9
+ spec.authors = ['ldewald']
10
+ spec.email = ['laurardewald@gmail.com']
11
+ spec.summary = %q{Easy helper methods for adding custom social share buttons to your Rails app.}
12
+ spec.license = 'MIT'
13
+
14
+ spec.files = `git ls-files -z`.split("\x0")
15
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
17
+ spec.require_paths = ['lib']
18
+
19
+ spec.add_development_dependency 'bundler', '~> 1.7'
20
+ spec.add_development_dependency 'rake', '~> 10.0'
21
+ spec.add_development_dependency 'rspec', '~> 10.0'
22
+ end
metadata ADDED
@@ -0,0 +1,102 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: social_share
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ldewald
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-03-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description:
56
+ email:
57
+ - laurardewald@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - Gemfile
64
+ - LICENSE.txt
65
+ - README.md
66
+ - Rakefile
67
+ - app/assets/fonts/social_share.eot
68
+ - app/assets/fonts/social_share.svg
69
+ - app/assets/fonts/social_share.ttf
70
+ - app/assets/fonts/social_share.woff
71
+ - app/assets/javascripts/social_share/index.js
72
+ - app/assets/stylesheets/social_share/index.css.erb
73
+ - lib/social_share.rb
74
+ - lib/social_share/helper.rb
75
+ - lib/social_share/version.rb
76
+ - social_share.gemspec
77
+ homepage:
78
+ licenses:
79
+ - MIT
80
+ metadata: {}
81
+ post_install_message:
82
+ rdoc_options: []
83
+ require_paths:
84
+ - lib
85
+ required_ruby_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ requirements: []
96
+ rubyforge_project:
97
+ rubygems_version: 2.2.2
98
+ signing_key:
99
+ specification_version: 4
100
+ summary: Easy helper methods for adding custom social share buttons to your Rails
101
+ app.
102
+ test_files: []