repocrawler 0.1.19 → 0.1.20

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ab3747a5b36603d08eb5ca33753f0a24c0beecd
4
- data.tar.gz: 2ce5e186bf27b9b4ccb74369ae3812791aee969a
3
+ metadata.gz: d54082fef3a5a246a5dbe51dc187c2c42f61bd49
4
+ data.tar.gz: 0fc1bd9e7e5bb610b3854b991e9d31b11f52146e
5
5
  SHA512:
6
- metadata.gz: cba188f10db34cc895bb95b04e4f9b5093240377bd9e2ebe7c9bbba4809fb16856ce6c2d0587fbed503978485db5d2f7917cf7e0b82b15c570d39b631a71b606
7
- data.tar.gz: a80e53c3903919c2862d66418af70264de8f08c16d33064b38c53d1314352b5cce84fc6af8b7b53eefe17ebdf0935b9ce0b50862fb964bc73de59ddfc01d1f42
6
+ metadata.gz: 3ab0dcddddeffbfaf4d05f045b2573643c38c24b88de3dc0d555afc7f63ecb4ff9340c071a40fe645fe1924993817015ecd15584b8cad39851ccd2f8cefd74b4
7
+ data.tar.gz: 54e797b3e7173f82da3e26abfba3b5526cc8c5532e05cca0088d2a52a6195287dc3c4bc06dd19bed0f6c851a8c82e61b506d8b8933d7ad11c6b7ba9ac2f75d32
@@ -25,7 +25,7 @@ module Repos
25
25
  "User-Agent" => @user_agent
26
26
  })
27
27
 
28
- if last_year_commit_activity['message'] === 'Not Found'
28
+ if last_year_commit_activity.is_a?(Hash) && last_year_commit_activity['message'] === 'Not Found'
29
29
  last_year_commit_activity = nil
30
30
  else
31
31
  last_year_commit_activity.delete_if {|record| record['total'] == 0}
@@ -40,7 +40,7 @@ module Repos
40
40
  contributors = HTTParty.get(@GITHUB_API_BASE_URL + "/contributors?access_token=#{@access_token}", headers: {
41
41
  "User-Agent" => @user_agent
42
42
  })
43
- if contributors['message'] === 'Not Found'
43
+ if contributors.is_a?(Hash) && contributors['message'] === 'Not Found'
44
44
  contributors = nil
45
45
  else
46
46
  contributors.map! do |contributor|
@@ -75,7 +75,7 @@ module Repos
75
75
  "User-Agent" => @user_agent
76
76
  })
77
77
 
78
- if repos_meta['message'] === 'Not Found'
78
+ if repos_meta.is_a?(Hash) && repos_meta['message'] === 'Not Found'
79
79
  forks = nil
80
80
  else
81
81
  forks = repos_meta['forks_count']
@@ -89,7 +89,7 @@ module Repos
89
89
  "User-Agent" => @user_agent
90
90
  })
91
91
 
92
- if repos_meta['message'] === 'Not Found'
92
+ if repos_meta.is_a?(Hash) && repos_meta['message'] === 'Not Found'
93
93
  stars = nil
94
94
  else
95
95
  stars = repos_meta['stargazers_count']
@@ -103,7 +103,7 @@ module Repos
103
103
  "User-Agent" => @user_agent
104
104
  })
105
105
 
106
- if repos_meta['message'] === 'Not Found'
106
+ if repos_meta.is_a?(Hash) && repos_meta['message'] === 'Not Found'
107
107
  issues = nil
108
108
  else
109
109
  issues = repos_meta['open_issues_count']
@@ -123,7 +123,7 @@ module Repos
123
123
  "User-Agent" => @user_agent
124
124
  })
125
125
 
126
- if commits_fetch['message'] === 'Not Found'
126
+ if commits_fetch.is_a?(Hash) && commits_fetch['message'] === 'Not Found'
127
127
  break
128
128
  end
129
129
 
@@ -155,7 +155,7 @@ module Repos
155
155
  "User-Agent" => @user_agent
156
156
  })
157
157
 
158
- if issue_fetch['message'] === 'Not Found'
158
+ if issue_fetch.is_a?(Hash) && issue_fetch['message'] === 'Not Found'
159
159
  break
160
160
  end
161
161
 
@@ -185,7 +185,7 @@ module Repos
185
185
  "User-Agent" => @user_agent
186
186
  })
187
187
 
188
- if commits_fetch['message'] === 'Not Found'
188
+ if commits_fetch.is_a?(Hash) && commits_fetch['message'] === 'Not Found'
189
189
  last_commit = nil
190
190
  else
191
191
  last_commit_date = commits_fetch.first['commit']['author']['date']
@@ -201,7 +201,7 @@ module Repos
201
201
  "User-Agent" => @user_agent
202
202
  })
203
203
 
204
- if github_contents['message'] === 'Not Found'
204
+ if github_contents.is_a?(Hash) && github_contents['message'] === 'Not Found'
205
205
  return nil
206
206
  else
207
207
  readme_file = ''
@@ -1,4 +1,4 @@
1
1
  # Versioning
2
2
  module Repos
3
- VERSION = '0.1.19'
3
+ VERSION = '0.1.20'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repocrawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Chen