github-calendar 1.3.0 → 1.3.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/github/calendar.rb +5 -3
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55ce98a2759a2d93a2b26fb0b1871cb412a1932f
|
4
|
+
data.tar.gz: 82816c2eccd754374c631ebd90cec7c7cc4c92b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3d1ee9ed7ad46c5559e903c5879491a930f9db7793edbadf99e1736e8868f5b3b84c8a03df1767ff139bd2460d97ce520ef06ab6a3ff294b4e1f8db9a5f3edd
|
7
|
+
data.tar.gz: 8bf97c9acf6388dcad906730a8d5c3fdc27ae31ae4e4911746256b6e73bf98a5d4d45737d1eadf77b33c6eb4922b98c3e61afe12538fc5df674501c54d338c54
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
data/lib/github/calendar.rb
CHANGED
@@ -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('
|
16
|
+
headers = source.css('h2')
|
17
17
|
string = nil
|
18
18
|
headers.each do |i|
|
19
|
-
|
20
|
-
|
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.
|
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:
|
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.
|
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.
|
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: '
|
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: '
|
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.
|
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.
|