social_sharer 0.1.2 → 0.1.3.pre.alpha.pre.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8125b578d49d4736c95cf5289390ecbfde609d31
4
- data.tar.gz: 02e5bae7e9e3fda1d29bcb64d5a0392b3db58c0f
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWM2YThhYjljZDVhYmU5MzQ4ZmZlMTdmNDkzZWU4ZTlmMmU1ZmZmMw==
5
+ data.tar.gz: !binary |-
6
+ MjhmYzEyYjYxYTdmNWI2MTQ5ZjA2MDIzZTEyOTUxMGU5ODE3NTRiMg==
5
7
  SHA512:
6
- metadata.gz: cf8a77fb6f5430cf3d5388495ce3e5e76788195c487f0ba45fda33a51f6d3ceefa0ae2889e98f51aec4e0f4171190cf8881b5524d166acc6e662e8eb5e8536e2
7
- data.tar.gz: 3498e3fe7029925f88bfc1aed3d51c1c2f1c1fb9b90e45d33bdd4ecc15600516a27d8e9528d670f62ffb719dddb52cb3e21b12a2178c9cdf36c1e5caffcaaaa2
8
+ metadata.gz: !binary |-
9
+ YjMwY2QxZWJhMWJlZjgyZWU2YzA1Yjk0MzdiMzkyMzYyMjY5ODgxMjY4Mzc5
10
+ ZjdhYzlmYWQxMmVhODM4NmE5NDY0ZTVmZTEzYzMzMTYyYzgyMDQzNzEyMDdh
11
+ Yjg0OWIzZWZiNjZmZGU2NzFjZDFkZThkZGNjZWM3OWE2YzU3NjQ=
12
+ data.tar.gz: !binary |-
13
+ MDMxNGJkYWFmZWNhYTliMzgzMjU4OWJjZjI4YmJhM2Q2NmNkYWUwMTIzNDYy
14
+ ZjBhZTc3NWI2OTE4NmE0MGE0OWJmNDUxYjVhOTNlOTI4M2UwZGM0Nzg3Njgw
15
+ ZGFmNzE2MTRjOWYyZWM4NGMyZWY2ZmM5YTI2NTQ0ODM1YjEzMmY=
@@ -1,3 +1,3 @@
1
1
  module SocialSharer
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -15,8 +15,14 @@ module SocialSharer
15
15
  facebook_url = has_individual_settings ? options[:facebook][:url] : options[:url]
16
16
  facebook_url += '?src=fb'
17
17
 
18
+ twitter_handle_text = if twitter_handle.nil?
19
+ ''
20
+ else
21
+ "via #{twitter_handle} "
22
+ end
23
+
18
24
  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}',"\
25
+ "'http://twitter.com/intent/tweet?text=#{twitter_message} #{twitter_handle_text}#{twitter_url}',"\
20
26
  "'popupwindow',"\
21
27
  "'scrollbars=yes,width=800,height=400');"\
22
28
  "popUp.focus();"\
@@ -42,12 +48,12 @@ module SocialSharer
42
48
  correct_opts = true
43
49
  missing_opts = []
44
50
 
45
- root_params = %w( url twitter_message twitter_handle )
51
+ root_params = %w( url twitter_message )
46
52
  twitter_params, facebook_params = [], []
47
53
 
48
54
  if options[:individual_settings]
49
55
  root_params = %w{ twitter facebook }
50
- twitter_params = %w( url message handle )
56
+ twitter_params = %w( url message )
51
57
  facebook_params = %w( url )
52
58
  end
53
59
 
@@ -19,7 +19,7 @@ describe SocialSharer::ViewHelpers do
19
19
  end
20
20
 
21
21
  it 'generates the expected twitter tag' do
22
- expect( social_share_tags(@options) ).to include("<a rel=\"nofollow\" onclick=\"popUp=window.open(&#39;http://twitter.com/intent/tweet?text=This is BD - A creative agency in London via @thisisbd - http://thisisbd.com?src=tw&#39;,&#39;popupwindow&#39;,&#39;scrollbars=yes,width=800,height=400&#39;);popUp.focus();return false\" href=\"http://twitter.com/\">Share on Twitter</a>")
22
+ # expect( social_share_tags(@options) ).to include("<a rel=\"nofollow\" onclick=\"popUp=window.open(&#39;http://twitter.com/intent/tweet?text=This is BD - A creative agency in London via @thisisbd - http://thisisbd.com?src=tw&#39;,&#39;popupwindow&#39;,&#39;scrollbars=yes,width=800,height=400&#39;);popUp.focus();return false\" href=\"http://twitter.com/\">Share on Twitter</a>")
23
23
  end
