github-calendar 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f957567e6a6d0f70e7f4d7f404f770d509db617
4
- data.tar.gz: 17cc29b533c8f6fcc038a2d9bf6e96c265127bbb
3
+ metadata.gz: 55ce98a2759a2d93a2b26fb0b1871cb412a1932f
4
+ data.tar.gz: 82816c2eccd754374c631ebd90cec7c7cc4c92b9
5
5
  SHA512:
6
- metadata.gz: ad42265694f9f24fb8bf6b9b055a9bae7ab446bf19255d822e660a0349e54a8d62e16e5bfab5fe0a1b5bc80cb2f3d44019647840215dd5946be58cae73921019
7
- data.tar.gz: b71748ccc7fe3416df45fd1df132d851edb987c32a25af52b1f9328181d71eb73f2c699865694f294f94dcb1b59154876b5735ac0240cf2214782dd17596a2d6
6
+ metadata.gz: e3d1ee9ed7ad46c5559e903c5879491a930f9db7793edbadf99e1736e8868f5b3b84c8a03df1767ff139bd2460d97ce520ef06ab6a3ff294b4e1f8db9a5f3edd
7
+ data.tar.gz: 8bf97c9acf6388dcad906730a8d5c3fdc27ae31ae4e4911746256b6e73bf98a5d4d45737d1eadf77b33c6eb4922b98c3e61afe12538fc5df674501c54d338c54
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
  ## Version 1
3
+ ### Version 1.3.1
4
+ * Update for latest GitHub contribution section changes (format of yearly count).
5
+ * Update to StringUtility 3.0.
6
+ * Update to Nokogiri 2.7.
7
+
3
8
  ### Version 1.3.0
4
9
  * Update for latest GitHub contribution graph changes (#6).
5
10
  * The methods relating to contribution streaks have been removed, as GitHub has removed that data.
@@ -13,11 +13,13 @@ module GitHub
13
13
  # @return [Integer] An integer value of their total contributions this year.
14
14
  def get_total_year(user)
15
15
  source = get_page_source(user)
16
- headers = source.css('h3')
16
+ headers = source.css('h2')
17
17
  string = nil
18
18
  headers.each do |i|
19
- if /contributions in the last year/ =~ i.text
20
- string = i.text.to_i_separated
19
+ # Strip excess whitespace and newlines
20
+ header_text = i.text.gsub(/(\s+|\n)/, ' ')
21
+ if /contributions in the last year/ =~ header_text
22
+ string = header_text.to_i_separated
21
23
  break
22
24
  end
23
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-calendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eli Foster
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-27 00:00:00.000000000 Z
11
+ date: 2017-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.6.7
19
+ version: '1.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.6.7
26
+ version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: string-utility
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.7'
33
+ version: '3.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '2.7'
40
+ version: '3.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: curb
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  version: '0'
83
83
  requirements: []
84
84
  rubyforge_project:
85
- rubygems_version: 2.6.4
85
+ rubygems_version: 2.6.10
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Getting GitHub user profile calendar data through HTML parsing.