ryodo 0.2.2 → 0.2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.travis.yml +3 -7
- data/Gemfile +2 -12
- data/Gemfile.lock +25 -29
- data/{LICENSE.txt → LICENSE} +1 -1
- data/README.md +10 -10
- data/Rakefile +32 -14
- data/checks/matching.rb +2 -2
- data/data/suffix.dat +1944 -125
- data/lib/ryodo/convenience/utf8.rb +2 -2
- data/lib/ryodo/convenience.rb +2 -2
- data/lib/ryodo/domain.rb +2 -2
- data/lib/ryodo/ext/string.rb +1 -1
- data/lib/ryodo/ext/uri.rb +2 -2
- data/lib/ryodo/methods.rb +2 -2
- data/lib/ryodo/parser.rb +2 -2
- data/lib/ryodo/rule.rb +2 -2
- data/lib/ryodo/rule_set.rb +6 -12
- data/lib/ryodo/suffix_list.rb +2 -2
- data/lib/ryodo/suffix_list_fetcher.rb +2 -2
- data/lib/ryodo/version.rb +3 -0
- data/lib/ryodo.rb +5 -9
- data/ryodo.gemspec +23 -85
- data/spec/_files/mozilla_effective_tld_names.dat +2104 -272
- data/spec/ryodo/suffix_list_fetcher_spec.rb +3 -4
- data/spec/ryodo/suffix_list_spec.rb +2 -2
- data/spec/ryodo_spec.rb +2 -2
- data/spec/spec_helper.rb +4 -3
- metadata +35 -66
- data/.document +0 -5
- data/.rbenv-gemsets +0 -1
- data/.rbenv-version +0 -1
- data/.ruby-version +0 -1
- data/VERSION +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
2
|
require "ryodo/suffix_list_fetcher"
|
3
3
|
require File.expand_path("../../spec_helper.rb", __FILE__)
|
4
4
|
|
@@ -37,8 +37,7 @@ describe Ryodo::SuffixListFetcher do
|
|
37
37
|
it "#fetch_data retrieves remote data" do
|
38
38
|
fetcher.fetch_data
|
39
39
|
|
40
|
-
fetcher.instance_variable_get("@fetched_data").should
|
41
|
-
fetcher.instance_variable_get("@fetched_data").first.should =~ /BEGIN LICENSE BLOCK/
|
40
|
+
fetcher.instance_variable_get("@fetched_data").first.should =~ /This Source Code Form is subject to the terms of the Mozilla Public/
|
42
41
|
end
|
43
42
|
|
44
43
|
it "#save_data stores fetched data into file (as cleaned set)" do
|
@@ -78,4 +77,4 @@ describe Ryodo::SuffixListFetcher do
|
|
78
77
|
|
79
78
|
end
|
80
79
|
|
81
|
-
end
|
80
|
+
end
|
data/spec/ryodo_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
2
|
|
3
3
|
$:.push(File.expand_path("../../lib", __FILE__))
|
4
4
|
|
5
|
+
require "fileutils"
|
5
6
|
require "fakeweb"
|
6
7
|
require "uri"
|
7
8
|
require "ryodo"
|
@@ -20,9 +21,9 @@ RSpec::Matchers.define :include_hash do |expected|
|
|
20
21
|
end
|
21
22
|
|
22
23
|
RYODO_SPEC_ROOT = File.expand_path("..", __FILE__)
|
23
|
-
RYODO_TMP_ROOT = File.expand_path("../../tmp", __FILE__)
|
24
|
+
RYODO_TMP_ROOT = File.expand_path("../../tmp/spec", __FILE__)
|
24
25
|
|
25
|
-
|
26
|
+
FileUtils.mkdir_p RYODO_TMP_ROOT unless File.exists?(RYODO_TMP_ROOT)
|
26
27
|
|
27
28
|
FakeWeb.register_uri(:get,
|
28
29
|
Ryodo::PUBLIC_SUFFIX_DATA_URI,
|
metadata
CHANGED
@@ -1,149 +1,115 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ryodo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.4.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Christoph Grabo
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-09-21 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rake
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
30
13
|
- !ruby/object:Gem::Dependency
|
31
14
|
name: bundler
|
32
15
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
16
|
requirements:
|
35
|
-
- -
|
17
|
+
- - ~>
|
36
18
|
- !ruby/object:Gem::Version
|
37
|
-
version: '
|
19
|
+
version: '1.3'
|
38
20
|
type: :development
|
39
21
|
prerelease: false
|
40
22
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
23
|
requirements:
|
43
|
-
- -
|
24
|
+
- - ~>
|
44
25
|
- !ruby/object:Gem::Version
|
45
|
-
version: '
|
26
|
+
version: '1.3'
|
46
27
|
- !ruby/object:Gem::Dependency
|
47
|
-
name:
|
28
|
+
name: rake
|
48
29
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
30
|
requirements:
|
51
|
-
- -
|
31
|
+
- - '>='
|
52
32
|
- !ruby/object:Gem::Version
|
53
33
|
version: '0'
|
54
34
|
type: :development
|
55
35
|
prerelease: false
|
56
36
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
37
|
requirements:
|
59
|
-
- -
|
38
|
+
- - '>='
|
60
39
|
- !ruby/object:Gem::Version
|
61
40
|
version: '0'
|
62
41
|
- !ruby/object:Gem::Dependency
|
63
42
|
name: rspec
|
64
43
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
44
|
requirements:
|
67
|
-
- -
|
45
|
+
- - '>='
|
68
46
|
- !ruby/object:Gem::Version
|
69
47
|
version: '0'
|
70
48
|
type: :development
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
51
|
requirements:
|
75
|
-
- -
|
52
|
+
- - '>='
|
76
53
|
- !ruby/object:Gem::Version
|
77
54
|
version: '0'
|
78
55
|
- !ruby/object:Gem::Dependency
|
79
56
|
name: fakeweb
|
80
57
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
58
|
requirements:
|
83
|
-
- -
|
59
|
+
- - '>='
|
84
60
|
- !ruby/object:Gem::Version
|
85
61
|
version: '0'
|
86
62
|
type: :development
|
87
63
|
prerelease: false
|
88
64
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
65
|
requirements:
|
91
|
-
- -
|
66
|
+
- - '>='
|
92
67
|
- !ruby/object:Gem::Version
|
93
68
|
version: '0'
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: pry
|
96
71
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
72
|
requirements:
|
99
|
-
- -
|
73
|
+
- - '>='
|
100
74
|
- !ruby/object:Gem::Version
|
101
75
|
version: '0'
|
102
76
|
type: :development
|
103
77
|
prerelease: false
|
104
78
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
79
|
requirements:
|
107
|
-
- -
|
80
|
+
- - '>='
|
108
81
|
- !ruby/object:Gem::Version
|
109
82
|
version: '0'
|
110
83
|
- !ruby/object:Gem::Dependency
|
111
84
|
name: pry-doc
|
112
85
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
86
|
requirements:
|
115
|
-
- -
|
87
|
+
- - '>='
|
116
88
|
- !ruby/object:Gem::Version
|
117
89
|
version: '0'
|
118
90
|
type: :development
|
119
91
|
prerelease: false
|
120
92
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
93
|
requirements:
|
123
|
-
- -
|
94
|
+
- - '>='
|
124
95
|
- !ruby/object:Gem::Version
|
125
96
|
version: '0'
|
126
97
|
description: ryōdo【領土】 りょうど — A domain name parser gem using public suffix list (provided
|
127
98
|
by publicsuffix.org/mozilla)
|
128
|
-
email:
|
99
|
+
email:
|
100
|
+
- chris@dinarrr.com
|
129
101
|
executables: []
|
130
102
|
extensions: []
|
131
|
-
extra_rdoc_files:
|
132
|
-
- LICENSE.txt
|
133
|
-
- README.md
|
103
|
+
extra_rdoc_files: []
|
134
104
|
files:
|
135
|
-
- .
|
136
|
-
- .rbenv-gemsets
|
137
|
-
- .rbenv-version
|
105
|
+
- .gitignore
|
138
106
|
- .rspec
|
139
|
-
- .ruby-version
|
140
107
|
- .travis.yml
|
141
108
|
- Gemfile
|
142
109
|
- Gemfile.lock
|
143
|
-
- LICENSE
|
110
|
+
- LICENSE
|
144
111
|
- README.md
|
145
112
|
- Rakefile
|
146
|
-
- VERSION
|
147
113
|
- checks/matching.rb
|
148
114
|
- data/suffix.dat
|
149
115
|
- lib/ryodo.rb
|
@@ -158,6 +124,7 @@ files:
|
|
158
124
|
- lib/ryodo/rule_set.rb
|
159
125
|
- lib/ryodo/suffix_list.rb
|
160
126
|
- lib/ryodo/suffix_list_fetcher.rb
|
127
|
+
- lib/ryodo/version.rb
|
161
128
|
- ryodo.gemspec
|
162
129
|
- spec/_files/mozilla_effective_tld_names.dat
|
163
130
|
- spec/ryodo/suffix_list_fetcher_spec.rb
|
@@ -167,29 +134,31 @@ files:
|
|
167
134
|
homepage: http://github.com/asaaki/ryodo
|
168
135
|
licenses:
|
169
136
|
- MIT
|
137
|
+
metadata: {}
|
170
138
|
post_install_message:
|
171
139
|
rdoc_options: []
|
172
140
|
require_paths:
|
173
141
|
- lib
|
174
142
|
required_ruby_version: !ruby/object:Gem::Requirement
|
175
|
-
none: false
|
176
143
|
requirements:
|
177
|
-
- -
|
144
|
+
- - '>='
|
178
145
|
- !ruby/object:Gem::Version
|
179
146
|
version: '0'
|
180
|
-
segments:
|
181
|
-
- 0
|
182
|
-
hash: -174586125708232789
|
183
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
|
-
none: false
|
185
148
|
requirements:
|
186
|
-
- -
|
149
|
+
- - '>='
|
187
150
|
- !ruby/object:Gem::Version
|
188
151
|
version: '0'
|
189
152
|
requirements: []
|
190
153
|
rubyforge_project:
|
191
|
-
rubygems_version:
|
154
|
+
rubygems_version: 2.0.3
|
192
155
|
signing_key:
|
193
|
-
specification_version:
|
156
|
+
specification_version: 4
|
194
157
|
summary: ryōdo【領土】 りょうど — A domain name parser using public suffix list
|
195
|
-
test_files:
|
158
|
+
test_files:
|
159
|
+
- spec/_files/mozilla_effective_tld_names.dat
|
160
|
+
- spec/ryodo/suffix_list_fetcher_spec.rb
|
161
|
+
- spec/ryodo/suffix_list_spec.rb
|
162
|
+
- spec/ryodo_spec.rb
|
163
|
+
- spec/spec_helper.rb
|
164
|
+
has_rdoc:
|
data/.document
DELETED
data/.rbenv-gemsets
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ryodo
|
data/.rbenv-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.9.3-p194
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ruby-1.9.3@ryodo
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.2.2
|