gman 7.0.6 → 8.1.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.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/bin/gman +10 -15
  3. data/bin/gman_filter +1 -1
  4. data/config/domains.txt +21 -408
  5. data/config/vendor/dotgovs.csv +237 -119
  6. data/docs/README.md +3 -1
  7. data/lib/gman/domain_list.rb +61 -8
  8. data/lib/gman/identifier.rb +11 -12
  9. data/lib/gman/importer.rb +14 -14
  10. data/lib/gman/locality.rb +1 -1
  11. data/lib/gman/version.rb +1 -1
  12. data/lib/gman.rb +8 -6
  13. metadata +8 -221
  14. data/.github/CODEOWNERS +0 -3
  15. data/.github/ISSUE_TEMPLATE/bug_report.md +0 -28
  16. data/.github/ISSUE_TEMPLATE/feature_request.md +0 -21
  17. data/.github/config.yml +0 -23
  18. data/.github/dependabot.yml +0 -10
  19. data/.github/funding.yml +0 -1
  20. data/.github/no-response.yml +0 -15
  21. data/.github/release-drafter.yml +0 -4
  22. data/.github/settings.yml +0 -33
  23. data/.github/stale.yml +0 -29
  24. data/.github/workflows/ci.yml +0 -23
  25. data/.github/workflows/clean.yml +0 -31
  26. data/.github/workflows/codeql-analysis.yml +0 -70
  27. data/.github/workflows/validate.yml +0 -30
  28. data/.github/workflows/vendor.yml +0 -29
  29. data/.gitignore +0 -6
  30. data/.rspec +0 -2
  31. data/.rubocop.yml +0 -29
  32. data/.rubocop_todo.yml +0 -84
  33. data/Gemfile +0 -5
  34. data/docs/CODE_OF_CONDUCT.md +0 -46
  35. data/docs/CONTRIBUTING.md +0 -92
  36. data/docs/SECURITY.md +0 -3
  37. data/docs/_config.yml +0 -2
  38. data/gman.gemspec +0 -45
  39. data/script/add +0 -19
  40. data/script/alphabetize +0 -14
  41. data/script/bootstrap +0 -5
  42. data/script/cibuild +0 -8
  43. data/script/console +0 -3
  44. data/script/dedupe +0 -22
  45. data/script/profile +0 -21
  46. data/script/prune +0 -22
  47. data/script/reconcile-us +0 -72
  48. data/script/release +0 -38
  49. data/script/validate-domains +0 -34
  50. data/script/vendor +0 -13
  51. data/script/vendor-federal-de +0 -14
  52. data/script/vendor-gov-list +0 -8
  53. data/script/vendor-public-suffix +0 -28
  54. data/script/vendor-swot +0 -43
  55. data/script/vendor-us +0 -42
  56. data/spec/fixtures/domains.txt +0 -4
  57. data/spec/fixtures/obama.txt +0 -5
  58. data/spec/gman/bin_spec.rb +0 -101
  59. data/spec/gman/country_code_spec.rb +0 -39
  60. data/spec/gman/domain_list_spec.rb +0 -110
  61. data/spec/gman/domains_spec.rb +0 -25
  62. data/spec/gman/identifier_spec.rb +0 -218
  63. data/spec/gman/importer_spec.rb +0 -236
  64. data/spec/gman/locality_spec.rb +0 -24
  65. data/spec/gman_spec.rb +0 -74
  66. data/spec/spec_helper.rb +0 -31
