dmoz_sax_doc 0.0.3 → 0.0.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.
- data/lib/dmoz_sax/path.rb +1 -1
- data/lib/dmoz_sax/time_parser.rb +2 -0
- data/lib/dmoz_sax/version.rb +1 -1
- data/spec/path_spec.rb +1 -1
- metadata +2 -2
data/lib/dmoz_sax/path.rb
CHANGED
@@ -11,7 +11,7 @@ module DmozSax
|
|
11
11
|
@name = resource.first if resource.length == 2
|
12
12
|
|
13
13
|
unless resource.empty?
|
14
|
-
@path = resource.last.split('/').reject {|a| a =~ /^[A-
|
14
|
+
@path = resource.last.split('/').reject {|a| a =~ /^[A-Z0-9]$/}
|
15
15
|
@path.shift if 'Top' == @path.first
|
16
16
|
else
|
17
17
|
@path = []
|
data/lib/dmoz_sax/time_parser.rb
CHANGED
data/lib/dmoz_sax/version.rb
CHANGED
data/spec/path_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe DmozSax::Path do
|
|
8
8
|
|
9
9
|
it "removes the 'Top' category and English index categories (e.g. 'a' to 'z')" do
|
10
10
|
|
11
|
-
('A'..'Z').each do |char|
|
11
|
+
(('A'..'Z').to_a + (0..9).to_a).each do |char|
|
12
12
|
path = DmozSax::Path.new("Top/This/Topic/#{ char }/Path")
|
13
13
|
path.to_a.should == ['This','Topic','Path']
|
14
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dmoz_sax_doc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|