organization_gem_dependencies 0.2.0 → 0.3.0
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/CHANGES.md +14 -1
- data/lib/organization_gem_dependencies/cli.rb +25 -2
- data/lib/organization_gem_dependencies/version.rb +1 -1
- 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: f5e86325abcdad56c8a6c972470c386ad6e291c6
|
4
|
+
data.tar.gz: d810b3f3f08ebd8a39f3bc3324f41a3a72559735
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 868399d15bddf2c0de91811b6816cea68985bdcdceb289d025a129f909c3fe16fad0dc83509921987dbbc0736ab8abd61ace7aed549cdc96df68bd41e09a6bc1
|
7
|
+
data.tar.gz: 2bca65afb937fee2f240716529ae2d22f7f04e8385d39b6d14f312c6e49fa7350d4e1d6f1fc76c9998adeffc47f58a9ea7cbc32bd36a5e824431b337c682bc3a
|
data/CHANGES.md
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
##
|
3
|
+
## 0.3.0 (2018/07/20)
|
4
|
+
|
5
|
+
**Added**
|
6
|
+
|
7
|
+
* Don't include archived repositories.
|
8
|
+
|
9
|
+
|
10
|
+
## 0.2.0 (2018/07/03)
|
11
|
+
|
12
|
+
**Added**
|
13
|
+
|
14
|
+
* Require `GITHUB_ORGANIZATION` to be provided on the command line.
|
15
|
+
|
16
|
+
## 0.1.0 (2018/07/03)
|
4
17
|
|
5
18
|
**Added**
|
6
19
|
|
@@ -53,14 +53,37 @@ module OrganizationGemDependencies
|
|
53
53
|
|
54
54
|
private
|
55
55
|
|
56
|
+
def archived_repositories(github, organization)
|
57
|
+
github.organization_repositories(organization)
|
58
|
+
last_response = github.last_response
|
59
|
+
|
60
|
+
repositories = []
|
61
|
+
last_response.data.each do |repository|
|
62
|
+
repositories << repository.name if repository.archived
|
63
|
+
end
|
64
|
+
until last_response.rels[:next].nil?
|
65
|
+
last_response = last_response.rels[:next].get
|
66
|
+
last_response.data.each do |repository|
|
67
|
+
repositories << repository.name if repository.archived
|
68
|
+
end
|
69
|
+
end
|
70
|
+
repositories
|
71
|
+
end
|
72
|
+
|
56
73
|
def gemfiles(github, organization)
|
74
|
+
archived = archived_repositories(github, organization)
|
57
75
|
github.search_code(SEARCH_TERM % organization, per_page: 1000)
|
58
76
|
last_response = github.last_response
|
59
77
|
|
60
|
-
matches =
|
78
|
+
matches = []
|
79
|
+
last_response.data.items.each do |match|
|
80
|
+
matches << match unless archived.include? match.repository.name
|
81
|
+
end
|
61
82
|
until last_response.rels[:next].nil?
|
62
83
|
last_response = last_response.rels[:next].get
|
63
|
-
|
84
|
+
last_response.data.items.each do |match|
|
85
|
+
matches << match unless archived.include? match.repository.name
|
86
|
+
end
|
64
87
|
end
|
65
88
|
|
66
89
|
matches.sort_by(&:html_url).each do |match|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: organization_gem_dependencies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryce Boe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|