organization_audit 1.0.2 → 1.0.3
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/organization_audit.rb +11 -3
- data/lib/organization_audit/repo.rb +4 -0
- data/lib/organization_audit/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2bf9677823e9a2a8a32cfdf9987b7e0b093c27d7
|
|
4
|
+
data.tar.gz: 6238a73d10846157e2919dc4b07ed3011bba2312
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 34071371de71ce57e439f4ae7fd003a31f8e5b06a657e221aa46bd41950c0b561318b4760f057dd43f08b7039f1b3cd6673ee4379030298540ee563ec4475bc9
|
|
7
|
+
data.tar.gz: 3db19e81ccb7d006b4edfdad5aed5e1af07df4128e31a90439c2196696bbabf68746b0e4a8f9655c28fc1617c1a7815311825adc90c9f059549cd9ba31f5c0d0
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/lib/organization_audit.rb
CHANGED
|
@@ -5,9 +5,9 @@ module OrganizationAudit
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
def all(options={})
|
|
8
|
+
ignore = (options[:ignore] || [])
|
|
8
9
|
Repo.all(options).reject do |repo|
|
|
9
|
-
|
|
10
|
-
ignored.include?(repo.url) or ignored.include?(repo.name)
|
|
10
|
+
matches_ignore?(ignore, repo) or (options[:ignore_public] and repo.public?)
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
@@ -15,7 +15,15 @@ module OrganizationAudit
|
|
|
15
15
|
parser.on("--user USER", "Use this github user") { |user| options[:user] = user }
|
|
16
16
|
parser.on("--organization ORGANIZATION", "Use this github organization") { |organization| options[:organization] = organization }
|
|
17
17
|
parser.on("--token TOKEN", "Use this github token") { |token| options[:token] = token }
|
|
18
|
-
parser.on("--ignore REPO", "Ignore given repo name or url (use multiple times)") { |repo_name| options[:ignore] << repo_name }
|
|
18
|
+
parser.on("--ignore REPO", "Ignore given repo name or url or name /regexp/ (use multiple times)") { |repo_name| options[:ignore] << repo_name }
|
|
19
|
+
parser.on("--ignore-public", "Ignore public repos") { options[:ignore_public] = true }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
private
|
|
23
|
+
|
|
24
|
+
def matches_ignore?(ignore, repo)
|
|
25
|
+
ignore_regexp = ignore.select { |i| i =~ /^\/.*\/$/ }.map { |i| Regexp.new(i[1..-2]) }
|
|
26
|
+
ignore.include?(repo.url) or ignore.include?(repo.name) or ignore_regexp.any? { |i| i =~ repo.name }
|
|
19
27
|
end
|
|
20
28
|
end
|
|
21
29
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: organization_audit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Grosser
|
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
|
29
29
|
y0kCSWmK6D+x/SbfS6r7Ke07MRqziJdB9GuE1+0cIRuFh8EQ+LN6HXCKM5pon/GU
|
|
30
30
|
ycwMXfl0
|
|
31
31
|
-----END CERTIFICATE-----
|
|
32
|
-
date: 2014-01-
|
|
32
|
+
date: 2014-01-30 00:00:00.000000000 Z
|
|
33
33
|
dependencies:
|
|
34
34
|
- !ruby/object:Gem::Dependency
|
|
35
35
|
name: json
|
metadata.gz.sig
CHANGED
|
Binary file
|