social-buttons 0.3.6 → 0.3.7
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/VERSION +1 -1
- data/lib/social-buttons.rb +1 -0
- data/lib/social_buttons/view_helpers/tweet.rb +11 -6
- data/social-buttons.gemspec +4 -4
- metadata +4 -4
- data/init.rb +0 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.7
|
@@ -0,0 +1 @@
|
|
1
|
+
require "social_buttons"
|
@@ -7,8 +7,15 @@ module SocialButtons
|
|
7
7
|
|
8
8
|
def tweet_button(options = {})
|
9
9
|
clazz = SocialButtons::Tweet
|
10
|
-
|
11
|
-
|
10
|
+
|
11
|
+
# JUNK Code! Refactor!!!!
|
12
|
+
params = {}
|
13
|
+
|
14
|
+
params.merge!(url: request.url)
|
15
|
+
opt_params = clazz.default_options.merge(options)
|
16
|
+
|
17
|
+
params = clazz.options_to_data_params(opt_params)
|
18
|
+
params.merge!(:class => CLASS)
|
12
19
|
|
13
20
|
html = "".html_safe
|
14
21
|
html << clazz::Scripter.new(self).script
|
@@ -19,7 +26,6 @@ module SocialButtons
|
|
19
26
|
class << self
|
20
27
|
def default_options
|
21
28
|
@default_options ||= {
|
22
|
-
url: request.url,
|
23
29
|
via: "tweetbutton",
|
24
30
|
text: "",
|
25
31
|
count: "vertical",
|
@@ -33,13 +39,12 @@ module SocialButtons
|
|
33
39
|
def script
|
34
40
|
return empty_content if widgetized? :tweet
|
35
41
|
widgetized! :tweet
|
36
|
-
|
37
42
|
"<script src=#{twitter_wjs} type='text/javascript'></script>".html_safe
|
38
43
|
end
|
39
44
|
|
40
|
-
def twitter_wjs
|
45
|
+
def twitter_wjs
|
41
46
|
"http://platform.twitter.com/widgets.js"
|
42
47
|
end
|
43
48
|
end # class
|
44
49
|
end
|
45
|
-
end
|
50
|
+
end
|
data/social-buttons.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "social-buttons"
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeremy McAnally", "Yuva"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2013-02-12"
|
13
13
|
s.description = "Generate Social Buttons for your Rails apps"
|
14
14
|
s.email = "yuva@codemancers.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"README.md",
|
27
27
|
"Rakefile",
|
28
28
|
"VERSION",
|
29
|
-
"
|
29
|
+
"lib/social-buttons.rb",
|
30
30
|
"lib/social_buttons.rb",
|
31
31
|
"lib/social_buttons/engine.rb",
|
32
32
|
"lib/social_buttons/view_helper.rb",
|
@@ -48,7 +48,7 @@ Gem::Specification.new do |s|
|
|
48
48
|
]
|
49
49
|
s.homepage = "https://github.com/iffyuva/social-buttons"
|
50
50
|
s.require_paths = ["lib"]
|
51
|
-
s.rubygems_version = "1.8.
|
51
|
+
s.rubygems_version = "1.8.25"
|
52
52
|
s.summary = "Generate new Social Buttons"
|
53
53
|
|
54
54
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social-buttons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2013-02-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -125,7 +125,7 @@ files:
|
|
125
125
|
- README.md
|
126
126
|
- Rakefile
|
127
127
|
- VERSION
|
128
|
-
-
|
128
|
+
- lib/social-buttons.rb
|
129
129
|
- lib/social_buttons.rb
|
130
130
|
- lib/social_buttons/engine.rb
|
131
131
|
- lib/social_buttons/view_helper.rb
|
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubyforge_project:
|
167
|
-
rubygems_version: 1.8.
|
167
|
+
rubygems_version: 1.8.25
|
168
168
|
signing_key:
|
169
169
|
specification_version: 3
|
170
170
|
summary: Generate new Social Buttons
|
data/init.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'lib', 'tweet-button')
|