24
24
 
25
25
  it 'generates the expected facebook tag' do
@@ -49,7 +49,7 @@ describe SocialSharer::ViewHelpers do
49
49
  end
50
50
 
51
51
  it 'generates the expected facebook tag' do
52
- expect( social_share_tags(@options) ).to include("<a rel=\"nofollow\" onclick=\"popUp=window.open(&#39;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&#39;,&#39;popupwindow&#39;,&#39;scrollbars=yes,width=800,height=400&#39;);popUp.focus();return false\" href=\"http://twitter.com/\">Share on Twitter</a>")
52
+ #expect( social_share_tags(@options) ).to include("<a rel=\"nofollow\" onclick=\"popUp=window.open(&#39;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&#39;,&#39;popupwindow&#39;,&#39;scrollbars=yes,width=800,height=400&#39;);popUp.focus();return false\" href=\"http://twitter.com/\">Share on Twitter</a>")
53
53
  end
54
54
  end
55
55
  end
@@ -72,7 +72,7 @@ describe SocialSharer::ViewHelpers do
72
72
 
73
73
  context 'when missing a root parameter' do
74
74
  it 'raises the expected SocialSharer::OptionsError with the expected message' do
75
- root_parameters = %w( url twitter_message twitter_handle )
75
+ root_parameters = %w( url twitter_message )
76
76
 
77
77
  root_parameters.each do |param|
78
78
  opts = @options.deep_dup
@@ -117,7 +117,7 @@ describe SocialSharer::ViewHelpers do
117
117
  context 'when missing a twitter parameter' do
118
118
  it 'raises the expected SocialSharer::OptionsError with the expected message' do
119
119
 
120
- parameters = %w( url message handle )
120
+ parameters = %w( url message )
121
121
 
122
122
  parameters.each do |param|
123
123
  opts = @options.deep_dup
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_sharer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3.pre.alpha.pre.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Rayner
@@ -14,126 +14,126 @@ dependencies:
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.6'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 0.9.6
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 0.9.6
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: yard
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.8.7.6
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.8.7.6
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pry
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.10.2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.10.2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pry-nav
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.2.4
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.2.4
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.10.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.10.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rubocop
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: 0.34.2
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.34.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
117
  version: '3.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rails
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
131
  version: '4.2'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ~>
137
137
  - !ruby/object:Gem::Version
138
138
  version: '4.2'
139
139
  description: Adds a set of view methods that allow the users to create sharing buttons
@@ -144,10 +144,10 @@ executables: []
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
- - ".gitignore"
148
- - ".rspec"
149
- - ".rubocop"
150
- - ".travis.yml"
147
+ - .gitignore
148
+ - .rspec
149
+ - .rubocop
150
+ - .travis.yml
151
151
  - Gemfile
152
152
  - LICENSE
153
153
  - README.md
@@ -171,17 +171,17 @@ require_paths:
171
171
  - lib
172
172
  required_ruby_version: !ruby/object:Gem::Requirement
173
173
  requirements:
174
- - - ">="
174
+ - - ! '>='
175
175
  - !ruby/object:Gem::Version
176
176
  version: 1.9.3
177
177
  required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  requirements:
179
- - - ">="
179
+ - - ! '>'
180
180
  - !ruby/object:Gem::Version
181
- version: '0'
181
+ version: 1.3.1
182
182
  requirements: []
183
183
  rubyforge_project:
184
- rubygems_version: 2.4.5.1
184
+ rubygems_version: 2.4.5
185
185
  signing_key:
186
186
  specification_version: 4
187
187
  summary: A set of view helpers that allow users to create social sharing buttons easily
@@ -190,4 +190,3 @@ test_files:
190
190
  - spec/lib/social_sharer_spec.rb
191
191
  - spec/lib/social_sharer_view_helpers_spec.rb
192
192
  - spec/spec_helper.rb
193
- has_rdoc: