From 38083e98233e0927c9a6b7c0c5811dc3f250840d Mon Sep 17 00:00:00 2001 From: Pascal Borreli Date: Mon, 18 Mar 2013 01:09:50 +0000 Subject: [PATCH 1/2] Fixed typos --- lib/domains/ls/nul | 1 - lib/swot.rb | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 lib/domains/ls/nul diff --git a/lib/domains/ls/nul b/lib/domains/ls/nul deleted file mode 100644 index ecd6207511..0000000000 --- a/lib/domains/ls/nul +++ /dev/null @@ -1 +0,0 @@ -National University of Lesotho diff --git a/lib/swot.rb b/lib/swot.rb index dee1355225..04919e4140 100644 --- a/lib/swot.rb +++ b/lib/swot.rb @@ -3,7 +3,7 @@ require 'public_suffix' module Swot VERSION = "0.1.0" - # These top-level domains are guaranteed to be academic instituions. + # These top-level domains are guaranteed to be academic institutions. ACADEMIC_TLDS = [ 'ac.ae', 'ac.at', @@ -126,10 +126,10 @@ module Swot class << self - # Figure out if an email or domain belongs to academic instituion. + # Figure out if an email or domain belongs to academic institution. # # Returns true if the domain name belongs to an academic institution; - # false oterwise. + # false otherwise. def is_academic?(text) return false if text.nil? text.strip! @@ -155,7 +155,7 @@ module Swot # Figure out the institution name based on the email address/domain. # - # Returns a string with the instution name; nil if nothing is found. + # Returns a string with the institution name; nil if nothing is found. def get_institution_name(text) text.strip! text.downcase! @@ -166,13 +166,13 @@ module Swot # Figure out if a domain name is a know academic institution. # - # Returns true if the domain name belongs to a known academic instition; + # Returns true if the domain name belongs to a known academic institution; # false otherwise. def match_academic_domain?(domain) File.exists?("#{File.expand_path(__FILE__+'/..')}/domains/#{domain.tld}/#{domain.sld}") end - # Figure out the insitutions' name based on the domain name. + # Figure out the institutions' name based on the domain name. # # Return the institution name, or nil if not found. def name_from_academic_domain(domain) From 5dce492f9abfe71505264459f85cf948b3cb8492 Mon Sep 17 00:00:00 2001 From: Pascal Borreli Date: Mon, 18 Mar 2013 02:25:47 +0000 Subject: [PATCH 2/2] Create nul --- lib/domains/ls/nul | 1 + 1 file changed, 1 insertion(+) create mode 100644 lib/domains/ls/nul diff --git a/lib/domains/ls/nul b/lib/domains/ls/nul new file mode 100644 index 0000000000..ecd6207511 --- /dev/null +++ b/lib/domains/ls/nul @@ -0,0 +1 @@ +National University of Lesotho