rubyul 0.5.2 → 0.5.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 796ed1cea3ca42c4048e9fd0352636f45c6f0699
4
- data.tar.gz: 4a7a844e9e05a0fe632c5e13f5b3ee0f7bb36158
3
+ metadata.gz: 01350b9f4cc54759ff66895cc360233df479f5a6
4
+ data.tar.gz: 99752600fc4066a7e9ad0a381978d832b383226d
5
5
  SHA512:
6
- metadata.gz: 43fd90eae49fc30eb51e62658432f948654ee0586f3aa40860f4c3ceaeb4c4cede4291cb7964d3825ed18ab0854189e14cb13ae66091522d46047496d74968bc
7
- data.tar.gz: 29d68789ae8c6704166a6b1142ad55513b07ba74d23ef8bce79fbdaeac60f0413c06c605ab783b6b240e40d711cbad4f31cdc784c6d7525b834672497d4ecccc
6
+ metadata.gz: d68c278ab547af426b950e3e1371d145e9b8374e2a38ad359ca72bd75cbbfd5d11b11a2cd2be27975dc5a1e74cdf14a1b45895771d079b9f710c611493e57ea9
7
+ data.tar.gz: 2719c9f4a3caf403ad3b9470ef54de7ac10f0439fe35a7c24ce8a4e1324c0089389031c88b0ace0c06f08ca4aad0fcfdd7e64fcd42f1dca8b49303c78370c00c
@@ -0,0 +1,63 @@
1
+ [
2
+ "ratingwidget.services.bmj.com",
3
+ "phpadsnew",
4
+ "oas.*",
5
+ "^ads\\.",
6
+ "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}",
7
+ "google.c(a|om)$",
8
+ "google.com\\.\\w*$",
9
+ "youtube.com",
10
+ "google.co.il$",
11
+ "google.co.in$",
12
+ "google.co.jp$",
13
+ "^google.*edu$",
14
+ "^google.*ac\\.uk$",
15
+ "aof.revues.org",
16
+ ".*mdpi.com",
17
+ "\\.plos.org$",
18
+ "plosone.org$",
19
+ "plosgenetics.org$",
20
+ "ploscompbiol.org$",
21
+ "plosntds.org$",
22
+ "plosjournals.org$",
23
+ "plospathogens.org$",
24
+ "oops.theoptia.com$",
25
+ "oops.uwaterloo.ca$",
26
+ "rdatoolkit.org",
27
+ "doaj.org",
28
+ "thecanadianencyclopedia.com",
29
+ "hathitrust.org",
30
+ "hindawi.com",
31
+ "jbioleng.org",
32
+ "\\.ispub.com$",
33
+ "jneuroengrehab.com",
34
+ "nureinvestigacion.es",
35
+ "scoliosisjournal.com",
36
+ "biomedcentral.com$",
37
+ "\\.smw.ch$",
38
+ "uir.unisa.ac.za",
39
+ "adsabs.harvard.edu",
40
+ "adswww.harvard.edu",
41
+ "plato.stanford.edu$",
42
+ "19thc-artworldwide.org$",
43
+ "statistiques.cleo.cnrs.fr$",
44
+ "sabinet.co.za$",
45
+ "omicsonline.(com|org)$",
46
+ "bnf.fr$",
47
+ "arctic.ucalgary.ca",
48
+ "eurosurveillance.org",
49
+ "imf.org$",
50
+ "genderwork.ca",
51
+ "rrh.org.au",
52
+ "behavioralandbrainfunctions.com",
53
+ "globalizationandhealth.com",
54
+ "dash.harvard.edu",
55
+ "kcsnet.or.kr",
56
+ "wormbase.org$",
57
+ "oregonpdf.org",
58
+ "www.nctr.usf.edu",
59
+ "scholarcommons.usf.edu",
60
+ "journals.lib.unb.ca",
61
+ "www.cfa.harvard.edu",
62
+ "frontiersin.org$"
63
+ ]
@@ -511,5 +511,7 @@
511
511
  "www.jphysiol.org$" : "Wiley",
512
512
  "www.literatureencyclopedia.com$" : "Wiley-Blackwell Encyc Literature",
513
513
  "wrds.*wharton.upenn.edu$" : "Wharton Research Data Serv",
514
- "worldscientific.com" : "World Scientific"
514
+ "worldscientific.com" : "World Scientific",
515
+ "www.library.yorku.ca" : "YUL",
516
+ "researchguides.library.yorku.ca" : "YUL: Research guides"
515
517
  }
@@ -1,3 +1,3 @@
1
1
  module Rubyul
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.4"
3
3
  end
data/lib/rubyul.rb CHANGED
@@ -13,8 +13,15 @@ module Rubyul
13
13
  PLATFORM_REGEXES = JSON.parse(File.read(File.dirname(__FILE__) +
14
14
  "/platform_regexes.json"))
15
15
 
16
- def self.hostname_to_platform(hostname)
16
+ IGNORABLE_REGEXES = JSON.parse(File.read(File.dirname(__FILE__) +
17
+ "/ignorable_regexes.json"))
18
+ $ignorable_pattern_match = Regexp.new(IGNORABLE_REGEXES.join("|"))
19
+
20
+ def self.hostname_to_platform(hostname, ignore: FALSE)
17
21
  # TODO: Deal with ignores or not, with an option.
22
+ if ignore == TRUE
23
+ return "ignore" if $ignorable_pattern_match =~ hostname
24
+ end
18
25
  PLATFORM_REGEXES.each do |regexp, platform_name|
19
26
  return platform_name if Regexp.new(regexp) =~ hostname
20
27
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Denton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-17 00:00:00.000000000 Z
11
+ date: 2017-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,6 +66,7 @@ files:
66
66
  - Rakefile
67
67
  - bin/console
68
68
  - bin/setup
69
+ - lib/ignorable_regexes.json
69
70
  - lib/platform_regexes.json
70
71
  - lib/rubyul.rb
71
72
  - lib/rubyul/version.rb