swot-ruby 1.0.2.20230712 → 1.0.3.20230714

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c800d1ddc9bbf7114cad239cb882a2256c4d05dc4d5eba7b2b41f72480413c7
4
- data.tar.gz: 435b6ce509ca7330d905cbc9c0126a9e333e46be2ec02e7254ffb435d0ab2c50
3
+ metadata.gz: 7dcadcda0c10bdf7547304dd397227c237c9577eb0ddc2a3e25e8da78ab1c1be
4
+ data.tar.gz: a318673a538d8f16dc436eb4130ba5aacd4d2b0cc9ae6885c42e16862f001c3c
5
5
  SHA512:
6
- metadata.gz: 9c27f5832e05691b06d7100b21d23ea084d1203c3589bda31d062151fed93a6ed6a2d7b656d8efe8fffc8796cf6d242de7185279788a4b21af47389ac9a1af14
7
- data.tar.gz: 1f532a77e72b76a1f9c192071d46e65058bc42c528b38c5fc2ee5427e7286c3047532477227f945e134b4fb72599abe9c59939a8cda3a7895cabd20cc0db657a
6
+ metadata.gz: 4b8fb7e95674b5f11b450fa9f41952ab4aba2ac531b5b0abcdc258a06f5e11009c291acccfa43682d92320183fad8b67f711d1c420a465a8ea0d4b72e83f7447
7
+ data.tar.gz: e12d4c6b1ad813b2bd82b2ece1cabb7431bff88b88a0ddf7d04d7e0c5002912db049abcdf041fe9be94c4da062f6d4b139c27d67afac8d1b918c690aa0ff7ada
data/lib/swot.rb CHANGED
@@ -5,12 +5,12 @@ require_relative "swot/collection_methods"
5
5
 
6
6
  class Swot
7
7
 
8
- VERSION = "1.0.2"
8
+ VERSION = "1.0.3"
9
9
 
10
10
  # These are domains that snuck into the edu registry,
11
11
  # but don't pass the education sniff test
12
12
  # Note: validated domain must not end with the blacklisted string
13
- BLACKLIST = File.readlines(File.join(__dir__, '../data/lib/domains/stoplist.txt')).map(&:chomp).freeze
13
+ BLACKLIST = File.readlines(File.join(__dir__, '../academic_data/lib/domains/stoplist.txt')).map(&:chomp).freeze
14
14
 
15
15
  include NaughtyOrNice
16
16
  extend SwotCollectionMethods
@@ -24,7 +24,7 @@ class Swot
24
24
  alias_method :school_name, :get_institution_name
25
25
 
26
26
  def domains_path
27
- @domains_path ||= File.expand_path "../data/lib/domains", File.dirname(__FILE__)
27
+ @domains_path ||= File.expand_path "../academic_data/lib/domains", File.dirname(__FILE__)
28
28
  end
29
29
 
30
30
  # Returns a new Swot instance for the domain file at the given path.
data/release.sh CHANGED
@@ -1,14 +1,17 @@
1
1
  #!/bin/bash
2
2
  git pull
3
3
  git submodule update --init --recursive
4
-
4
+ rm -rf academic_data
5
+ cp -R data academic_data
6
+ rm -rf academic_data/.git
5
7
  current_date=$(date +%Y%m%d)
6
8
  file_path="swot.gemspec"
7
9
  sed -i '' -E "s/(s\.version = \"[0-9\.]+\.)[0-9]{8}/\1$current_date/g" $file_path
8
10
 
9
11
  version_number=$(grep -o -E "s\.version = \"[0-9\.]+$current_date\"" $file_path | grep -o -E "[0-9\.]+$current_date")
10
12
 
11
- git commit -am "Updated academic list - $current_date"
13
+ git add -A .
14
+ git commit -m "Updated academic list - $current_date"
12
15
  git push
13
16
  gem build swot.gemspec
14
17
 
data/swot.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  Gem::Specification.new do |s|
3
3
  s.name = "swot-ruby"
4
- s.version = "1.0.2.20230712"
4
+ s.version = "1.0.3.20230714"
5
5
 
6
6
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
7
7
  s.authors = ["Dave Kimura", "Lee Reilly"]
data/test/test_swot.rb CHANGED
@@ -20,6 +20,8 @@ describe Swot do
20
20
  assert Swot::is_academic?('dave@lsst.ac')
21
21
  assert Swot::is_academic?('dave@dcc.netpoint.com.bd')
22
22
  assert Swot::is_academic?('dave@student.gatewayhs.com')
23
+ assert Swot::is_academic?('dave@politecnics.barcelona')
24
+ assert Swot::is_academic?('me@nimsuniversity.org')
23
25
 
24
26
 
25
27
  assert_not Swot::is_academic?('support@driftingruby.com')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: swot-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2.20230712
4
+ version: 1.0.3.20230714
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Kimura