flakey 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -2
- data/lib/flakey/configuration.rb +7 -8
- data/lib/flakey/facebook.rb +1 -3
- data/lib/flakey/github.rb +1 -1
- data/lib/flakey/google_plus.rb +7 -0
- data/lib/flakey/version.rb +1 -1
- metadata +29 -13
data/README.md
CHANGED
@@ -39,6 +39,7 @@ Or install it yourself as:
|
|
39
39
|
|
40
40
|
# app/views/layouts/application.html.erb
|
41
41
|
<%= tweet_button(hashtags: 'awesome') %>
|
42
|
+
<%= link_to "My Twitter Profile", twitter_profile_url %>
|
42
43
|
|
43
44
|
### Facebook
|
44
45
|
|
@@ -58,6 +59,7 @@ Or install it yourself as:
|
|
58
59
|
|
59
60
|
# app/views/layouts/application.html.erb
|
60
61
|
<%= like_button(width: 150) %>
|
62
|
+
<%= link_to "My Facebook Profile", facebook_profile_url %>
|
61
63
|
|
62
64
|
### Github
|
63
65
|
|
@@ -72,7 +74,7 @@ Or install it yourself as:
|
|
72
74
|
end
|
73
75
|
|
74
76
|
# app/views/layouts/application.html.erb
|
75
|
-
<%= link_to "Github",
|
77
|
+
<%= link_to "My Github Profile", github_profile_url %>
|
76
78
|
|
77
79
|
### Stackoverflow
|
78
80
|
|
@@ -88,12 +90,13 @@ Or install it yourself as:
|
|
88
90
|
end
|
89
91
|
|
90
92
|
# app/views/layouts/application.html.erb
|
91
|
-
<%= link_to "Stackoverflow Profile", stackoverflow_profile_url %>
|
93
|
+
<%= link_to "My Stackoverflow Profile", stackoverflow_profile_url %>
|
92
94
|
|
93
95
|
### Google Plus
|
94
96
|
|
95
97
|
# config/initializers/flakey.rb
|
96
98
|
Flakey.configure do |config|
|
99
|
+
config.google_plus_user_id = "9873465784"
|
97
100
|
# Optionally:
|
98
101
|
# Should be of the form of, for example, 'en-GB' or 'de'.
|
99
102
|
# config.plus_one_button_language = 'en-GB'
|
@@ -109,6 +112,8 @@ Or install it yourself as:
|
|
109
112
|
|
110
113
|
# app/views/layouts/application.html.erb
|
111
114
|
<%= plus_one_button %>
|
115
|
+
<%= link_to "My Google Plus Profile", google_plus_profile_url %>
|
116
|
+
|
112
117
|
|
113
118
|
## Contributing
|
114
119
|
|
data/lib/flakey/configuration.rb
CHANGED
@@ -9,14 +9,12 @@
|
|
9
9
|
|
10
10
|
module Flakey
|
11
11
|
class Configuration
|
12
|
-
attr_accessor :twitter_handle, :tweet_hashtags,
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:stackoverflow_nickname, :stackoverflow_user_id,
|
19
|
-
:github_name, :plus_one_button_language
|
12
|
+
attr_accessor :twitter_handle, :tweet_hashtags, :tweet_via, :tweet_related,
|
13
|
+
:tweet_button_size, :tweet_button_class, :tweet_label,
|
14
|
+
:follow_button_size, :follow_button_class, :follow_button_show_count,
|
15
|
+
:facebook_nickname, :facebook_app_id, :stackoverflow_nickname,
|
16
|
+
:stackoverflow_user_id, :github_name, :plus_one_button_language,
|
17
|
+
:google_plus_user_id
|
20
18
|
|
21
19
|
def initialize
|
22
20
|
self.twitter_handle = ''
|
@@ -29,6 +27,7 @@ module Flakey
|
|
29
27
|
|
30
28
|
self.facebook_nickname = ''
|
31
29
|
|
30
|
+
self.google_plus_user_id = ''
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
data/lib/flakey/facebook.rb
CHANGED
@@ -5,9 +5,7 @@ module Flakey
|
|
5
5
|
Flakey.configuration.facebook_nickname
|
6
6
|
end
|
7
7
|
|
8
|
-
|
9
|
-
# consistent with the Twitter module.
|
10
|
-
def facebook_url(options = {})
|
8
|
+
def facebook_profile_url(options = {})
|
11
9
|
nickname = options[:nickname] || facebook_nickname
|
12
10
|
"https://www.facebook.com/" + nickname
|
13
11
|
end
|
data/lib/flakey/github.rb
CHANGED
data/lib/flakey/google_plus.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
module Flakey
|
2
2
|
module GooglePlus
|
3
|
+
BASE_URL = "https://plus.google.com"
|
4
|
+
|
3
5
|
# INFO: https://developers.google.com/+/plugins/+1button/
|
4
6
|
def plus_one_button(options = {})
|
5
7
|
size = options[:size] || nil
|
@@ -18,4 +20,9 @@ module Flakey
|
|
18
20
|
content_tag :div, '', class: class_list, data: data_attr
|
19
21
|
end
|
20
22
|
end
|
23
|
+
|
24
|
+
def google_plus_profile_url(user_id = nil)
|
25
|
+
user_id = user_id || Flakey.configuration.google_plus_user_id
|
26
|
+
BASE_URL + "/#{user_id}"
|
27
|
+
end
|
21
28
|
end
|
data/lib/flakey/version.rb
CHANGED
metadata
CHANGED
@@ -1,38 +1,48 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flakey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.4
|
5
4
|
prerelease:
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- David Tuite
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
|
16
|
-
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
17
20
|
none: false
|
21
|
+
prerelease: false
|
22
|
+
name: rspec
|
23
|
+
requirement: !ruby/object:Gem::Requirement
|
18
24
|
requirements:
|
19
25
|
- - ! '>='
|
20
26
|
- !ruby/object:Gem::Version
|
21
27
|
version: '0'
|
28
|
+
none: false
|
22
29
|
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: *70215496741500
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
|
-
|
27
|
-
|
31
|
+
version_requirements: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
28
36
|
none: false
|
37
|
+
prerelease: false
|
38
|
+
name: rake
|
39
|
+
requirement: !ruby/object:Gem::Requirement
|
29
40
|
requirements:
|
30
41
|
- - ! '>='
|
31
42
|
- !ruby/object:Gem::Version
|
32
43
|
version: '0'
|
44
|
+
none: false
|
33
45
|
type: :development
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *70215496741020
|
36
46
|
description: Social helpers for Rails apps.
|
37
47
|
email:
|
38
48
|
- dtuite@gmail.com
|
@@ -68,20 +78,26 @@ rdoc_options: []
|
|
68
78
|
require_paths:
|
69
79
|
- lib
|
70
80
|
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
-
none: false
|
72
81
|
requirements:
|
73
82
|
- - ! '>='
|
74
83
|
- !ruby/object:Gem::Version
|
75
84
|
version: '0'
|
76
|
-
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
hash: 419741071970527842
|
77
88
|
none: false
|
89
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
90
|
requirements:
|
79
91
|
- - ! '>='
|
80
92
|
- !ruby/object:Gem::Version
|
81
93
|
version: '0'
|
94
|
+
segments:
|
95
|
+
- 0
|
96
|
+
hash: 419741071970527842
|
97
|
+
none: false
|
82
98
|
requirements: []
|
83
99
|
rubyforge_project:
|
84
|
-
rubygems_version: 1.8.
|
100
|
+
rubygems_version: 1.8.24
|
85
101
|
signing_key:
|
86
102
|
specification_version: 3
|
87
103
|
summary: Makes a bunch of helper methods available for including in your Rails views.
|