social_sharer 0.1.1.pre.alpha.pre.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +19 -0
- data/.rspec +2 -0
- data/.rubocop +39 -0
- data/.travis.yml +15 -0
- data/Gemfile +2 -0
- data/LICENSE +22 -0
- data/README.md +0 -0
- data/Rakefile +12 -0
- data/lib/social_sharer/errors.rb +4 -0
- data/lib/social_sharer/railtie.rb +8 -0
- data/lib/social_sharer/version.rb +3 -0
- data/lib/social_sharer/view_helpers.rb +82 -0
- data/lib/social_sharer.rb +5 -0
- data/social_sharer.gemspec +34 -0
- data/spec/lib/social_sharer_railtie_spec.rb +7 -0
- data/spec/lib/social_sharer_spec.rb +7 -0
- data/spec/lib/social_sharer_view_helpers_spec.rb +146 -0
- data/spec/spec_helper.rb +53 -0
- metadata +193 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NjMyNDU3ZDlkYjg2YzVjNmEyM2ZmZGUwOGQ4ZGNhYmMzNjg4OGNkZQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MWI2MDEyOTI4MmY2ZTU4ZDQ1ZDNmNTU2ZWY0MWEzNDQwNjNhYWU5Ng==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZGE3MTE5ZGRmNmNlYjY5NGYzNzVjMjRiYWY4ZjY3MmI5OGJkYzUwZTY5Yzdm
|
10
|
+
OTQ3NWZlZmQ5MTA0ZGU5ZTk5NzYzOTU3NGFmYzNiZmRlNDE5NzE3ZjlmMmFh
|
11
|
+
MzE0MDM1YWNkY2MxYTZmNmM1MTAxMzc5YWU0Y2Y3ZTkzYzRlNjA=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ODIyYWZjMzk0ZTBjNzRhNjlhZWE3OGZmZmU4ZWEzMzE0ODgxM2JiZTc5NDIx
|
14
|
+
ZjFlYTI2ZjMxOTdjNjA3MjhjYTIxMDJmNTY0NDVkMjE0ZWNlYTAyM2ZkOTAx
|
15
|
+
Yzk5ZjIyZWI4NWM0Mzk2ZGJjYmIwNTJlMGQwZmM2OWI4YmU0NzI=
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
Metrics/LineLength:
|
2
|
+
Description: 'Limit lines to 120 characters.'
|
3
|
+
Max: 120
|
4
|
+
|
5
|
+
Style/Documentation:
|
6
|
+
Enabled: false
|
7
|
+
|
8
|
+
Style/SingleSpaceBeforeFirstArg:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Style/BracesAroundHashParameters:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Style/IndentHash:
|
15
|
+
EnforcedStyle: consistent
|
16
|
+
|
17
|
+
Style/AlignHash:
|
18
|
+
EnforcedHashRocketStyle: table
|
19
|
+
EnforcedColonStyle: table
|
20
|
+
|
21
|
+
Style/AlignParameters:
|
22
|
+
EnforcedStyle: with_fixed_indentation
|
23
|
+
|
24
|
+
Style/StringLiterals:
|
25
|
+
EnforcedStyle: single_quotes
|
26
|
+
|
27
|
+
Style/CollectionMethods:
|
28
|
+
PreferredMethods:
|
29
|
+
collect: 'map'
|
30
|
+
collect!: 'map!'
|
31
|
+
inject: 'reduce'
|
32
|
+
detect: 'find'
|
33
|
+
find_all: 'select'
|
34
|
+
|
35
|
+
Style/DotPosition:
|
36
|
+
EnforcedStyle: leading
|
37
|
+
|
38
|
+
Style/DoubleNegation:
|
39
|
+
Enabled: false
|
data/.travis.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 1.9.3
|
4
|
+
- 2.0.0
|
5
|
+
- 2.1.0
|
6
|
+
- 2.2.0
|
7
|
+
deploy:
|
8
|
+
provider: rubygems
|
9
|
+
api_key:
|
10
|
+
secure: OJiZnMbBeQBVOpp8q5EmEX/8hmou2CDP7KAJH/kZVGPGAK3ehrOC0xlttQfirW096AufQsl05o0e5VMCE4Uwj7pL1ofPMw5tC76stN4b28/wJ+0a6ofMW0R28cexeVXCgYBJiHBvS6si4HNNYxq0JcpGg1SU3cu6/bIHXgASxcKhlEF7HG1AR2Qc1j4vFo8Gv5HM22MinYnWfJwC3DgHYkUKqKBp32PRg83NYwnlBfxw+J26IMyV8fqvfbCcDx/aZ/4FYiRWCEIi3nOLbOpIVfU77YJdOb8nAfi+HKXqK36gVM1v2hgvj+1RbXE8e5d4Ic0URC/8a0ZedSPeQyhjy0QmeNaqPXx71ECYZ7FK+PAfUmyH/VsBNgiWuulOFDSVhDk0vDBnUfwTvPrTfX1tLwx+lx6uJdHjgvW2Sb3GUAPR0d/JhlzWHXX74UUR0f4hSE465ovRaW/+TbBmBwvoXVNGxsjymb2QPgIeWgHae9yJLlsRV2Qj91itTj3Xvo7xEz704MoC19cvkreb2N//6QcxW6lCW8lLVqWNJWLHYgpYAiVU5UoRA16evMur6Ni2rMKGfUohHwmeKK2hE/SVbu1NNdKw41O2Ox+8T/uMLoaw3Y07rN3gt0fVdz16BwEnnSP++gh8hd0hkFNOHR57GOMvkLIZRK6glajbg72bUbs=
|
11
|
+
gem:
|
12
|
+
master: social_sharer
|
13
|
+
on:
|
14
|
+
tags: true
|
15
|
+
repo: thisisbd/social_sharer
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 BD Network
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
File without changes
|
data/Rakefile
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
module SocialSharer
|
2
|
+
module ViewHelpers
|
3
|
+
# Given an options object, create a number of social URLs
|
4
|
+
def social_share_tags(options)
|
5
|
+
validate_social_tag_options(options)
|
6
|
+
|
7
|
+
has_individual_settings = options[:individual_settings]
|
8
|
+
|
9
|
+
twitter_url = has_individual_settings ? options[:twitter][:url] : options[:url]
|
10
|
+
twitter_url += '?src=tw'
|
11
|
+
|
12
|
+
twitter_message = has_individual_settings ? options[:twitter][:message] : options[:twitter_message]
|
13
|
+
twitter_handle = has_individual_settings ? options[:twitter][:handle] : options[:twitter_handle]
|
14
|
+
|
15
|
+
facebook_url = has_individual_settings ? options[:facebook][:url] : options[:url]
|
16
|
+
facebook_url += '?src=fb'
|
17
|
+
|
18
|
+
link_to('Share on Twitter', 'http://twitter.com/', rel: 'nofollow', onclick: "popUp=window.open("\
|
19
|
+
"'http://twitter.com/intent/tweet?text=#{twitter_message} via #{twitter_handle} - #{twitter_url}',"\
|
20
|
+
"'popupwindow',"\
|
21
|
+
"'scrollbars=yes,width=800,height=400');"\
|
22
|
+
"popUp.focus();"\
|
23
|
+
"return false") +
|
24
|
+
link_to('Share on Facebook', 'http://www.facebook.com/', rel: 'nofollow', onclick: "popUp=window.open("\
|
25
|
+
"'http://www.facebook.com/sharer.php?u=#{facebook_url}',"\
|
26
|
+
"'popupwindow',"\
|
27
|
+
"'scrollbars=yes,width=800,height=400');"\
|
28
|
+
"popUp.focus();"\
|
29
|
+
"return false")
|
30
|
+
end
|
31
|
+
|
32
|
+
private
|
33
|
+
|
34
|
+
# Check to see if the options that we are expecting have been set
|
35
|
+
#
|
36
|
+
# @param [Hash] options Options passed to social_share_tags
|
37
|
+
#
|
38
|
+
# @raise [SocialSharer::OptionsError] Raised if the options passed do not meet what we expect
|
39
|
+
def validate_social_tag_options(options)
|
40
|
+
raise(SocialSharer::OptionsError, 'Options parameter cannot be nil') if options.nil?
|
41
|
+
|
42
|
+
correct_opts = true
|
43
|
+
missing_opts = []
|
44
|
+
|
45
|
+
root_params = %w( url twitter_message twitter_handle )
|
46
|
+
twitter_params, facebook_params = [], []
|
47
|
+
|
48
|
+
if options[:individual_settings]
|
49
|
+
root_params = %w{ twitter facebook }
|
50
|
+
twitter_params = %w( url message handle )
|
51
|
+
facebook_params = %w( url )
|
52
|
+
end
|
53
|
+
|
54
|
+
root_params.each do |param|
|
55
|
+
unless options[param.to_sym].present?
|
56
|
+
correct_opts = false
|
57
|
+
missing_opts << param
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
twitter_params.each do |param|
|
62
|
+
break if options[:twitter].nil?
|
63
|
+
|
64
|
+
unless options[:twitter][param.to_sym].present?
|
65
|
+
correct_opts = false
|
66
|
+
missing_opts << "twitter - #{param}"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
facebook_params.each do |param|
|
71
|
+
break if options[:facebook].nil?
|
72
|
+
|
73
|
+
unless options[:facebook][param.to_sym].present?
|
74
|
+
correct_opts = false
|
75
|
+
missing_opts << "facebook - #{param}"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
raise(SocialSharer::OptionsError, "Unexpected options - expected #{missing_opts.inspect} to be present") unless correct_opts
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'social_sharer/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = 'social_sharer'
|
8
|
+
s.version = SocialSharer::VERSION
|
9
|
+
s.version = "#{s.version}-alpha-#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
|
10
|
+
s.date = '2015-10-16'
|
11
|
+
s.summary = 'A set of view helpers that allow users to create social sharing buttons easily'
|
12
|
+
s.description = 'Adds a set of view methods that allow the users to create sharing buttons for multiple platforms. This gem allows you to customise the url for each platform adding \'tracking\' string if required.'
|
13
|
+
s.authors = ['Matthew Rayner']
|
14
|
+
s.email = 'matthew.rayner@thisisbd.com'
|
15
|
+
s.files = ['lib/social_sharer.rb']
|
16
|
+
s.homepage = 'http://github.com/thisisbd/social_sharer'
|
17
|
+
s.license = 'MIT'
|
18
|
+
|
19
|
+
s.files = `git ls-files -z`.split("\x0")
|
20
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
21
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
22
|
+
s.require_paths = ['lib']
|
23
|
+
|
24
|
+
s.add_development_dependency 'bundler', '~> 1.6'
|
25
|
+
s.add_development_dependency 'rake', '~> 0.9.6'
|
26
|
+
s.add_development_dependency 'yard', '~> 0.8.7.6'
|
27
|
+
s.add_development_dependency 'pry', '~> 0.10.2'
|
28
|
+
s.add_development_dependency 'pry-nav', '~> 0.2.4'
|
29
|
+
s.add_development_dependency 'simplecov', '~> 0.10.0'
|
30
|
+
s.add_development_dependency 'rubocop', '~> 0.34.2'
|
31
|
+
s.add_development_dependency 'rspec', '~> 3.0'
|
32
|
+
|
33
|
+
s.add_dependency 'rails', '~> 4.2'
|
34
|
+
end
|
@@ -0,0 +1,146 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'action_view'
|
4
|
+
require 'active_support'
|
5
|
+
|
6
|
+
include ActionView::Helpers
|
7
|
+
include SocialSharer::ViewHelpers
|
8
|
+
|
9
|
+
describe SocialSharer::ViewHelpers do
|
10
|
+
describe '#social_share_tags' do
|
11
|
+
context 'with valid options' do
|
12
|
+
context 'without individual_settings set' do
|
13
|
+
before :each do
|
14
|
+
@options = {
|
15
|
+
url: 'http://thisisbd.com',
|
16
|
+
twitter_message: 'This is BD - A creative agency in London',
|
17
|
+
twitter_handle: '@thisisbd'
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'generates the expected twitter tag' do
|
22
|
+
expect( social_share_tags(@options) ).to include("<a rel=\"nofollow\" onclick=\"popUp=window.open('http://twitter.com/intent/tweet?text=This is BD - A creative agency in London via @thisisbd - http://thisisbd.com?src=tw','popupwindow','scrollbars=yes,width=800,height=400');popUp.focus();return false\" href=\"http://twitter.com/\">Share on Twitter</a>")
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'generates the expected facebook tag' do
|
26
|
+
expect( social_share_tags(@options) ).to include("<a rel=\"nofollow\" onclick=\"popUp=window.open('http://www.facebook.com/sharer.php?u=http://thisisbd.com?src=fb','popupwindow','scrollbars=yes,width=800,height=400');popUp.focus();return false\" href=\"http://www.facebook.com/\">Share on Facebook</a>")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
context 'with individual_settings set' do
|
31
|
+
before :each do
|
32
|
+
@options = {
|
33
|
+
individual_settings: true,
|
34
|
+
|
35
|
+
twitter: {
|
36
|
+
url: 'http://mattrayner.co.u/twitter_specific_page',
|
37
|
+
handle: '@mattrayner',
|
38
|
+
message: 'Matt Rayner - A full-stack Rubyist in London'
|
39
|
+
},
|
40
|
+
|
41
|
+
facebook: {
|
42
|
+
url: 'http://mattrayner.co.uk/facebook_specific_page'
|
43
|
+
}
|
44
|
+
}
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'generates the expected twitter tag' do
|
48
|
+
expect( social_share_tags(@options) ).to include("<a rel=\"nofollow\" onclick=\"popUp=window.open('http://www.facebook.com/sharer.php?u=http://mattrayner.co.uk/facebook_specific_page?src=fb','popupwindow','scrollbars=yes,width=800,height=400');popUp.focus();return false\" href=\"http://www.facebook.com/\">Share on Facebook</a>")
|
49
|
+
end
|
50
|
+
|
51
|
+
it 'generates the expected facebook tag' do
|
52
|
+
expect( social_share_tags(@options) ).to include("<a rel=\"nofollow\" onclick=\"popUp=window.open('http://twitter.com/intent/tweet?text=Matt Rayner - A full-stack Rubyist in London via @mattrayner - http://mattrayner.co.u/twitter_specific_page?src=tw','popupwindow','scrollbars=yes,width=800,height=400');popUp.focus();return false\" href=\"http://twitter.com/\">Share on Twitter</a>")
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
context 'with invalid options' do
|
58
|
+
context 'with no options' do
|
59
|
+
it 'raises a SocialSharer::OptionsError as expected' do
|
60
|
+
expect{ social_share_tags(nil) }.to raise_error(SocialSharer::OptionsError, 'Options parameter cannot be nil')
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
context 'without individual_settings set' do
|
65
|
+
before :each do
|
66
|
+
@options = {
|
67
|
+
url: 'http://thisisbd.com',
|
68
|
+
twitter_message: 'This is BD - A creative agency in London',
|
69
|
+
twitter_handle: '@thisisbd'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
context 'when missing a root parameter' do
|
74
|
+
it 'raises the expected SocialSharer::OptionsError with the expected message' do
|
75
|
+
root_parameters = %w( url twitter_message twitter_handle )
|
76
|
+
|
77
|
+
root_parameters.each do |param|
|
78
|
+
opts = @options.deep_dup
|
79
|
+
opts.delete(param.to_sym)
|
80
|
+
|
81
|
+
expect{ social_share_tags(opts) }.to raise_error(SocialSharer::OptionsError, "Unexpected options - expected [\"#{param}\"] to be present")
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
context 'with individual_settings set' do
|
88
|
+
before :each do
|
89
|
+
@options = {
|
90
|
+
individual_settings: true,
|
91
|
+
|
92
|
+
twitter: {
|
93
|
+
url: 'http://mattrayner.co.uk/twitter_specific_page',
|
94
|
+
handle: '@mattrayner',
|
95
|
+
message: 'Matt Rayner - A full-stack Rubyist in London'
|
96
|
+
},
|
97
|
+
|
98
|
+
facebook: {
|
99
|
+
url: 'http://mattrayner.co.uk/facebook_specific_page'
|
100
|
+
}
|
101
|
+
}
|
102
|
+
end
|
103
|
+
|
104
|
+
context 'when missing a root parameter' do
|
105
|
+
it 'raises the expected SocialSharer::OptionsError with the expected message' do
|
106
|
+
root_parameters = %w( facebook twitter )
|
107
|
+
|
108
|
+
root_parameters.each do |param|
|
109
|
+
opts = @options.deep_dup
|
110
|
+
opts.delete(param.to_sym)
|
111
|
+
|
112
|
+
expect{ social_share_tags(opts) }.to raise_error(SocialSharer::OptionsError, "Unexpected options - expected [\"#{param}\"] to be present")
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
context 'when missing a twitter parameter' do
|
118
|
+
it 'raises the expected SocialSharer::OptionsError with the expected message' do
|
119
|
+
|
120
|
+
parameters = %w( url message handle )
|
121
|
+
|
122
|
+
parameters.each do |param|
|
123
|
+
opts = @options.deep_dup
|
124
|
+
opts[:twitter].delete(param.to_sym)
|
125
|
+
|
126
|
+
expect{ social_share_tags(opts) }.to raise_error(SocialSharer::OptionsError, "Unexpected options - expected [\"twitter - #{param}\"] to be present")
|
127
|
+
end
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
context 'when missing a facebook parameter' do
|
132
|
+
it 'raises the expected SocialSharer::OptionsError with the expected message' do
|
133
|
+
parameters = %w( url )
|
134
|
+
|
135
|
+
parameters.each do |param|
|
136
|
+
opts = @options.deep_dup
|
137
|
+
opts[:facebook].delete(param.to_sym)
|
138
|
+
|
139
|
+
expect{ social_share_tags(opts) }.to raise_error(SocialSharer::OptionsError, "Unexpected options - expected [\"facebook\", \"facebook - #{param}\"] to be present")
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
$LOAD_PATH.unshift File.join(__FILE__, '../../lib')
|
2
|
+
|
3
|
+
require 'bundler'
|
4
|
+
Bundler.setup(:default, :test)
|
5
|
+
|
6
|
+
require 'rails'
|
7
|
+
require 'pry'
|
8
|
+
|
9
|
+
require 'social_sharer'
|
10
|
+
require 'social_sharer/view_helpers'
|
11
|
+
|
12
|
+
RSpec.configure do |config|
|
13
|
+
# These two settings work together to allow you to limit a spec run
|
14
|
+
# to individual examples or groups you care about by tagging them with
|
15
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
16
|
+
# get run.
|
17
|
+
config.filter_run :focus
|
18
|
+
config.run_all_when_everything_filtered = true
|
19
|
+
|
20
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
21
|
+
# recommended. For more details, see:
|
22
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
23
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
24
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
25
|
+
# config.disable_monkey_patching!
|
26
|
+
|
27
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
28
|
+
# file, and it's useful to allow more verbose output when running an
|
29
|
+
# individual spec file.
|
30
|
+
if config.files_to_run.one?
|
31
|
+
# Use the documentation formatter for detailed output,
|
32
|
+
# unless a formatter has already been configured
|
33
|
+
# (e.g. via a command-line flag).
|
34
|
+
config.default_formatter = 'doc'
|
35
|
+
end
|
36
|
+
|
37
|
+
# Print the 10 slowest examples and example groups at the
|
38
|
+
# end of the spec run, to help surface which specs are running
|
39
|
+
# particularly slow.
|
40
|
+
# config.profile_examples = 10
|
41
|
+
|
42
|
+
# Run specs in random order to surface order dependencies. If you find an
|
43
|
+
# order dependency and want to debug it, you can fix the order by providing
|
44
|
+
# the seed, which is printed after each run.
|
45
|
+
# --seed 1234
|
46
|
+
config.order = :random
|
47
|
+
|
48
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
49
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
50
|
+
# test failures related to randomization by passing the same `--seed` value
|
51
|
+
# as the one that triggered the failure.
|
52
|
+
Kernel.srand config.seed
|
53
|
+
end
|
metadata
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: social_sharer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1.pre.alpha.pre.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matthew Rayner
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-10-16 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.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.9.6
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.9.6
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: yard
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.8.7.6
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.8.7.6
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.10.2
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.10.2
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry-nav
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ~>
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.2.4
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ~>
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.2.4
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.10.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ~>
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.10.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ~>
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.34.2
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ~>
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.34.2
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '3.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '3.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rails
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ~>
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '4.2'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ~>
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '4.2'
|
139
|
+
description: Adds a set of view methods that allow the users to create sharing buttons
|
140
|
+
for multiple platforms. This gem allows you to customise the url for each platform
|
141
|
+
adding 'tracking' string if required.
|
142
|
+
email: matthew.rayner@thisisbd.com
|
143
|
+
executables: []
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- .gitignore
|
148
|
+
- .rspec
|
149
|
+
- .rubocop
|
150
|
+
- .travis.yml
|
151
|
+
- Gemfile
|
152
|
+
- LICENSE
|
153
|
+
- README.md
|
154
|
+
- Rakefile
|
155
|
+
- lib/social_sharer.rb
|
156
|
+
- lib/social_sharer/errors.rb
|
157
|
+
- lib/social_sharer/railtie.rb
|
158
|
+
- lib/social_sharer/version.rb
|
159
|
+
- lib/social_sharer/view_helpers.rb
|
160
|
+
- social_sharer.gemspec
|
161
|
+
- spec/lib/social_sharer_railtie_spec.rb
|
162
|
+
- spec/lib/social_sharer_spec.rb
|
163
|
+
- spec/lib/social_sharer_view_helpers_spec.rb
|
164
|
+
- spec/spec_helper.rb
|
165
|
+
homepage: http://github.com/thisisbd/social_sharer
|
166
|
+
licenses:
|
167
|
+
- MIT
|
168
|
+
metadata: {}
|
169
|
+
post_install_message:
|
170
|
+
rdoc_options: []
|
171
|
+
require_paths:
|
172
|
+
- lib
|
173
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - ! '>='
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '0'
|
178
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
|
+
requirements:
|
180
|
+
- - ! '>'
|
181
|
+
- !ruby/object:Gem::Version
|
182
|
+
version: 1.3.1
|
183
|
+
requirements: []
|
184
|
+
rubyforge_project:
|
185
|
+
rubygems_version: 2.4.5
|
186
|
+
signing_key:
|
187
|
+
specification_version: 4
|
188
|
+
summary: A set of view helpers that allow users to create social sharing buttons easily
|
189
|
+
test_files:
|
190
|
+
- spec/lib/social_sharer_railtie_spec.rb
|
191
|
+
- spec/lib/social_sharer_spec.rb
|
192
|
+
- spec/lib/social_sharer_view_helpers_spec.rb
|
193
|
+
- spec/spec_helper.rb
|