utopia 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/utopia/link.rb +1 -1
- data/lib/utopia/middleware/content/processor.rb +10 -5
- data/lib/utopia/path.rb +1 -1
- data/lib/utopia/version.rb +1 -1
- metadata +2 -8
data/lib/utopia/link.rb
CHANGED
@@ -150,7 +150,7 @@ module Utopia
|
|
150
150
|
:locale => nil
|
151
151
|
}
|
152
152
|
|
153
|
-
def self.index(root, top, options = {})
|
153
|
+
def self.index(root, top = Path.new, options = {})
|
154
154
|
options = DEFAULT_OPTIONS.merge(options)
|
155
155
|
path = File.join(root, top.components)
|
156
156
|
metadata = Links.metadata(path)
|
@@ -38,14 +38,19 @@ module Utopia
|
|
38
38
|
@start_position = start_position
|
39
39
|
@current_tag = current_tag
|
40
40
|
@closing_tag = closing_tag
|
41
|
-
|
42
|
-
@starting_line = @scanner.
|
43
|
-
@ending_line = @scanner.
|
41
|
+
|
42
|
+
@starting_line = Trenni::Parser.line_at_offset(@scanner.string, @start_position)
|
43
|
+
@ending_line = Trenni::Parser.line_at_offset(@scanner.string, @scanner.pos)
|
44
44
|
end
|
45
45
|
|
46
|
+
attr :scanner
|
47
|
+
attr :start_position
|
48
|
+
attr :current_tag
|
49
|
+
attr :closing_tag
|
50
|
+
|
46
51
|
def to_s
|
47
|
-
"Unbalanced Tag
|
48
|
-
"Line #{@starting_line[
|
52
|
+
"Unbalanced Tag Error. " \
|
53
|
+
"Line #{@starting_line[:line_number]}: #{@current_tag} has been closed by #{@closing_tag} on line #{@ending_line[:line_number]}!"
|
49
54
|
end
|
50
55
|
end
|
51
56
|
|
data/lib/utopia/path.rb
CHANGED
data/lib/utopia/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
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:
|
12
|
+
date: 2013-02-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: trenni
|
@@ -176,18 +176,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
176
176
|
- - ! '>='
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
|
-
segments:
|
180
|
-
- 0
|
181
|
-
hash: 312881169205834825
|
182
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
180
|
none: false
|
184
181
|
requirements:
|
185
182
|
- - ! '>='
|
186
183
|
- !ruby/object:Gem::Version
|
187
184
|
version: '0'
|
188
|
-
segments:
|
189
|
-
- 0
|
190
|
-
hash: 312881169205834825
|
191
185
|
requirements: []
|
192
186
|
rubyforge_project:
|
193
187
|
rubygems_version: 1.8.24
|