data/docs/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  A ruby gem to check if the owner of a given email address or website is working for THE MAN (a.k.a verifies government domains). It will also provide you with metadata about the domain, such as the country, state, city, or agency, where applicable. It does this by leveraging the power of [Naughty or Nice](https://github.com/benbalter/naughty_or_nice), the [Public Suffix List](http://publicsuffix.org/), and the associated [Ruby Gem](https://github.com/weppos/publicsuffix-ruby).
6
6
 
7
- You could theoretically [use regex](https://gist.github.com/benbalter/6147066), but either you'll get a bunch of false positives, or your regex will be insanely complicated. `gov.uk`, may be valid, for example, but `gov.fr` is not (it's `gouv.fr`, for what it's worth). The solution? Use Public Suffix to verify that it's a valid public domain, then maintain [a crowd-sourced sub-list of known global government and military domains](https://github.com/benbalter/gman/blob/master/config/domains.txt). It should cover all US and international, government and military domains for both email and website verification.
7
+ You could theoretically [use regex](https://gist.github.com/benbalter/6147066), but either you'll get a bunch of false positives, or your regex will be insanely complicated. `gov.uk`, may be valid, for example, but `gov.fr` is not (it's `gouv.fr`, for what it's worth). The solution? Use Public Suffix to verify that it's a valid public domain, then maintain [a crowd-sourced sub-list of known global government and military domains](https://github.com/benbalter/gman/blob/main/config/domains.txt). It should cover all US and international, government and military domains for both email and website verification.
8
8
 
9
9
  See a domains that's missing or one that shouldn't be there? [We'd love you to contribute](CONTRIBUTING.md).
10
10
 
@@ -18,6 +18,8 @@ Or add this to your `Gemfile` before doing a `bundle install`:
18
18
 
19
19
  `gem 'gman'`
20
20
 
21
+ Gman requires Ruby 3.2 or newer.
22
+
21
23
  ## Usage
22
24
 
23
25
  ### In general
@@ -2,9 +2,9 @@
2
2
 
3
3
  class Gman
4
4
  class DomainList
5
- COMMENT_REGEX = %r{//[/\s]*(.*)$}i.freeze
5
+ COMMENT_REGEX = %r{//[/\s]*(.*)$}i
6
6
 
7
- attr_writer :data, :path, :contents
7
+ attr_writer :path, :contents
8
8
 
9
9
  class << self
10
10
  # The current, government domain list
@@ -41,6 +41,12 @@ class Gman
41
41
  end
42
42
  end
43
43
 
44
+ # Replaces the list data, a hash of group => domains
45
+ def data=(data)
46
+ @data = data
47
+ clear_cache
48
+ end
49
+
44
50
  # Returns the parsed contents of the domain list as a hash
45
51
  # in the form for group => domains
46
52
  def data
@@ -73,7 +79,7 @@ class Gman
73
79
 
74
80
  # Return an array of strings representing all domains on the list
75
81
  def domains
76
- data.values.flatten.compact.sort.uniq
82
+ @domains ||= data.values.flatten.compact.sort.uniq.freeze
77
83
  end
78
84
 
79
85
  # Return the total number of domains in the list
@@ -84,11 +90,12 @@ class Gman
84
90
  # Alphabetize groups and domains within each group
85
91
  # We need to ensure exceptions appear after their coresponding rules
86
92
  def alphabetize
87
- @data = data.sort_by { |k, _v| k.downcase }.to_h
88
- @data.map do |_group, domains|
93
+ self.data = data.sort_by { |k, _v| k.downcase }.to_h
94
+ @data.each_value do |domains|
89
95
  domains.sort! { |a, b| sort_with_exceptions(a, b) }
90
96
  domains.uniq!
91
97
  end
98
+ clear_cache
92
99
  end
93
100
 
94
101
  # Write the domain list to disk
@@ -112,14 +119,60 @@ class Gman
112
119
  end
113
120
  alias to_public_suffix to_s
114
121
 
115
- # Given a domain, find any domain on the list that includes that domain
116
- # E.g., `fcc.gov` would be the parent of `data.fcc.gov`
122
+ # Returns the group a list entry belongs to, e.g., "US Federal" for "fcc.gov"
123
+ # The entry must match the list verbatim. If an entry appears in more than
124
+ # one group, the first group wins.
125
+ def group_for(entry)
126
+ group_index[entry]
127
+ end
128
+
129
+ # Given a domain, find the list entry that covers it, using public suffix
130
+ # rules. E.g., `fcc.gov` would be the parent of `data.fcc.gov`, and
131
+ # `*.foo.gov` the parent of `bar.foo.gov`.
132
+ #
133
+ # If more than one entry matches, the longest wins. A domain under an
134
+ # exception rule (e.g., `!mail.gov.ua`) has no parent. A domain that is
135
+ # itself on the list returns the entry that covers its parent, if any.
136
+ #
137
+ # Returns the list entry as written (e.g., `*.foo.gov`), or nil
117
138
  def parent_domain(domain)
118
- domains.find { |c| domain =~ /\.#{Regexp.escape(c)}$/ }
139
+ rule = parent_list.find(domain, default: nil)
140
+ if rule && !rule.is_a?(PublicSuffix::Rule::Exception) && rule.value == domain
141
+ ancestor = domain.split('.', 2)[1]
142
+ rule = ancestor && parent_list.find(ancestor, default: nil)
143
+ end
144
+ return if rule.nil? || rule.is_a?(PublicSuffix::Rule::Exception)
145
+
146
+ rule.rule
147
+ end
148
+
149
+ # Returns the exception rule (e.g., `!mail.gov.ua`) that excludes the given
150
+ # domain from the list, or nil if none does
151
+ def exception_for(domain)
152
+ rule = parent_list.find(domain, default: nil)
153
+ rule.rule if rule.is_a?(PublicSuffix::Rule::Exception)
119
154
  end
120
155
 
121
156
  private
122
157
 
158
+ # Clear values derived from data. Call after mutating data in place.
159
+ def clear_cache
160
+ @domains = @parent_list = @group_index = nil
161
+ end
162
+
163
+ # PublicSuffix::List of the current data, for parent lookups. Unlike
164
+ # #public_suffix_list, it is rebuilt when the data changes.
165
+ def parent_list
166
+ @parent_list ||= PublicSuffix::List.parse(domains.join("\n"))
167
+ end
168
+
169
+ # Hash of list entry => group, for constant-time group lookups
170
+ def group_index
171
+ @group_index ||= data.each_with_object({}) do |(group, domains), index|
172
+ domains.each { |domain| index[domain] ||= group }
173
+ end
174
+ end
175
+
123
176
  # Parse a public-suffix formatted string into a hash of groups => [domains]
124
177
  def string_to_hash(string)
125
178
  return unless string
@@ -45,7 +45,7 @@ class Gman
45
45
  def state
46
46
  if matches
47
47
  matches[4].upcase
48
- elsif dotgov_listing['State']
48
+ elsif dotgov_listing && dotgov_listing['State']
49
49
  dotgov_listing['State']
50
50
  elsif list_category
51
51
  matches = list_category.match(/usagov([A-Z]{2})/)
@@ -60,7 +60,7 @@ class Gman
60
60
  def federal?
61
61
  return false unless dotgov_listing
62
62
 
63
- domain_type =~ /^Federal/i
63
+ domain_type.to_s.match?(/^Federal/i)
64
64
  end
65
65
 
66
66
  def city?
@@ -87,7 +87,7 @@ class Gman
87
87
  if matches
88
88
  matches[1] == 'state'
89
89
  elsif dotgov_listing
90
- domain_type == 'State/Local Govt' || domain_type == 'State'
90
+ ['State/Local Govt', 'State'].include?(domain_type)
91
91
  else
92
92
  false
93
93
  end
@@ -110,12 +110,8 @@ class Gman
110
110
  def list_category
111
111
  return @list_category if defined?(@list_category)
112
112
 
113
- match = Gman.list.public_suffix_list.find(domain.to_s)
114
- return @list_category = nil unless match
115
-
116
- regex = %r{// ([^\n]+)\n?[^/]*\n#{Regexp.escape(match.value)}\n}im
117
- matches = Gman.list.contents.match(regex)
118
- @list_category = matches ? matches[1] : nil
113
+ match = Gman.list.public_suffix_list.find(domain.to_s, default: nil)
114
+ @list_category = match && Gman.list.group_for(match.value)
119
115
  end
120
116
 
121
117
  def matches
@@ -128,9 +124,7 @@ class Gman
128
124
  return @dotgov_listing if defined? @dotgov_listing
129
125
  return unless dotgov?
130
126
 
131
- @dotgov_listing = Gman.dotgov_list.find do |listing|
132
- listing['Domain Name'].casecmp("#{domain.sld}.gov").zero?
133
- end
127
+ @dotgov_listing = Gman.dotgov_index["#{domain.sld}.gov".downcase]
134
128
  end
135
129
 
136
130
  class << self
@@ -138,6 +132,11 @@ class Gman
138
132
  @dotgov_list ||= CSV.read(dotgov_list_path, headers: true)
139
133
  end
140
134
 
135
+ # Hash of lowercase domain name => dotgov listing, for constant-time lookup
136
+ def dotgov_index
137
+ @dotgov_index ||= dotgov_list.to_h { |listing| [listing['Domain Name'].downcase, listing] }
138
+ end
139
+
141
140
  private
142
141
 
143
142
  def dotgov_list_path
data/lib/gman/importer.rb CHANGED
@@ -6,9 +6,10 @@ require 'yaml'
6
6
  require 'open-uri'
7
7
  require 'resolv'
8
8
  require 'logger'
9
+ require 'addressable/uri'
9
10
  require 'swot'
10
11
  require_relative '../gman'
11
- require_relative './domain_list'
12
+ require_relative 'domain_list'
12
13
 
13
14
  class Gman
14
15
  class Importer
@@ -71,7 +72,7 @@ class Gman
71
72
 
72
73
  def normalize_domain(domain)
73
74
  domain = Gman.new(domain).to_s
74
- domain.to_s.downcase.strip.gsub(/^www./, '').gsub(%r{/$}, '')
75
+ domain.to_s.downcase.strip.delete_prefix('www.').delete_suffix('/')
75
76
  end
76
77
 
77
78
  def valid_domain?(domain, options = {})
@@ -152,34 +153,33 @@ class Gman
152
153
 
153
154
  if current.domains.include?(domain)
154
155
  reject(domain, 'duplicate')
155
- else
156
- parent = current.parent_domain(domain)
156
+ elsif (parent = current.parent_domain(domain))
157
157
  reject(domain, "subdomain of #{parent}")
158
+ else
159
+ reject(domain, "excluded by #{current.exception_for(domain)}")
158
160
  end
159
161
  end
160
162
 
163
+ # A domain is a dupe if it's on the list, covered by a list entry, or
164
+ # excluded by an exception rule
161
165
  def dupe?(domain)
162
- current.domains.include?(domain) || current.parent_domain(domain)
166
+ current.domains.include?(domain) || current.parent_domain(domain) || current.exception_for(domain)
163
167
  end
164
168
 
165
169
  def normalize_domains!
166
- domain_list.to_h.each_value do |domains|
167
- domains.map! { |domain| normalize_domain(domain) }
168
- domains.uniq!
170
+ domain_list.data = domain_list.data.transform_values do |domains|
171
+ domains.map { |domain| normalize_domain(domain) }.uniq
169
172
  end
170
173
  end
171
174
 
172
175
  def ensure_validity!(options = {})
173
- domain_list.data.each_value do |domains|
174
- domains.select! { |domain| valid_domain?(domain, options) }
176
+ domain_list.data = domain_list.data.transform_values do |domains|
177
+ domains.select { |domain| valid_domain?(domain, options) }
175
178
  end
176
179
  end
177
180
 
178
181
  def add_to_current
179
- domain_list.data.each do |group, domains|
180
- current.data[group] ||= []
181
- current.data[group].concat domains
182
- end
182
+ current.data = current.data.merge(domain_list.data) { |_group, existing, added| existing + added }
183
183
  current.write
184
184
  end
185
185
 
data/lib/gman/locality.rb CHANGED
@@ -33,7 +33,7 @@ class Gman
33
33
  |
34
34
  (#{Regexp.union(LOCALITY_DOMAINS)})\.[a-z-]+
35
35
  )\.(#{Regexp.union(STATES)})\.us
36
- /x.freeze
36
+ /x
37
37
 
38
38
  def self.valid?(domain)
39
39
  !domain.to_s.match(Locality::REGEX).nil?
data/lib/gman/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Gman
4
- VERSION = '7.0.6'
4
+ VERSION = '8.1.0'
5
5
  end
data/lib/gman.rb CHANGED
@@ -45,9 +45,7 @@ class Gman
45
45
  def valid?
46
46
  return @valid if defined?(@valid)
47
47
 
48
- @valid = false unless valid_domain?
49
- @valid = false if academic?
50
- @valid ||= locality? || public_suffix_valid?
48
+ @valid = valid_domain? && (locality? || public_suffix_valid?)
51
49
  end
52
50
 
53
51
  def locality?
@@ -57,14 +55,18 @@ class Gman
57
55
  private
58
56
 
59
57
  def valid_domain?
60
- @valid_domain ||= !domain.nil? && !academic?
58
+ !domain.nil? && !academic?
61
59
  end
62
60
 
63
61
  def academic?
64
- @academic ||= domain && Gman.academic_list.valid?(to_s)
62
+ return @academic if defined?(@academic)
63
+
64
+ @academic = !domain.nil? && Gman.academic_list.valid?(to_s)
65
65
  end
66
66
 
67
67
  def public_suffix_valid?
68
- @public_suffix_valid ||= Gman.list.valid?(to_s)
68
+ return @public_suffix_valid if defined?(@public_suffix_valid)
69
+
70
+ @public_suffix_valid = Gman.list.valid?(to_s)
69
71
  end
70
72
  end
metadata CHANGED
@@ -1,29 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gman
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.6
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Balter
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2022-12-12 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
- name: colored
13
+ name: csv
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: '1.2'
18
+ version: '3.0'
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
23
  - - "~>"
25
24
  - !ruby/object:Gem::Version
26
- version: '1.2'
25
+ version: '3.0'
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: iso_country_codes
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -66,160 +65,6 @@ dependencies:
66
65
  - - ">="
67
66
  - !ruby/object:Gem::Version
68
67
  version: '3.0'
69
- - !ruby/object:Gem::Dependency
70
- name: addressable
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '2.3'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '2.3'
83
- - !ruby/object:Gem::Dependency
84
- name: mechanize
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '2.7'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '2.7'
97
- - !ruby/object:Gem::Dependency
98
- name: parallel
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '1.6'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '1.6'
111
- - !ruby/object:Gem::Dependency
112
- name: pry
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '0.10'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '0.10'
125
- - !ruby/object:Gem::Dependency
126
- name: rspec
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '3.5'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '3.5'
139
- - !ruby/object:Gem::Dependency
140
- name: rubocop
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '1.0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '1.0'
153
- - !ruby/object:Gem::Dependency
154
- name: rubocop-performance
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '1.5'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '1.5'
167
- - !ruby/object:Gem::Dependency
168
- name: rubocop-rspec
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - "~>"
172
- - !ruby/object:Gem::Version
173
- version: '2.0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - "~>"
179
- - !ruby/object:Gem::Version
180
- version: '2.0'
181
- - !ruby/object:Gem::Dependency
182
- name: ruby-prof
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: '1.4'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: '1.4'
195
- - !ruby/object:Gem::Dependency
196
- name: ruby-progressbar
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: '1.10'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - "~>"
207
- - !ruby/object:Gem::Version
208
- version: '1.10'
209
- - !ruby/object:Gem::Dependency
210
- name: swot
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - "~>"
214
- - !ruby/object:Gem::Version
215
- version: '1.0'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - "~>"
221
- - !ruby/object:Gem::Version
222
- version: '1.0'
223
68
  description: |2
224
69
  A ruby gem to check if the owner of a given email address is working for
225
70
  THE MAN.
@@ -230,38 +75,13 @@ executables:
230
75
  extensions: []
231
76
  extra_rdoc_files: []
232
77
  files:
233
- - ".github/CODEOWNERS"
234
- - ".github/ISSUE_TEMPLATE/bug_report.md"
235
- - ".github/ISSUE_TEMPLATE/feature_request.md"
236
- - ".github/config.yml"
237
- - ".github/dependabot.yml"
238
- - ".github/funding.yml"
239
- - ".github/no-response.yml"
240
- - ".github/release-drafter.yml"
241
- - ".github/settings.yml"
242
- - ".github/stale.yml"
243
- - ".github/workflows/ci.yml"
244
- - ".github/workflows/clean.yml"
245
- - ".github/workflows/codeql-analysis.yml"
246
- - ".github/workflows/validate.yml"
247
- - ".github/workflows/vendor.yml"
248
- - ".gitignore"
249
- - ".rspec"
250
- - ".rubocop.yml"
251
- - ".rubocop_todo.yml"
252
- - Gemfile
253
78
  - LICENSE
254
79
  - bin/gman
255
80
  - bin/gman_filter
256
81
  - config/domains.txt
257
82
  - config/vendor/academic.txt
258
83
  - config/vendor/dotgovs.csv
259
- - docs/CODE_OF_CONDUCT.md
260
- - docs/CONTRIBUTING.md
261
84
  - docs/README.md
262
- - docs/SECURITY.md
263
- - docs/_config.yml
264
- - gman.gemspec
265
85
  - lib/gman.rb
266
86
  - lib/gman/country_codes.rb
267
87
  - lib/gman/domain_list.rb
@@ -269,40 +89,11 @@ files:
269
89
  - lib/gman/importer.rb
270
90
  - lib/gman/locality.rb
271
91
  - lib/gman/version.rb
272
- - script/add
273
- - script/alphabetize
274
- - script/bootstrap
275
- - script/cibuild
276
- - script/console
277
- - script/dedupe
278
- - script/profile
279
- - script/prune
280
- - script/reconcile-us
281
- - script/release
282
- - script/validate-domains
283
- - script/vendor
284
- - script/vendor-federal-de
285
- - script/vendor-gov-list
286
- - script/vendor-public-suffix
287
- - script/vendor-swot
288
- - script/vendor-us
289
- - spec/fixtures/domains.txt
290
- - spec/fixtures/obama.txt
291
- - spec/gman/bin_spec.rb
292
- - spec/gman/country_code_spec.rb
293
- - spec/gman/domain_list_spec.rb
294
- - spec/gman/domains_spec.rb
295
- - spec/gman/identifier_spec.rb
296
- - spec/gman/importer_spec.rb
297
- - spec/gman/locality_spec.rb
298
- - spec/gman_spec.rb
299
- - spec/spec_helper.rb
300
92
  homepage: https://github.com/benbalter/gman
301
93
  licenses:
302
94
  - MIT
303
95
  metadata:
304
96
  rubygems_mfa_required: 'true'
305
- post_install_message:
306
97
  rdoc_options: []
307
98
  require_paths:
308
99
  - lib
@@ -310,18 +101,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
310
101
  requirements:
311
102
  - - ">="
312
103
  - !ruby/object:Gem::Version
313
- version: '2.5'
314
- - - "<"
315
- - !ruby/object:Gem::Version
316
- version: '4.0'
104
+ version: '3.2'
317
105
  required_rubygems_version: !ruby/object:Gem::Requirement
318
106
  requirements:
319
107
  - - ">="
320
108
  - !ruby/object:Gem::Version
321
109
  version: '0'
322
110
  requirements: []
323
- rubygems_version: 3.2.33
324
- signing_key:
111
+ rubygems_version: 3.6.9
325
112
  specification_version: 4
326
- summary: Check if a given domain or email address belong to a governemnt entity
113
+ summary: Check if a given domain or email address belong to a government entity
327
114
  test_files: []
data/.github/CODEOWNERS DELETED
@@ -1,3 +0,0 @@
1
- # Require @benbalter's :+1: for changes to the .github repo-config files
2
- # mainly due to https://github.com/probot/settings privilege escalation
3
- .github/* @benbalter
@@ -1,28 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
-
5
- ---
6
-
7
- ### Describe the bug
8
-
9
- A clear and concise description of what the bug is.
10
-
11
- ### Steps to reproduce the behavior
12
-
13
- 1. Go to '...'
14
- 2. Click on '....'
15
- 3. Scroll down to '....'
16
- 4. See error
17
-
18
- ### Expected behavior
19
-
20
- A clear and concise description of what you expected to happen.
21
-
22
- ### Screenshots
23
-
24
- If applicable, add screenshots to help explain your problem.
25
-
26
- ### Additional context
27
-
28
- Add any other context about the problem here.
@@ -1,21 +0,0 @@
1
- ---
2
- name: Feature request
3
- about: Suggest an idea for this project
4
-
5
- ---
6
-
7
- ### Is your feature request related to a problem? Please describe the problem you're trying to solve.
8
-
9
- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10
-
11
- ### Describe the solution you'd like
12
-
13
- A clear and concise description of what you want to happen.
14
-
15
- ### Describe alternatives you've considered
16
-
17
- A clear and concise description of any alternative solutions or features you've considered.
18
-
19
- ### Additional context
20
-
21
- Add any other context or screenshots about the feature request here.
data/.github/config.yml DELETED
@@ -1,23 +0,0 @@
1
- # Behaviorbot config. See https://github.com/behaviorbot/ for more information.
2
- # Note: Please Don't edit this file directly.
3
- # Edit https://github.com/benbalter/shared-community-files instead.
4
-
5
- # Configuration for update-docs - https://github.com/behaviorbot/update-docs
6
- updateDocsComment: "Thanks for the pull request! If you are making any changes to the user-facing functionality, please be sure to update the documentation in the `README` or `docs/` folder alongside your change. :heart:"
7
-
8
- # Configuration for request-info - https://github.com/behaviorbot/request-info
9
- requestInfoReplyComment: Thanks for this. Do you mind providing a bit more information about what problem you're trying to solve?
10
- requestInfoLabelToAdd: more-information-needed
11
-
12
- # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
13
- #newIssueWelcomeComment: >
14
- # Welcome!
15
-
16
- # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
17
- newPRWelcomeComment: Welcome! Congrats on your first pull request to Gman. If you haven't already, please be sure to check out [the contributing guidelines](https://github.com/benbalter/gman/blob/master/docs/CONTRIBUTING.md).
18
-
19
- # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
20
- firstPRMergeComment: "Congrats on getting your first pull request to Gman merged! Without amazing humans like you submitting pull requests, we couldn’t run this project. You rock! :tada:<br /><br />If you're interested in tackling another bug or feature, take a look at [the open issues](https://github.com/benbalter/gman/issues), especially those [labeled `help wanted`](https://github.com/benbalter/gman/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)."
21
-
22
- # Bug workaround
23
- contact_links: []