github-buttons 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/github-buttons.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94cd02809b09f82f2b8d4a980ed1cf05b4b8d816
|
4
|
+
data.tar.gz: 6b606db960957ee333a4ab397e8337a75c0aa3a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3451a62fc78ebdc4f824bb98717b438346d1f3b18d59bc19fe71acb2c6ca98987f314a0c07281be7a096edab1dd3f8623841686a58fe326a4f61a37ff007fc6
|
7
|
+
data.tar.gz: d6fc28645cb4e2fa395c18eb6b7ed6fa53689c60ee1924ca1f74f0448976411ad47212e05429ba36cf0a3d870340ad5906637267c99bd063e61ed65a3371a6a4
|
data/lib/github-buttons.rb
CHANGED
@@ -29,15 +29,19 @@ module GitHub
|
|
29
29
|
if options[:large] then size = "&size=large" end
|
30
30
|
if options[:count] then count = "&count=true" end
|
31
31
|
|
32
|
+
# Set HTML class for requested button type
|
33
|
+
html_class = type
|
34
|
+
|
32
35
|
# Work around bug in GitHub Button repository
|
33
36
|
# Requesting "watch" actually returns "star"
|
34
37
|
# See: https://github.com/mdo/github-buttons/issues/42#issuecomment-19951052
|
35
38
|
if type == 'star'
|
36
|
-
type
|
39
|
+
type = 'watch'
|
40
|
+
html_class = 'star' # Reset 'watch' to 'star' so user receives expected class
|
37
41
|
end
|
38
42
|
|
39
43
|
# Return GitHub Button
|
40
|
-
%Q(<iframe class="github-button #{
|
44
|
+
%Q(<iframe class="github-button #{html_class}" src="http://ghbtns.com/github-btn.html?user=#{@user}&repo=#{@repo}&type=#{type}#{size}#{count}" allowtransparency="true" frameborder="0" scrolling="0" width="120" height="30"></iframe>)
|
41
45
|
end
|
42
46
|
end
|
43
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github-buttons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. Maxwell Watson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|