reserved_subdomains 0.9
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 +7 -0
- data/.circleci/config.yml +21 -0
- data/.github/workflows/gempush.yml +38 -0
- data/.github/workflows/ruby.yml +20 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.ruby-version +1 -0
- data/.travis.yml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +52 -0
- data/LICENSE.txt +21 -0
- data/README.md +49 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/regexp_list.yml +20 -0
- data/lib/reserved_subdomains.rb +36 -0
- data/lib/reserved_subdomains/version.rb +3 -0
- data/lib/reserved_subdomains_list.yml +475 -0
- data/reserved_subdomains.gemspec +42 -0
- metadata +123 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4e4eacf95278f5220a45fba74eda7e0403a784cd0a0dacb8eb6defce7c9a3b33
|
4
|
+
data.tar.gz: c082088dc8ac2978806c69cfdedcd8bfcb021b7489b2e0b282bcc66432fc7be7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: '0325815fea812d555178db26e3e6ec760932df61eefa4afdd41cc936792242ac89fea864b3d0afcc17877a51445d18cbed8a61e7547de4540fd1f7ddae91f4b6'
|
7
|
+
data.tar.gz: dbd49b1f799ecb19c9d5d8dfb558e733da361c93252002843d8ed1cd5dcfa648718c6bedfca608f5b5d9f95e03cead99f377826f54ea521718b11ceb245c3dc1
|
@@ -0,0 +1,21 @@
|
|
1
|
+
version: 2.1
|
2
|
+
orbs:
|
3
|
+
ruby: circleci/ruby@0.1.2
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
docker:
|
8
|
+
- image: circleci/ruby:2.7.0
|
9
|
+
steps:
|
10
|
+
- checkout
|
11
|
+
- run:
|
12
|
+
name: Which bundler?
|
13
|
+
command: bundle -v
|
14
|
+
- run: # Install Ruby dependencies
|
15
|
+
name: Bundle Install
|
16
|
+
command: bundle install
|
17
|
+
- run:
|
18
|
+
name: Run rake
|
19
|
+
command: bundle exec rake
|
20
|
+
- store_test_results:
|
21
|
+
path: test_results
|
@@ -0,0 +1,38 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
pull_request:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build:
|
13
|
+
name: Build + Publish
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
- name: Set up Ruby 2.6
|
19
|
+
uses: actions/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
version: 2.6.x
|
22
|
+
|
23
|
+
- name: Build and test with Rake
|
24
|
+
run: |
|
25
|
+
gem install bundler
|
26
|
+
bundle install --jobs 4 --retry 3
|
27
|
+
bundle exec rake
|
28
|
+
|
29
|
+
- name: Publish to RubyGems
|
30
|
+
run: |
|
31
|
+
mkdir -p $HOME/.gem
|
32
|
+
touch $HOME/.gem/credentials
|
33
|
+
chmod 0600 $HOME/.gem/credentials
|
34
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
35
|
+
gem build *.gemspec
|
36
|
+
gem push *.gem
|
37
|
+
env:
|
38
|
+
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v2
|
12
|
+
- name: Set up Ruby 2.6
|
13
|
+
uses: actions/setup-ruby@v1
|
14
|
+
with:
|
15
|
+
ruby-version: 2.6.x
|
16
|
+
- name: Build and test with Rake
|
17
|
+
run: |
|
18
|
+
gem install bundler
|
19
|
+
bundle install --jobs 4 --retry 3
|
20
|
+
bundle exec rake
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.0
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
reserved_subdomains (0.9)
|
5
|
+
activemodel (~> 6.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (6.0.2.1)
|
11
|
+
activesupport (= 6.0.2.1)
|
12
|
+
activesupport (6.0.2.1)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
+
i18n (>= 0.7, < 2)
|
15
|
+
minitest (~> 5.1)
|
16
|
+
tzinfo (~> 1.1)
|
17
|
+
zeitwerk (~> 2.2)
|
18
|
+
concurrent-ruby (1.1.6)
|
19
|
+
diff-lcs (1.3)
|
20
|
+
i18n (1.8.2)
|
21
|
+
concurrent-ruby (~> 1.0)
|
22
|
+
minitest (5.14.0)
|
23
|
+
rake (10.5.0)
|
24
|
+
rspec (3.9.0)
|
25
|
+
rspec-core (~> 3.9.0)
|
26
|
+
rspec-expectations (~> 3.9.0)
|
27
|
+
rspec-mocks (~> 3.9.0)
|
28
|
+
rspec-core (3.9.1)
|
29
|
+
rspec-support (~> 3.9.1)
|
30
|
+
rspec-expectations (3.9.0)
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
+
rspec-support (~> 3.9.0)
|
33
|
+
rspec-mocks (3.9.1)
|
34
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
35
|
+
rspec-support (~> 3.9.0)
|
36
|
+
rspec-support (3.9.2)
|
37
|
+
thread_safe (0.3.6)
|
38
|
+
tzinfo (1.2.6)
|
39
|
+
thread_safe (~> 0.1)
|
40
|
+
zeitwerk (2.2.2)
|
41
|
+
|
42
|
+
PLATFORMS
|
43
|
+
ruby
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
bundler (~> 2.0)
|
47
|
+
rake (~> 10.0)
|
48
|
+
reserved_subdomains!
|
49
|
+
rspec (~> 3.0)
|
50
|
+
|
51
|
+
BUNDLED WITH
|
52
|
+
2.1.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 Clayton
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Reserved Subdomains
|
2
|
+
|
3
|
+

|
4
|
+

|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'reserved_subdomains'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install reserved_subdomains
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
Use the custom validator on your `ActiveModel` or `ActiveRecord` class for normal validation.
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
class Company < ApplicationRecord
|
28
|
+
validates :subdomain, allowed_subdomain: true
|
29
|
+
end
|
30
|
+
```
|
31
|
+
|
32
|
+
## Thanks
|
33
|
+
|
34
|
+
* https://github.com/Sage/vat_id_validator - for code organization and testing inspiration
|
35
|
+
* https://github.com/nkkollaw/reserved-subdomains - For the list of subdomains
|
36
|
+
|
37
|
+
## Development
|
38
|
+
|
39
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
40
|
+
|
41
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
42
|
+
|
43
|
+
## Contributing
|
44
|
+
|
45
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/clayton/reserved_subdomains.
|
46
|
+
|
47
|
+
## License
|
48
|
+
|
49
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "reserved_subdomains"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/regexp_list.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
- "/db[0-9]+/"
|
3
|
+
- "/dc[0-9]+/"
|
4
|
+
- "/dev[0-9]+/"
|
5
|
+
- "/dns[0-9]+/"
|
6
|
+
- "/ftp[0-9]+/"
|
7
|
+
- "/host[0-9]+/"
|
8
|
+
- "/m[0-9]+/"
|
9
|
+
- "/mail[0-9]+/"
|
10
|
+
- "/mx[0-9]+/"
|
11
|
+
- "/ns[0-9]+/"
|
12
|
+
- "/server[0-9]+/"
|
13
|
+
- "/server-[0-9]+/"
|
14
|
+
- "/smtp[0-9]+/"
|
15
|
+
- "/static[0-9]+/"
|
16
|
+
- "/test[0-9]+/"
|
17
|
+
- "/v[0-9]+/" # versions
|
18
|
+
- "/vpn[0-9]+/"
|
19
|
+
- "/web[0-9]+/"
|
20
|
+
- "/ww[a-z0-9-]+/" # anything that looks like "www" might be used for spoofing
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "reserved_subdomains/version"
|
2
|
+
require 'active_model/validator'
|
3
|
+
require 'active_support/core_ext/object/blank'
|
4
|
+
require "yaml"
|
5
|
+
|
6
|
+
module ActiveModel
|
7
|
+
module Validations
|
8
|
+
class AllowedSubdomainValidator < ::ActiveModel::EachValidator
|
9
|
+
def validate_each(record, attribute, value)
|
10
|
+
if value.present? && ( exists_in_reserved_list(value) || matches_regexp_list(value))
|
11
|
+
record.errors.add(attribute, "invalid_#{attribute}".to_sym)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def load_list(file)
|
18
|
+
shared_path = File.dirname(__FILE__)
|
19
|
+
YAML.load_file(File.join(shared_path, file))
|
20
|
+
end
|
21
|
+
|
22
|
+
def exists_in_reserved_list(value)
|
23
|
+
list = load_list('reserved_subdomains_list.yml')
|
24
|
+
list.include?(value)
|
25
|
+
end
|
26
|
+
|
27
|
+
def matches_regexp_list(value)
|
28
|
+
list = load_list('regexp_list.yml')
|
29
|
+
list.each do |regexp|
|
30
|
+
return true unless value.match(regexp).nil?
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,475 @@
|
|
1
|
+
--- # Reserved subdomains
|
2
|
+
- a
|
3
|
+
- about
|
4
|
+
- abuse
|
5
|
+
- access
|
6
|
+
- account
|
7
|
+
- accounts
|
8
|
+
- ad
|
9
|
+
- adm
|
10
|
+
- admin
|
11
|
+
- administrator
|
12
|
+
- administrators
|
13
|
+
- ads
|
14
|
+
- adserver
|
15
|
+
- adv
|
16
|
+
- affiliate
|
17
|
+
- affiliates
|
18
|
+
- agenda
|
19
|
+
- alpha
|
20
|
+
- analytics
|
21
|
+
- api
|
22
|
+
- app
|
23
|
+
- apps
|
24
|
+
- archive
|
25
|
+
- asset
|
26
|
+
- assets
|
27
|
+
- atom
|
28
|
+
- auth
|
29
|
+
- auto
|
30
|
+
- autoconfig
|
31
|
+
- autodiscover
|
32
|
+
- b
|
33
|
+
- b2b
|
34
|
+
- backup
|
35
|
+
- backups
|
36
|
+
- bb
|
37
|
+
- bbs # means forum
|
38
|
+
- beta
|
39
|
+
- billing
|
40
|
+
- blog
|
41
|
+
- blogs
|
42
|
+
- board
|
43
|
+
- book
|
44
|
+
- bookmark
|
45
|
+
- bookmarks
|
46
|
+
- bot
|
47
|
+
- bots
|
48
|
+
- broadcast-ip
|
49
|
+
- bug
|
50
|
+
- bugs
|
51
|
+
- business
|
52
|
+
- c
|
53
|
+
- cache
|
54
|
+
- cal
|
55
|
+
- calendar
|
56
|
+
- careers
|
57
|
+
- cdn
|
58
|
+
- chat
|
59
|
+
- cisco
|
60
|
+
- citrix
|
61
|
+
- client
|
62
|
+
- clients
|
63
|
+
- cloud
|
64
|
+
- cms
|
65
|
+
- cn
|
66
|
+
- code
|
67
|
+
- comment
|
68
|
+
- comments
|
69
|
+
- communities
|
70
|
+
- community
|
71
|
+
- connect
|
72
|
+
- contact
|
73
|
+
- content
|
74
|
+
- contributors
|
75
|
+
- control
|
76
|
+
- coppa
|
77
|
+
- copyright
|
78
|
+
- corp
|
79
|
+
- cp
|
80
|
+
- cpanel
|
81
|
+
- create
|
82
|
+
- crm
|
83
|
+
- css
|
84
|
+
- cssproxy
|
85
|
+
- customize
|
86
|
+
- cvs
|
87
|
+
- d
|
88
|
+
- dashboard
|
89
|
+
- data
|
90
|
+
- db
|
91
|
+
- dbadmin
|
92
|
+
- dc
|
93
|
+
- de
|
94
|
+
- delete
|
95
|
+
- demo
|
96
|
+
- design
|
97
|
+
- destroy
|
98
|
+
- dev
|
99
|
+
- devel
|
100
|
+
- develop
|
101
|
+
- developer
|
102
|
+
- developers
|
103
|
+
- development
|
104
|
+
- direct
|
105
|
+
- directory
|
106
|
+
- diversity
|
107
|
+
- dmca
|
108
|
+
- dns
|
109
|
+
- doc
|
110
|
+
- docs
|
111
|
+
- domain
|
112
|
+
- domains
|
113
|
+
- download
|
114
|
+
- downloads
|
115
|
+
- drupal
|
116
|
+
- e
|
117
|
+
- e-mail
|
118
|
+
- edit
|
119
|
+
- edu
|
120
|
+
- email
|
121
|
+
- embed
|
122
|
+
- embedded
|
123
|
+
- en
|
124
|
+
- eng
|
125
|
+
- english
|
126
|
+
- es
|
127
|
+
- event
|
128
|
+
- events
|
129
|
+
- example
|
130
|
+
- exchange
|
131
|
+
- explore
|
132
|
+
- extranet
|
133
|
+
- f
|
134
|
+
- facebook
|
135
|
+
- faq
|
136
|
+
- faqs
|
137
|
+
- favorite
|
138
|
+
- favorites
|
139
|
+
- fax
|
140
|
+
- fb
|
141
|
+
- feed
|
142
|
+
- feedback
|
143
|
+
- feeds
|
144
|
+
- file
|
145
|
+
- files
|
146
|
+
- finance
|
147
|
+
- firewall
|
148
|
+
- forms
|
149
|
+
- forum
|
150
|
+
- forums
|
151
|
+
- foto
|
152
|
+
- fr
|
153
|
+
- free
|
154
|
+
- friend
|
155
|
+
- friends
|
156
|
+
- fs
|
157
|
+
- ftp
|
158
|
+
- fw
|
159
|
+
- g
|
160
|
+
- gallery
|
161
|
+
- game
|
162
|
+
- games
|
163
|
+
- gate
|
164
|
+
- gateway
|
165
|
+
- general
|
166
|
+
- get
|
167
|
+
- gift
|
168
|
+
- gis
|
169
|
+
- git
|
170
|
+
- gmail
|
171
|
+
- go
|
172
|
+
- gov
|
173
|
+
- groups
|
174
|
+
- guide
|
175
|
+
- guides
|
176
|
+
- help
|
177
|
+
- home
|
178
|
+
- host
|
179
|
+
- hosting
|
180
|
+
- hostmaster
|
181
|
+
- hr
|
182
|
+
- html
|
183
|
+
- i
|
184
|
+
- icon
|
185
|
+
- icons
|
186
|
+
- id
|
187
|
+
- idp
|
188
|
+
- im
|
189
|
+
- image
|
190
|
+
- images
|
191
|
+
- imap
|
192
|
+
- img
|
193
|
+
- in
|
194
|
+
- inbox
|
195
|
+
- index
|
196
|
+
- info
|
197
|
+
- intra
|
198
|
+
- intranet
|
199
|
+
- invite
|
200
|
+
- ip
|
201
|
+
- ipfixe
|
202
|
+
- iphone
|
203
|
+
- ipv4
|
204
|
+
- irc
|
205
|
+
- it
|
206
|
+
- jabber
|
207
|
+
- job
|
208
|
+
- jobs
|
209
|
+
- jp
|
210
|
+
- js
|
211
|
+
- kb
|
212
|
+
- knowledgebase
|
213
|
+
- lab
|
214
|
+
- labs
|
215
|
+
- ldap
|
216
|
+
- legacy
|
217
|
+
- legal
|
218
|
+
- lib
|
219
|
+
- library
|
220
|
+
- libs
|
221
|
+
- link
|
222
|
+
- links
|
223
|
+
- linux
|
224
|
+
- list
|
225
|
+
- lists
|
226
|
+
- live
|
227
|
+
- lms
|
228
|
+
- local
|
229
|
+
- localhost
|
230
|
+
- loghost
|
231
|
+
- login
|
232
|
+
- loopback
|
233
|
+
- m
|
234
|
+
- mail
|
235
|
+
- mailadmin
|
236
|
+
- mailer
|
237
|
+
- mailhost
|
238
|
+
- mailing
|
239
|
+
- mailman
|
240
|
+
- mailserver
|
241
|
+
- main
|
242
|
+
- manage
|
243
|
+
- map
|
244
|
+
- maps
|
245
|
+
- market
|
246
|
+
- marketing
|
247
|
+
- master
|
248
|
+
- media
|
249
|
+
- member
|
250
|
+
- members
|
251
|
+
- messages
|
252
|
+
- mirror
|
253
|
+
- mobile
|
254
|
+
- monitor
|
255
|
+
- monitoring
|
256
|
+
- moodle
|
257
|
+
- mrtg
|
258
|
+
- ms
|
259
|
+
- mssql
|
260
|
+
- mx
|
261
|
+
- my
|
262
|
+
- mysql
|
263
|
+
- nagios
|
264
|
+
- net
|
265
|
+
- network-ip
|
266
|
+
- new
|
267
|
+
- news
|
268
|
+
- newsletter
|
269
|
+
- nl
|
270
|
+
- noc
|
271
|
+
- ns
|
272
|
+
- ntp
|
273
|
+
- ntp1
|
274
|
+
- oa
|
275
|
+
- office
|
276
|
+
- official
|
277
|
+
- old
|
278
|
+
- oldmail
|
279
|
+
- online
|
280
|
+
- origin
|
281
|
+
- outlook
|
282
|
+
- owa # Outlook
|
283
|
+
- p
|
284
|
+
- pages
|
285
|
+
- paid
|
286
|
+
- panel
|
287
|
+
- partner
|
288
|
+
- partners
|
289
|
+
- pay
|
290
|
+
- payment
|
291
|
+
- payments
|
292
|
+
- pbx
|
293
|
+
- pda
|
294
|
+
- pgsql
|
295
|
+
- photo
|
296
|
+
- photos
|
297
|
+
- php
|
298
|
+
- phpmyadmin
|
299
|
+
- pics
|
300
|
+
- picture
|
301
|
+
- pictures
|
302
|
+
- pm
|
303
|
+
- policy
|
304
|
+
- pop
|
305
|
+
- pop3
|
306
|
+
- portal
|
307
|
+
- post
|
308
|
+
- postmaster
|
309
|
+
- pr
|
310
|
+
- press
|
311
|
+
- preview
|
312
|
+
- privacy
|
313
|
+
- private
|
314
|
+
- pro
|
315
|
+
- prod
|
316
|
+
- product
|
317
|
+
- production
|
318
|
+
- products
|
319
|
+
- profile
|
320
|
+
- project
|
321
|
+
- projects
|
322
|
+
- promo
|
323
|
+
- proxy
|
324
|
+
- pt
|
325
|
+
- public
|
326
|
+
- purge
|
327
|
+
- put
|
328
|
+
- qa
|
329
|
+
- redirect
|
330
|
+
- register
|
331
|
+
- relay
|
332
|
+
- remote
|
333
|
+
- report
|
334
|
+
- reports
|
335
|
+
- research
|
336
|
+
- reviews
|
337
|
+
- root
|
338
|
+
- router
|
339
|
+
- rss
|
340
|
+
- rt
|
341
|
+
- ru
|
342
|
+
- s
|
343
|
+
- sales
|
344
|
+
- sandbox
|
345
|
+
- search
|
346
|
+
- secure
|
347
|
+
- seo
|
348
|
+
- server
|
349
|
+
- service
|
350
|
+
- services
|
351
|
+
- setting
|
352
|
+
- settings
|
353
|
+
- sftp
|
354
|
+
- share
|
355
|
+
- sharepoint
|
356
|
+
- shop
|
357
|
+
- shopping
|
358
|
+
- show
|
359
|
+
- sip
|
360
|
+
- site
|
361
|
+
- sitebuilder
|
362
|
+
- sitemap
|
363
|
+
- sites
|
364
|
+
- sms
|
365
|
+
- smtp
|
366
|
+
- social
|
367
|
+
- software
|
368
|
+
- sp
|
369
|
+
- spam
|
370
|
+
- speedtest
|
371
|
+
- sport
|
372
|
+
- sports
|
373
|
+
- sql
|
374
|
+
- ssh
|
375
|
+
- ssl
|
376
|
+
- sso
|
377
|
+
- st
|
378
|
+
- staff
|
379
|
+
- stage
|
380
|
+
- staging
|
381
|
+
- start
|
382
|
+
- stat
|
383
|
+
- static
|
384
|
+
- statistics
|
385
|
+
- stats
|
386
|
+
- status
|
387
|
+
- storage
|
388
|
+
- store
|
389
|
+
- stream
|
390
|
+
- streaming
|
391
|
+
- student
|
392
|
+
- style
|
393
|
+
- styles
|
394
|
+
- support
|
395
|
+
- survey
|
396
|
+
- sv
|
397
|
+
- svn
|
398
|
+
- syn
|
399
|
+
- syndicated
|
400
|
+
- system
|
401
|
+
- t
|
402
|
+
- tag
|
403
|
+
- tags
|
404
|
+
- team
|
405
|
+
- teams
|
406
|
+
- tech
|
407
|
+
- temp
|
408
|
+
- termsofservice
|
409
|
+
- test
|
410
|
+
- testing
|
411
|
+
- thumbs
|
412
|
+
- ticket
|
413
|
+
- tickets
|
414
|
+
- time
|
415
|
+
- tmp
|
416
|
+
- tool
|
417
|
+
- tools
|
418
|
+
- tos
|
419
|
+
- trac
|
420
|
+
- track
|
421
|
+
- tracker
|
422
|
+
- tracking
|
423
|
+
- training
|
424
|
+
- travel
|
425
|
+
- ts
|
426
|
+
- tv
|
427
|
+
- tw
|
428
|
+
- uk
|
429
|
+
- up
|
430
|
+
- update
|
431
|
+
- updates
|
432
|
+
- upgrade
|
433
|
+
- upgrades
|
434
|
+
- upi
|
435
|
+
- upload
|
436
|
+
- us
|
437
|
+
- user
|
438
|
+
- username
|
439
|
+
- usernames
|
440
|
+
- users
|
441
|
+
- v
|
442
|
+
- vc
|
443
|
+
- video
|
444
|
+
- videos
|
445
|
+
- vip
|
446
|
+
- vod
|
447
|
+
- voip
|
448
|
+
- volunteer
|
449
|
+
- volunteers
|
450
|
+
- vpn
|
451
|
+
- vps
|
452
|
+
- w
|
453
|
+
- w3
|
454
|
+
- wap
|
455
|
+
- web
|
456
|
+
- webconf
|
457
|
+
- webdisk
|
458
|
+
- webmail
|
459
|
+
- webmaster
|
460
|
+
- whm
|
461
|
+
- wifi
|
462
|
+
- wiki
|
463
|
+
- wordpress
|
464
|
+
- work
|
465
|
+
- wp
|
466
|
+
- ws
|
467
|
+
- ww
|
468
|
+
- ww1
|
469
|
+
- ww2
|
470
|
+
- ww3
|
471
|
+
- www
|
472
|
+
- www2
|
473
|
+
- xml
|
474
|
+
- xmpp
|
475
|
+
- yaml
|
@@ -0,0 +1,42 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "reserved_subdomains/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "reserved_subdomains"
|
8
|
+
spec.version = ReservedSubdomains::VERSION
|
9
|
+
spec.authors = ["Clayton Lengel-Zigich"]
|
10
|
+
spec.email = ["reserved_subdomains@me.claytonlz.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Custom Active Record validator for reserved subdomains.}
|
13
|
+
spec.description = %q{A custom Active Record validator that helps you prevent users from signing up for multi-tenant style systems with reserved subdomains like www, ftp, mail, stmp, etc.}
|
14
|
+
spec.homepage = "https://github.com/clayton/reserved_subdomains"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
21
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
22
|
+
spec.metadata["changelog_uri"] = spec.homepage
|
23
|
+
else
|
24
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
25
|
+
"public gem pushes."
|
26
|
+
end
|
27
|
+
|
28
|
+
# Specify which files should be added to the gem when it is released.
|
29
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
30
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
31
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
32
|
+
end
|
33
|
+
spec.bindir = "exe"
|
34
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
|
+
spec.require_paths = ["lib"]
|
36
|
+
|
37
|
+
spec.add_dependency "activemodel", "~> 6.0"
|
38
|
+
|
39
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
40
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
41
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
42
|
+
end
|
metadata
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: reserved_subdomains
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.9'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Clayton Lengel-Zigich
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-02-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activemodel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '6.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '6.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
description: A custom Active Record validator that helps you prevent users from signing
|
70
|
+
up for multi-tenant style systems with reserved subdomains like www, ftp, mail,
|
71
|
+
stmp, etc.
|
72
|
+
email:
|
73
|
+
- reserved_subdomains@me.claytonlz.com
|
74
|
+
executables: []
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- ".circleci/config.yml"
|
79
|
+
- ".github/workflows/gempush.yml"
|
80
|
+
- ".github/workflows/ruby.yml"
|
81
|
+
- ".gitignore"
|
82
|
+
- ".rspec"
|
83
|
+
- ".ruby-version"
|
84
|
+
- ".travis.yml"
|
85
|
+
- Gemfile
|
86
|
+
- Gemfile.lock
|
87
|
+
- LICENSE.txt
|
88
|
+
- README.md
|
89
|
+
- Rakefile
|
90
|
+
- bin/console
|
91
|
+
- bin/setup
|
92
|
+
- lib/regexp_list.yml
|
93
|
+
- lib/reserved_subdomains.rb
|
94
|
+
- lib/reserved_subdomains/version.rb
|
95
|
+
- lib/reserved_subdomains_list.yml
|
96
|
+
- reserved_subdomains.gemspec
|
97
|
+
homepage: https://github.com/clayton/reserved_subdomains
|
98
|
+
licenses:
|
99
|
+
- MIT
|
100
|
+
metadata:
|
101
|
+
homepage_uri: https://github.com/clayton/reserved_subdomains
|
102
|
+
source_code_uri: https://github.com/clayton/reserved_subdomains
|
103
|
+
changelog_uri: https://github.com/clayton/reserved_subdomains
|
104
|
+
post_install_message:
|
105
|
+
rdoc_options: []
|
106
|
+
require_paths:
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
requirements: []
|
119
|
+
rubygems_version: 3.0.3
|
120
|
+
signing_key:
|
121
|
+
specification_version: 4
|
122
|
+
summary: Custom Active Record validator for reserved subdomains.
|
123
|
+
test_files: []
|