utopia 2.4.1 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/utopia/content/document.rb +3 -1
- data/lib/utopia/content/node.rb +1 -1
- data/lib/utopia/exceptions/mailer.rb +1 -1
- data/lib/utopia/version.rb +1 -1
- data/spec/utopia/content/node/lookup/content.xnode +1 -0
- data/spec/utopia/content/node/lookup/index.xnode +1 -0
- data/spec/utopia/content/node_spec.rb +6 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37d97837ade8d210c7f13ac156ca9a1bdbc8f1f3f9eb9ef195dcc688b6ea933c
|
4
|
+
data.tar.gz: 6d3bb1d8a49183df2b3decdba70d8d42d996f1868fb44e4a184ca413f799760a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93a81c8a0cf74142599575da2421eeb8e62ec0190de34c470451e44381855f304b2ba3390142ae41a98da80125c5a78623fd6dc75d2d2d2430c8114eea54b05e
|
7
|
+
data.tar.gz: 34ee51883e8abfbee0bb6be8fddaebeb358c644ba6e264d7f86aa4a95f0baad4bc3cd5d2e1408d3b285fc58df8812168b8e7bf3312c30311ab7dac85ea063d4d
|
@@ -208,7 +208,9 @@ module Utopia
|
|
208
208
|
# Lookup a node with the given path relative to the current node.
|
209
209
|
# @return [Node] The node if could be found.
|
210
210
|
def lookup_node(path)
|
211
|
-
@
|
211
|
+
@end_tags.reverse_each do |state|
|
212
|
+
return state.node.lookup_node(path) if state.node.respond_to?(:lookup_node)
|
213
|
+
end
|
212
214
|
end
|
213
215
|
|
214
216
|
# The content of the node
|
data/lib/utopia/content/node.rb
CHANGED
@@ -32,7 +32,7 @@ module Utopia
|
|
32
32
|
:enable_starttls_auto => false
|
33
33
|
}]
|
34
34
|
|
35
|
-
DEFAULT_FROM = (ENV['USER'] || '
|
35
|
+
DEFAULT_FROM = (ENV['USER'] || 'utopia').freeze
|
36
36
|
DEFAULT_SUBJECT = '%{exception} [PID %{pid} : %{cwd}]'.freeze
|
37
37
|
|
38
38
|
# @param to [String] The address to email error reports to.
|
data/lib/utopia/version.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
<p>Hello World</p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<utopia:node path="content"/>
|
@@ -57,5 +57,11 @@ module Utopia::ContentSpec
|
|
57
57
|
expect(links[1].name).to be == 'foo'
|
58
58
|
expect(links[1].locale).to be == 'ja'
|
59
59
|
end
|
60
|
+
|
61
|
+
it "should look up node by path" do
|
62
|
+
node = content.lookup_node(Utopia::Path['/lookup/index'])
|
63
|
+
|
64
|
+
expect(node.process!(nil)).to be == [200, {"Content-Type"=>"text/html; charset=utf-8"}, ["<p>Hello World</p>"]]
|
65
|
+
end
|
60
66
|
end
|
61
67
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: trenni
|
@@ -634,6 +634,8 @@ files:
|
|
634
634
|
- spec/utopia/content/localized/two.zh.xnode
|
635
635
|
- spec/utopia/content/markup_spec.rb
|
636
636
|
- spec/utopia/content/namespace_spec.rb
|
637
|
+
- spec/utopia/content/node/lookup/content.xnode
|
638
|
+
- spec/utopia/content/node/lookup/index.xnode
|
637
639
|
- spec/utopia/content/node/ordered/first.xnode
|
638
640
|
- spec/utopia/content/node/ordered/index.xnode
|
639
641
|
- spec/utopia/content/node/ordered/links.yaml
|
@@ -760,6 +762,8 @@ test_files:
|
|
760
762
|
- spec/utopia/content/localized/two.zh.xnode
|
761
763
|
- spec/utopia/content/markup_spec.rb
|
762
764
|
- spec/utopia/content/namespace_spec.rb
|
765
|
+
- spec/utopia/content/node/lookup/content.xnode
|
766
|
+
- spec/utopia/content/node/lookup/index.xnode
|
763
767
|
- spec/utopia/content/node/ordered/first.xnode
|
764
768
|
- spec/utopia/content/node/ordered/index.xnode
|
765
769
|
- spec/utopia/content/node/ordered/links.yaml
|