Skip to content

Commit

Permalink
move the academic TLDs into their own file
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld committed Jun 19, 2014
1 parent 3220fd8 commit 292c4af
Show file tree
Hide file tree
Showing 2 changed files with 125 additions and 122 deletions.
124 changes: 2 additions & 122 deletions lib/swot.rb
Original file line number Diff line number Diff line change
@@ -1,129 +1,9 @@
require 'public_suffix'
require 'set'
require "public_suffix"
require File.join(File.dirname(__FILE__), "swot", "academic_tlds.rb")

module Swot
VERSION = "0.3.0"

# These top-level domains are guaranteed to be academic institutions.
ACADEMIC_TLDS = %w(
ac.ae
ac.at
ac.bd
ac.be
ac.cr
ac.cy
ac.fj
ac.id
ac.il
ac.ir
ac.jp
ac.ke
ac.kr
ac.ma
ac.mu
ac.mw
ac.mz
ac.nz
ac.pa
ac.pg
ac.rs
ac.ru
ac.rw
ac.th
ac.tz
ac.ug
ac.uk
ac.yu
ac.za
ac.zm
ac.zw
edu
edu.af
edu.al
edu.ar
edu.au
edu.az
edu.ba
edu.bb
edu.bd
edu.bh
edu.bi
edu.bn
edu.bo
edu.br
edu.bs
edu.bt
edu.bz
edu.co
edu.cu
edu.do
edu.dz
edu.ec
edu.ee
edu.eg
edu.er
edu.es
edu.et
edu.ge
edu.gh
edu.gr
edu.gt
edu.hk
edu.hn
edu.ht
edu.iq
edu.jm
edu.jo
edu.kg
edu.kh
edu.kn
edu.kw
edu.ky
edu.kz
edu.la
edu.lb
edu.lv
edu.ly
edu.mk
edu.mm
edu.mn
edu.mo
edu.mt
edu.mx
edu.my
edu.ni
edu.np
edu.om
edu.pa
edu.pe
edu.ph
edu.pk
edu.pl
edu.pr
edu.ps
edu.pt
edu.py
edu.qa
edu.rs
edu.ru
edu.sa
edu.sd
edu.sg
edu.sv
edu.sy
edu.tr
edu.tt
edu.tw
edu.ua
edu.uy
edu.ve
edu.vn
edu.ws
edu.ye
edu.zm
vic.edu.au
).to_set.freeze

# These are domains that snuck into the edu registry,
# but don't pass the education sniff test
# Note: validated domain must not end with the blacklisted string
Expand Down
123 changes: 123 additions & 0 deletions lib/swot/academic_tlds.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
require 'set'

module Swot
# These top-level domains are guaranteed to be academic institutions.
ACADEMIC_TLDS = %w(
ac.ae
ac.at
ac.bd
ac.be
ac.cr
ac.cy
ac.fj
ac.id
ac.il
ac.ir
ac.jp
ac.ke
ac.kr
ac.ma
ac.mu
ac.mw
ac.mz
ac.nz
ac.pa
ac.pg
ac.rs
ac.ru
ac.rw
ac.th
ac.tz
ac.ug
ac.uk
ac.yu
ac.za
ac.zm
ac.zw
edu
edu.af
edu.al
edu.ar
edu.au
edu.az
edu.ba
edu.bb
edu.bd
edu.bh
edu.bi
edu.bn
edu.bo
edu.br
edu.bs
edu.bt
edu.bz
edu.co
edu.cu
edu.do
edu.dz
edu.ec
edu.ee
edu.eg
edu.er
edu.es
edu.et
edu.ge
edu.gh
edu.gr
edu.gt
edu.hk
edu.hn
edu.ht
edu.iq
edu.jm
edu.jo
edu.kg
edu.kh
edu.kn
edu.kw
edu.ky
edu.kz
edu.la
edu.lb
edu.lv
edu.ly
edu.mk
edu.mm
edu.mn
edu.mo
edu.mt
edu.mx
edu.my
edu.ni
edu.np
edu.om
edu.pa
edu.pe
edu.ph
edu.pk
edu.pl
edu.pr
edu.ps
edu.pt
edu.py
edu.qa
edu.rs
edu.ru
edu.sa
edu.sd
edu.sg
edu.sv
edu.sy
edu.tr
edu.tt
edu.tw
edu.ua
edu.uy
edu.ve
edu.vn
edu.ws
edu.ye
edu.zm
vic.edu.au
).to_set.freeze
end

0 comments on commit 292c4af

Please sign in to comment.