rubyul 0.5.2 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ignorable_regexes.json +63 -0
- data/lib/platform_regexes.json +3 -1
- data/lib/rubyul/version.rb +1 -1
- data/lib/rubyul.rb +8 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01350b9f4cc54759ff66895cc360233df479f5a6
|
4
|
+
data.tar.gz: 99752600fc4066a7e9ad0a381978d832b383226d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
+
]
|
data/lib/platform_regexes.json
CHANGED
@@ -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
|
}
|
data/lib/rubyul/version.rb
CHANGED
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
|
-
|
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.
|
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-
|
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
|