github-buttons 0.1.1 → 0.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/github-buttons.rb +6 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0967640dfd2d5929c0a5d2b9b6f326f756751708
4
- data.tar.gz: 60497ccbc5679d60056e4d100c59bd3ab282bd68
3
+ metadata.gz: 94cd02809b09f82f2b8d4a980ed1cf05b4b8d816
4
+ data.tar.gz: 6b606db960957ee333a4ab397e8337a75c0aa3a2
5
5
  SHA512:
6
- metadata.gz: c279279c5d86971dcab823845d772432248414a89734dc4b328d438536334c21015e9c3d44404398d622dbd853d382d50806eff51ac8fbabdf16c25a1d21e21e
7
- data.tar.gz: 99864f16a3c44cd300895580031c062f871af8abe4b48a33f2e7cd93f250645062f36f9ee7ea219e0b2048defe942c9d8aea8167f5dbf1ce865e1d2299d7af11
6
+ metadata.gz: a3451a62fc78ebdc4f824bb98717b438346d1f3b18d59bc19fe71acb2c6ca98987f314a0c07281be7a096edab1dd3f8623841686a58fe326a4f61a37ff007fc6
7
+ data.tar.gz: d6fc28645cb4e2fa395c18eb6b7ed6fa53689c60ee1924ca1f74f0448976411ad47212e05429ba36cf0a3d870340ad5906637267c99bd063e61ed65a3371a6a4
@@ -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 = 'watch'
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 #{type}" 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>)
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.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-07 00:00:00.000000000 Z
11
+ date: 2014-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec