utopia 0.12.6 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -2
- data/Gemfile +6 -0
- data/README.md +48 -14
- data/Rakefile +5 -0
- data/bin/utopia +132 -15
- data/lib/utopia.rb +13 -10
- data/lib/utopia/content.rb +140 -0
- data/lib/utopia/content/link.rb +124 -0
- data/lib/utopia/content/links.rb +228 -0
- data/lib/utopia/content/node.rb +387 -0
- data/lib/utopia/content/processor.rb +128 -0
- data/lib/utopia/content/tag.rb +102 -0
- data/lib/utopia/controller.rb +137 -0
- data/lib/utopia/controller/action.rb +112 -0
- data/lib/utopia/controller/base.rb +174 -0
- data/lib/utopia/{middleware/controller → controller}/variables.rb +36 -38
- data/lib/utopia/exception_handler.rb +79 -0
- data/lib/utopia/extensions/array.rb +2 -2
- data/lib/utopia/localization.rb +143 -0
- data/lib/utopia/mail_exceptions.rb +136 -0
- data/lib/utopia/middleware.rb +7 -22
- data/lib/utopia/path.rb +150 -60
- data/lib/utopia/redirector.rb +152 -0
- data/lib/utopia/{extensions/hash.rb → session.rb} +4 -6
- data/lib/utopia/session/encrypted_cookie.rb +46 -48
- data/lib/utopia/{middleware/directory_index.rb → session/lazy_hash.rb} +44 -27
- data/lib/utopia/static.rb +255 -0
- data/lib/utopia/tags/deferred.rb +12 -8
- data/lib/utopia/tags/environment.rb +18 -6
- data/lib/utopia/tags/node.rb +12 -8
- data/lib/utopia/tags/override.rb +12 -12
- data/lib/utopia/version.rb +1 -1
- data/setup/.bowerrc +3 -0
- data/{lib/utopia/setup → setup}/Gemfile +1 -1
- data/setup/Rakefile +4 -0
- data/{lib/utopia/setup → setup}/cache/head/readme.txt +0 -0
- data/{lib/utopia/setup → setup}/cache/meta/readme.txt +0 -0
- data/setup/config.ru +64 -0
- data/{lib/utopia/setup → setup}/lib/readme.txt +0 -0
- data/{lib/utopia/setup → setup}/pages/_heading.xnode +0 -0
- data/{lib/utopia/setup → setup}/pages/_page.xnode +1 -1
- data/{lib/utopia/setup → setup}/pages/_static/icon.png +0 -0
- data/setup/pages/_static/site.css +70 -0
- data/{lib/utopia/setup → setup}/pages/errors/exception.xnode +0 -0
- data/{lib/utopia/setup → setup}/pages/errors/file-not-found.xnode +0 -0
- data/{lib/utopia/setup → setup}/pages/links.yaml +0 -0
- data/setup/pages/welcome/index.xnode +17 -0
- data/{lib/utopia/setup → setup}/public/readme.txt +0 -0
- data/spec/utopia/content/link_spec.rb +108 -0
- data/spec/utopia/content/links/foo/index.xnode +0 -0
- data/spec/utopia/content/links/foo/links.yaml +2 -0
- data/spec/utopia/content/links/foo/test.de.xnode +0 -0
- data/spec/utopia/content/links/foo/test.en.xnode +0 -0
- data/spec/utopia/content/links/links.yaml +9 -0
- data/spec/utopia/content/links/welcome.xnode +0 -0
- data/spec/utopia/content/localized/five/index.en.xnode +0 -0
- data/spec/utopia/content/localized/four/index.en.xnode +0 -0
- data/spec/utopia/content/localized/four/index.zh.xnode +0 -0
- data/spec/utopia/content/localized/four/links.yaml +4 -0
- data/spec/utopia/content/localized/links.yaml +16 -0
- data/spec/utopia/content/localized/one.xnode +0 -0
- data/spec/utopia/content/localized/three/index.xnode +0 -0
- data/spec/utopia/content/localized/two.en.xnode +0 -0
- data/spec/utopia/content/localized/two.zh.xnode +0 -0
- data/spec/utopia/content/node/ordered/first.xnode +0 -0
- data/spec/utopia/content/node/ordered/index.xnode +0 -0
- data/spec/utopia/content/node/ordered/links.yaml +4 -0
- data/spec/utopia/content/node/ordered/second.xnode +0 -0
- data/spec/utopia/content/node/related/foo.en.xnode +0 -0
- data/spec/utopia/content/node/related/foo.ja.xnode +0 -0
- data/spec/utopia/content/node/related/links.yaml +4 -0
- data/spec/utopia/content/node_spec.rb +63 -0
- data/spec/utopia/{middleware/content_spec.rb → content/processor_spec.rb} +34 -23
- data/spec/utopia/content_spec.rb +87 -0
- data/spec/utopia/content_spec.ru +10 -0
- data/spec/utopia/{middleware/controller_spec.rb → controller_spec.rb} +61 -16
- data/spec/utopia/controller_spec.ru +4 -0
- data/spec/utopia/extensions_spec.rb +6 -17
- data/spec/utopia/localization_spec.rb +60 -0
- data/spec/utopia/localization_spec.ru +11 -0
- data/{lib/utopia/tags.rb → spec/utopia/middleware_spec.rb} +8 -14
- data/spec/utopia/{middleware/content_root → pages}/_heading.xnode +0 -0
- data/spec/utopia/pages/content/_show-value.xnode +1 -0
- data/spec/utopia/pages/content/test-partial.xnode +1 -0
- data/spec/utopia/pages/controller/controller.rb +28 -0
- data/spec/utopia/pages/controller/index.xnode +1 -0
- data/spec/utopia/pages/controller/nested/controller.rb +4 -0
- data/spec/utopia/{middleware/content_root → pages}/index.xnode +0 -0
- data/spec/utopia/pages/localized.de.txt +1 -0
- data/spec/utopia/pages/localized.en.txt +1 -0
- data/spec/utopia/pages/localized.jp.txt +1 -0
- data/spec/utopia/pages/node/index.xnode +1 -0
- data/spec/utopia/pages/test.txt +1 -0
- data/spec/utopia/path_spec.rb +109 -0
- data/spec/utopia/rack_spec.rb +2 -0
- data/spec/utopia/session_spec.rb +82 -0
- data/spec/utopia/session_spec.ru +20 -0
- data/spec/utopia/spec_helper.rb +16 -0
- data/{lib/utopia/extensions/string.rb → spec/utopia/static_spec.rb} +24 -15
- data/spec/utopia/static_spec.ru +4 -0
- data/utopia.gemspec +3 -3
- metadata +138 -54
- data/lib/utopia/extensions/regexp.rb +0 -33
- data/lib/utopia/link.rb +0 -288
- data/lib/utopia/middleware/all.rb +0 -33
- data/lib/utopia/middleware/content.rb +0 -157
- data/lib/utopia/middleware/content/node.rb +0 -386
- data/lib/utopia/middleware/content/processor.rb +0 -123
- data/lib/utopia/middleware/controller.rb +0 -130
- data/lib/utopia/middleware/controller/action.rb +0 -121
- data/lib/utopia/middleware/controller/base.rb +0 -184
- data/lib/utopia/middleware/exception_handler.rb +0 -80
- data/lib/utopia/middleware/localization.rb +0 -147
- data/lib/utopia/middleware/localization/name.rb +0 -69
- data/lib/utopia/middleware/mail_exceptions.rb +0 -138
- data/lib/utopia/middleware/redirector.rb +0 -146
- data/lib/utopia/middleware/requester.rb +0 -126
- data/lib/utopia/middleware/static.rb +0 -295
- data/lib/utopia/setup.rb +0 -60
- data/lib/utopia/setup/config.ru +0 -47
- data/lib/utopia/setup/pages/_static/background.png +0 -0
- data/lib/utopia/setup/pages/_static/site.css +0 -48
- data/lib/utopia/setup/pages/welcome/index.xnode +0 -7
- data/lib/utopia/tag.rb +0 -105
- data/lib/utopia/tags/all.rb +0 -34
data/lib/utopia/tags/deferred.rb
CHANGED
@@ -18,12 +18,16 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
# THE SOFTWARE.
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
module Utopia
|
22
|
+
module Tags
|
23
|
+
class Deferred
|
24
|
+
def self.call(transaction, state)
|
25
|
+
id = state[:id].to_i
|
26
|
+
|
27
|
+
procedure = transaction.parent.deferred[id]
|
28
|
+
|
29
|
+
procedure.call(transaction, state)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
29
33
|
end
|
@@ -18,12 +18,24 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
# THE SOFTWARE.
|
20
20
|
|
21
|
-
|
21
|
+
module Utopia
|
22
|
+
module Tags
|
23
|
+
class Environment
|
24
|
+
def self.for(environment)
|
25
|
+
self.new(environment)
|
26
|
+
end
|
27
|
+
|
28
|
+
def initialize(environment)
|
29
|
+
@environment = environment
|
30
|
+
end
|
31
|
+
|
32
|
+
def call(transaction, state)
|
33
|
+
only = state[:only].split(",").collect(&:to_sym) rescue []
|
22
34
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
35
|
+
if defined?(@environment) and only.include?(@environment)
|
36
|
+
transaction.parse_xml(state.content)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
28
40
|
end
|
29
41
|
end
|
data/lib/utopia/tags/node.rb
CHANGED
@@ -18,12 +18,16 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
# THE SOFTWARE.
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
module Utopia
|
22
|
+
module Tags
|
23
|
+
class Node
|
24
|
+
def self.call(transaction, state)
|
25
|
+
path = Utopia::Path.create(state[:path])
|
26
|
+
|
27
|
+
node = transaction.lookup_node(path)
|
28
|
+
|
29
|
+
transaction.render_node(node)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
29
33
|
end
|
data/lib/utopia/tags/override.rb
CHANGED
@@ -18,16 +18,16 @@
|
|
18
18
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
19
|
# THE SOFTWARE.
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
class
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
21
|
+
module Utopia
|
22
|
+
module Tags
|
23
|
+
class Override
|
24
|
+
def self.tag_begin(transaction, state)
|
25
|
+
state.overrides[state[:name]] = state[:with]
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.call(transaction, state)
|
29
|
+
transaction.parse_xml(state.content)
|
30
|
+
end
|
31
|
+
end
|
30
32
|
end
|
31
|
-
end
|
32
|
-
|
33
|
-
Utopia::Tags.register("override", Utopia::Tags::Override)
|
33
|
+
end
|
data/lib/utopia/version.rb
CHANGED
data/setup/.bowerrc
ADDED
data/setup/Rakefile
ADDED
File without changes
|
File without changes
|
data/setup/config.ru
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
#!/usr/bin/env rackup
|
2
|
+
|
3
|
+
# Setup default encoding:
|
4
|
+
Encoding.default_external = Encoding::UTF_8
|
5
|
+
Encoding.default_internal = Encoding::UTF_8
|
6
|
+
|
7
|
+
# Setup the server environment:
|
8
|
+
RACK_ENV = ENV.fetch('RACK_ENV', :development).to_sym unless defined?(RACK_ENV)
|
9
|
+
|
10
|
+
# Allow loading library code from lib directory:
|
11
|
+
$LOAD_PATH << File.expand_path("../lib", __FILE__)
|
12
|
+
|
13
|
+
require 'utopia'
|
14
|
+
require 'rack/cache'
|
15
|
+
|
16
|
+
if RACK_ENV == :production
|
17
|
+
use Utopia::ExceptionHandler, "/errors/exception"
|
18
|
+
use Utopia::MailExceptions
|
19
|
+
else
|
20
|
+
use Rack::ShowExceptions
|
21
|
+
end
|
22
|
+
|
23
|
+
use Rack::Sendfile
|
24
|
+
|
25
|
+
if RACK_ENV == :production
|
26
|
+
use Rack::Cache,
|
27
|
+
metastore: "file:#{Utopia::default_root("cache/meta")}",
|
28
|
+
entitystore: "file:#{Utopia::default_root("cache/body")}",
|
29
|
+
verbose: RACK_ENV == :development
|
30
|
+
end
|
31
|
+
|
32
|
+
use Rack::ContentLength
|
33
|
+
|
34
|
+
use Utopia::Redirector,
|
35
|
+
patterns: [
|
36
|
+
Utopia::Redirector::DIRECTORY_INDEX
|
37
|
+
],
|
38
|
+
strings: {
|
39
|
+
'/' => '/welcome/index',
|
40
|
+
},
|
41
|
+
errors: {
|
42
|
+
404 => "/errors/file-not-found"
|
43
|
+
}
|
44
|
+
|
45
|
+
use Utopia::Localization,
|
46
|
+
:default_locale => 'en',
|
47
|
+
:locales => ['en', 'de', 'ja', 'zh'],
|
48
|
+
:nonlocalized => ['/_static/', '/_cache/']
|
49
|
+
|
50
|
+
use Utopia::Controller,
|
51
|
+
cache_controllers: (RACK_ENV == :production)
|
52
|
+
|
53
|
+
use Utopia::Static
|
54
|
+
|
55
|
+
use Utopia::Content,
|
56
|
+
cache_templates: (RACK_ENV == :production),
|
57
|
+
tags: {
|
58
|
+
'deferred' => Utopia::Tags::Deferred,
|
59
|
+
'override' => Utopia::Tags::Override,
|
60
|
+
'node' => Utopia::Tags::Node,
|
61
|
+
'environment' => Utopia::Tags::Environment.for(RACK_ENV)
|
62
|
+
}
|
63
|
+
|
64
|
+
run lambda { |env| [404, {}, []] }
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,70 @@
|
|
1
|
+
|
2
|
+
body {
|
3
|
+
font-family: Verdana, Helvetica, Arial;
|
4
|
+
background-color: #ccc;
|
5
|
+
padding: 50px;
|
6
|
+
}
|
7
|
+
|
8
|
+
p {
|
9
|
+
color: #333;
|
10
|
+
}
|
11
|
+
|
12
|
+
p strong {
|
13
|
+
color: black;
|
14
|
+
}
|
15
|
+
|
16
|
+
h1, h2, h3, h4, h5, h6 {
|
17
|
+
color: #eee;
|
18
|
+
margin-top: 2em;
|
19
|
+
margin-bottom: 1em;
|
20
|
+
text-shadow: 0px 1px 4px rgba(0, 0, 0, 0.7);
|
21
|
+
}
|
22
|
+
|
23
|
+
img {
|
24
|
+
border: none;
|
25
|
+
}
|
26
|
+
|
27
|
+
a {
|
28
|
+
color: #33a;
|
29
|
+
}
|
30
|
+
|
31
|
+
a:hover {
|
32
|
+
color: #55c;
|
33
|
+
}
|
34
|
+
|
35
|
+
p, dl, h3 {
|
36
|
+
margin: 1em;
|
37
|
+
}
|
38
|
+
|
39
|
+
h3 {
|
40
|
+
border-bottom: 1px solid #ccf;
|
41
|
+
}
|
42
|
+
|
43
|
+
ul {
|
44
|
+
margin-bottom: 1em;
|
45
|
+
}
|
46
|
+
|
47
|
+
h3, h4, h5, h6 {
|
48
|
+
font-weight: normal;
|
49
|
+
}
|
50
|
+
|
51
|
+
body.front h1 {
|
52
|
+
font-weight: normal;
|
53
|
+
font-size: 60pt;
|
54
|
+
color: white;
|
55
|
+
text-shadow:
|
56
|
+
0 1px 0 #ccc,
|
57
|
+
0 2px 0 #c9c9c9,
|
58
|
+
0 3px 0 #bbb,
|
59
|
+
0 4px 0 #b9b9b9,
|
60
|
+
0 5px 0 #aaa,
|
61
|
+
0 6px 1px rgba(0,0,0,.1),
|
62
|
+
0 0 5px rgba(0,0,0,.1),
|
63
|
+
0 1px 3px rgba(0,0,0,.3),
|
64
|
+
0 3px 5px rgba(0,0,0,.2),
|
65
|
+
0 5px 10px rgba(0,0,0,.25),
|
66
|
+
0 10px 10px rgba(0,0,0,.2),
|
67
|
+
0 20px 20px rgba(0,0,0,.15);
|
68
|
+
|
69
|
+
text-align: center;
|
70
|
+
}
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<page class="front">
|
2
|
+
<heading>Welcome to Utopia</heading>
|
3
|
+
|
4
|
+
<p><strong>Utopia is designed to simplify web development.</strong> Utopia is a fully featured stack for both content-heavy sites and dynamic web applications.</p>
|
5
|
+
|
6
|
+
<h2>Server Side Tag Based Markup</h2>
|
7
|
+
|
8
|
+
<p>Server side tags reduce the amount of duplicate view code especially for content-heavy sites.</p>
|
9
|
+
|
10
|
+
<h2>Recursive Controller Layer</h2>
|
11
|
+
|
12
|
+
<p>Nested controllers make access control a breeze.</p>
|
13
|
+
|
14
|
+
<h2>Standards Based Localization</h2>
|
15
|
+
|
16
|
+
<p>Automatically sniff the user's desired language and provide content in the correct language.</p>
|
17
|
+
</page>
|
File without changes
|
@@ -0,0 +1,108 @@
|
|
1
|
+
#!/usr/bin/env rspec
|
2
|
+
|
3
|
+
# Copyright, 2015, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
# of this software and associated documentation files (the "Software"), to deal
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
10
|
+
# furnished to do so, subject to the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be included in
|
13
|
+
# all copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
# THE SOFTWARE.
|
22
|
+
|
23
|
+
require_relative '../spec_helper'
|
24
|
+
|
25
|
+
require 'utopia/content/link'
|
26
|
+
|
27
|
+
module Utopia::Content::LinkSpec
|
28
|
+
describe Utopia::Content::Link.new(:file, "/foo/bar/baz") do
|
29
|
+
it "should link should have full path" do
|
30
|
+
expect(subject.name).to be == "baz"
|
31
|
+
expect(subject.path).to be == Utopia::Path.create("/foo/bar/baz")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe Utopia::Content::Link.new(:directory, "/foo/bar/index") do
|
36
|
+
it "should link should have full path" do
|
37
|
+
expect(subject.name).to be == "bar"
|
38
|
+
expect(subject.path).to be == Utopia::Path.create("/foo/bar/index")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe Utopia::Content::Link.new(:virtual, "bob") do
|
43
|
+
it "should link should have full path" do
|
44
|
+
expect(subject.name).to be == "bob"
|
45
|
+
expect(subject.path).to be == nil
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe Utopia::Content::Links do
|
50
|
+
it "should give a list of links" do
|
51
|
+
links = Utopia::Content::Links.index(File.expand_path("../links", __FILE__), Utopia::Path.create("/"))
|
52
|
+
|
53
|
+
expect(links.size).to be == 3
|
54
|
+
|
55
|
+
expect(links[0].kind).to be == :virtual
|
56
|
+
expect(links[0].href).to be == nil
|
57
|
+
|
58
|
+
expect(links[1].title).to be == "Welcome"
|
59
|
+
expect(links[1].to_href).to be == '<a class="link" href="/welcome">Welcome</a>'
|
60
|
+
expect(links[1].kind).to be == :file
|
61
|
+
expect(links[1].href).to be == "/welcome"
|
62
|
+
expect(links[1].name).to be == 'welcome'
|
63
|
+
|
64
|
+
expect(links[2].title).to be == 'Foo Bar'
|
65
|
+
expect(links[2].kind).to be == :directory
|
66
|
+
expect(links[2].href).to be == "/foo/index"
|
67
|
+
expect(links[2].name).to be == 'foo'
|
68
|
+
|
69
|
+
expect(links[1]).to be_eql links[1]
|
70
|
+
expect(links[0]).to_not be_eql links[1]
|
71
|
+
end
|
72
|
+
|
73
|
+
it "should filter links by name" do
|
74
|
+
links = Utopia::Content::Links.index(File.expand_path("../links", __FILE__), Utopia::Path.create("/"), name: /foo/)
|
75
|
+
|
76
|
+
expect(links.size).to be == 1
|
77
|
+
end
|
78
|
+
|
79
|
+
it "should select localized links" do
|
80
|
+
root = File.expand_path("../links", __FILE__)
|
81
|
+
|
82
|
+
# Select both test links
|
83
|
+
links = Utopia::Content::Links.index(root, Utopia::Path.create("/foo"))
|
84
|
+
expect(links.size).to be == 2
|
85
|
+
|
86
|
+
links = Utopia::Content::Links.index(root, Utopia::Path.create("/foo"), variant: 'en')
|
87
|
+
expect(links.size).to be == 1
|
88
|
+
end
|
89
|
+
|
90
|
+
it "should read correct link order for en" do
|
91
|
+
root = File.expand_path("../localized", __FILE__)
|
92
|
+
|
93
|
+
# Select both test links
|
94
|
+
links = Utopia::Content::Links.index(root, Utopia::Path.create("/"), variant: 'en')
|
95
|
+
|
96
|
+
expect(links.collect(&:title)).to be == ['One', 'Two', 'Three', 'Four', 'Five']
|
97
|
+
end
|
98
|
+
|
99
|
+
it "should read correct link order for zh" do
|
100
|
+
root = File.expand_path("../localized", __FILE__)
|
101
|
+
|
102
|
+
# Select both test links
|
103
|
+
links = Utopia::Content::Links.index(root, Utopia::Path.create("/"), variant: 'zh')
|
104
|
+
|
105
|
+
expect(links.collect(&:title)).to be == ['One', 'Two', 'Three', '四']
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
File without changes
|
File without changes
|
File without changes
|