gman 7.0.2 → 7.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/CODEOWNERS +3 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +28 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +21 -0
- data/.github/config.yml +23 -0
- data/.github/no-response.yml +15 -0
- data/.github/release-drafter.yml +4 -0
- data/.github/settings.yml +33 -0
- data/.github/stale.yml +29 -0
- data/.rubocop.yml +5 -5
- data/.ruby-version +1 -1
- data/Gemfile +2 -0
- data/bin/gman +3 -1
- data/bin/gman_filter +3 -5
- data/config/domains.txt +191 -134
- data/config/vendor/dotgovs.csv +5786 -5634
- data/docs/CODE_OF_CONDUCT.md +46 -0
- data/docs/CONTRIBUTING.md +92 -0
- data/{README.md → docs/README.md} +2 -2
- data/docs/_config.yml +2 -0
- data/gman.gemspec +16 -15
- data/lib/gman.rb +4 -1
- data/lib/gman/country_codes.rb +19 -19
- data/lib/gman/domain_list.rb +10 -6
- data/lib/gman/identifier.rb +55 -17
- data/lib/gman/importer.rb +27 -18
- data/lib/gman/locality.rb +8 -6
- data/lib/gman/version.rb +3 -1
- data/script/add +2 -0
- data/script/alphabetize +2 -0
- data/script/dedupe +1 -0
- data/script/profile +1 -0
- data/script/prune +5 -3
- data/script/reconcile-us +5 -2
- data/script/vendor-federal-de +2 -1
- data/script/vendor-municipal-de +2 -1
- data/script/vendor-nl +2 -0
- data/script/vendor-public-suffix +3 -1
- data/script/vendor-se +1 -0
- data/script/vendor-swot +2 -0
- data/script/vendor-us +4 -2
- data/spec/gman/bin_spec.rb +8 -6
- data/spec/gman/country_code_spec.rb +6 -4
- data/spec/gman/domain_list_spec.rb +3 -1
- data/spec/gman/domains_spec.rb +3 -0
- data/spec/gman/identifier_spec.rb +38 -3
- data/spec/gman/importer_spec.rb +9 -7
- data/spec/gman/locality_spec.rb +2 -0
- data/spec/gman_spec.rb +2 -0
- data/spec/spec_helper.rb +2 -0
- metadata +52 -44
- data/CONTRIBUTING.md +0 -22
- data/contributing.json +0 -32
data/spec/gman/importer_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
RSpec.describe Gman::Importer do
|
2
4
|
let(:domains) { { 'test' => ['example.com'] } }
|
3
5
|
let(:stdout) { StringIO.new }
|
@@ -83,7 +85,7 @@ RSpec.describe Gman::Importer do
|
|
83
85
|
context 'importing' do
|
84
86
|
let(:domains) do
|
85
87
|
{
|
86
|
-
'test'
|
88
|
+
'test' => ['www.example.com', 'foo.github.io'],
|
87
89
|
'test2' => ['github.com', 'www.github.com', 'whitehouse.gov']
|
88
90
|
}
|
89
91
|
end
|
@@ -113,12 +115,12 @@ RSpec.describe Gman::Importer do
|
|
113
115
|
end
|
114
116
|
|
115
117
|
{
|
116
|
-
:
|
117
|
-
:
|
118
|
-
:
|
119
|
-
:
|
120
|
-
|
121
|
-
}.
|
118
|
+
empty: '',
|
119
|
+
blacklisted: 'egovlink.com',
|
120
|
+
invalid: 'foo.invalid',
|
121
|
+
academic: 'harvard.edu',
|
122
|
+
"rejex'd": 'foo.github.io'
|
123
|
+
}.each_key do |type|
|
122
124
|
context "a #{type} domain" do
|
123
125
|
it 'is invalid' do
|
124
126
|
expect(valid?).to eql(false)
|
data/spec/gman/locality_spec.rb
CHANGED
data/spec/gman_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,99 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: colored
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.2'
|
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: '
|
26
|
+
version: '1.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: iso_country_codes
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0.6'
|
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: '0.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: naughty_or_nice
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.1.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.1.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: public_suffix
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '3.0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '3.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: addressable
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '2.3'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2.3'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: mechanize
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '2.7'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2.7'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: parallel
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,75 +109,75 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '1.6'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: pry
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '0.10'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '0.10'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: rspec
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '3.5'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '3.5'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: rubocop
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0.
|
145
|
+
version: '0.37'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0.
|
152
|
+
version: '0.37'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: ruby-prof
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: '0.
|
159
|
+
version: '0.15'
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0.
|
166
|
+
version: '0.15'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
168
|
+
name: swot
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
173
|
+
version: '1.0'
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
180
|
+
version: '1.0'
|
181
181
|
description: |2
|
182
182
|
A ruby gem to check if the owner of a given email address is working for
|
183
183
|
THE MAN.
|
@@ -188,21 +188,30 @@ executables:
|
|
188
188
|
extensions: []
|
189
189
|
extra_rdoc_files: []
|
190
190
|
files:
|
191
|
+
- ".github/CODEOWNERS"
|
192
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
193
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
194
|
+
- ".github/config.yml"
|
195
|
+
- ".github/no-response.yml"
|
196
|
+
- ".github/release-drafter.yml"
|
197
|
+
- ".github/settings.yml"
|
198
|
+
- ".github/stale.yml"
|
191
199
|
- ".gitignore"
|
192
200
|
- ".rspec"
|
193
201
|
- ".rubocop.yml"
|
194
202
|
- ".ruby-version"
|
195
203
|
- ".travis.yml"
|
196
|
-
- CONTRIBUTING.md
|
197
204
|
- Gemfile
|
198
205
|
- LICENSE
|
199
|
-
- README.md
|
200
206
|
- bin/gman
|
201
207
|
- bin/gman_filter
|
202
208
|
- config/domains.txt
|
203
209
|
- config/vendor/academic.txt
|
204
210
|
- config/vendor/dotgovs.csv
|
205
|
-
-
|
211
|
+
- docs/CODE_OF_CONDUCT.md
|
212
|
+
- docs/CONTRIBUTING.md
|
213
|
+
- docs/README.md
|
214
|
+
- docs/_config.yml
|
206
215
|
- gman.gemspec
|
207
216
|
- lib/gman.rb
|
208
217
|
- lib/gman/country_codes.rb
|
@@ -253,15 +262,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
253
262
|
requirements:
|
254
263
|
- - "~>"
|
255
264
|
- !ruby/object:Gem::Version
|
256
|
-
version: '2.
|
265
|
+
version: '2.3'
|
257
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
258
267
|
requirements:
|
259
268
|
- - ">="
|
260
269
|
- !ruby/object:Gem::Version
|
261
270
|
version: '0'
|
262
271
|
requirements: []
|
263
|
-
|
264
|
-
rubygems_version: 2.5.1
|
272
|
+
rubygems_version: 3.0.2
|
265
273
|
signing_key:
|
266
274
|
specification_version: 4
|
267
275
|
summary: Check if a given domain or email address belong to a governemnt entity
|
data/CONTRIBUTING.md
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# Contributing to Gman
|
2
|
-
|
3
|
-
## How to contribute
|
4
|
-
|
5
|
-
1. Fork the project
|
6
|
-
2. Create a descriptive branch
|
7
|
-
3. Make your change
|
8
|
-
4. Submit a pull request
|
9
|
-
|
10
|
-
## Code
|
11
|
-
|
12
|
-
Open an issue, or submit a pull request
|
13
|
-
|
14
|
-
## Domains
|
15
|
-
|
16
|
-
Domains live in `./config/domains.txt` as a list of TLDs and SLD+TLDs.
|
17
|
-
|
18
|
-
Right now, the only valid government top level domains (TLDs), represent the US government and are `.gov`, and `.mil`.
|
19
|
-
|
20
|
-
Secondary domains (e.g., `gov.uk`, or `mil.au`) detect non-US government entities.
|
21
|
-
|
22
|
-
To add or remove a domain from the list of known government domains, simply edit the `domains.txt` file.
|
data/contributing.json
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"commit": {
|
3
|
-
"subject_cannot_be_empty": true,
|
4
|
-
"subject_must_be_longer_than": 4,
|
5
|
-
"subject_must_be_shorter_than": 101,
|
6
|
-
"subject_lines_must_be_shorter_than": 51,
|
7
|
-
"subject_must_be_single_line": true,
|
8
|
-
"subject_must_be_in_tense": "imperative",
|
9
|
-
"subject_must_start_with_case": "lower",
|
10
|
-
"subject_must_not_end_with_dot": true,
|
11
|
-
"body_lines_must_be_shorter_than": 73
|
12
|
-
},
|
13
|
-
"pull_request": {
|
14
|
-
"subject_cannot_be_empty": true,
|
15
|
-
"subject_must_be_longer_than": 4,
|
16
|
-
"subject_must_be_shorter_than": 101,
|
17
|
-
"subject_must_be_in_tense": "imperative",
|
18
|
-
"subject_must_start_with_case": "upper",
|
19
|
-
"subject_must_not_end_with_dot": true,
|
20
|
-
"body_cannot_be_empty": true
|
21
|
-
},
|
22
|
-
"issue": {
|
23
|
-
"subject_cannot_be_empty": true,
|
24
|
-
"subject_must_be_longer_than": 4,
|
25
|
-
"subject_must_be_shorter_than": 101,
|
26
|
-
"subject_must_be_in_tense": "imperative",
|
27
|
-
"subject_must_start_with_case": "upper",
|
28
|
-
"subject_must_not_end_with_dot": true,
|
29
|
-
"body_cannot_be_empty": true,
|
30
|
-
"body_must_include_reproduction_steps": true
|
31
|
-
}
|
32
|
-
}
|