utopia 2.15.0 → 2.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bake/utopia/{yarn.rb → node.rb} +7 -7
- data/lib/utopia/command.rb +2 -2
- data/lib/utopia/command/server.rb +2 -1
- data/lib/utopia/command/site.rb +11 -1
- data/lib/utopia/content.rb +7 -5
- data/lib/utopia/content/markup.rb +1 -1
- data/lib/utopia/content/node.rb +2 -2
- data/lib/utopia/content/response.rb +3 -3
- data/lib/utopia/controller.rb +0 -17
- data/lib/utopia/controller/base.rb +27 -3
- data/lib/utopia/controller/respond.rb +50 -107
- data/lib/utopia/extensions/array_split.rb +2 -2
- data/lib/utopia/http.rb +3 -3
- data/lib/utopia/middleware.rb +2 -2
- data/lib/utopia/path.rb +24 -22
- data/lib/utopia/redirection.rb +0 -2
- data/lib/utopia/responder.rb +76 -0
- data/lib/utopia/version.rb +1 -1
- data/setup/server/git/hooks/post-receive +1 -1
- data/setup/site/.gitignore +8 -7
- data/setup/site/{Gemfile → gems.rb} +0 -0
- metadata +74 -398
- data/.codeclimate.yml +0 -5
- data/.github/workflows/development.yml +0 -62
- data/.gitignore +0 -8
- data/.rspec +0 -4
- data/.yardopts +0 -2
- data/Gemfile +0 -28
- data/README.md +0 -90
- data/benchmark/call_vs_check.rb +0 -38
- data/benchmark/const_vs_hash.rb +0 -35
- data/benchmark/hash_vs_openstruct.rb +0 -54
- data/benchmark/string_vs_symbol.rb +0 -14
- data/benchmark/struct_vs_class.rb +0 -91
- data/docs/.nojekyll +0 -0
- data/docs/_components/jquery-litebox/jquery.litebox.css +0 -23
- data/docs/_components/jquery-litebox/jquery.litebox.gallery.css +0 -48
- data/docs/_components/jquery-litebox/jquery.litebox.js +0 -30
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.apache.css +0 -12
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.applescript.css +0 -5
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.assembly.css +0 -8
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.bash-script.css +0 -6
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.bash.css +0 -4
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.clang.css +0 -6
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.css.css +0 -14
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.diff.css +0 -16
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.html.css +0 -5
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.ocaml.css +0 -3
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.protobuf.css +0 -2
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.python.css +0 -6
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css +0 -2
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.xml.css +0 -18
- data/docs/_components/jquery-syntax/base/jquery.syntax.core.css +0 -58
- data/docs/_components/jquery-syntax/base/jquery.syntax.editor.css +0 -6
- data/docs/_components/jquery-syntax/base/theme.js +0 -1
- data/docs/_components/jquery-syntax/bright/jquery.syntax.core.css +0 -27
- data/docs/_components/jquery-syntax/bright/theme.js +0 -1
- data/docs/_components/jquery-syntax/jquery.syntax.brush.apache.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.applescript.js +0 -5
- data/docs/_components/jquery-syntax/jquery.syntax.brush.assembly.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.bash-script.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.bash.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.brush.basic.js +0 -5
- data/docs/_components/jquery-syntax/jquery.syntax.brush.clang.js +0 -5
- data/docs/_components/jquery-syntax/jquery.syntax.brush.csharp.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.css.js +0 -5
- data/docs/_components/jquery-syntax/jquery.syntax.brush.diff.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.brush.go.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.haskell.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.html.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.io.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.java.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.javascript.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.kai.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.brush.lisp.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.brush.lua.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.nginx.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.brush.ocaml.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.ooc.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.pascal.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.perl5.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.php-script.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.php.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.brush.plain.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.brush.protobuf.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.python.js +0 -5
- data/docs/_components/jquery-syntax/jquery.syntax.brush.ruby.js +0 -5
- data/docs/_components/jquery-syntax/jquery.syntax.brush.scala.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.smalltalk.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.brush.sql.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.super-collider.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.swift.js +0 -3
- data/docs/_components/jquery-syntax/jquery.syntax.brush.trenni.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.brush.xml.js +0 -4
- data/docs/_components/jquery-syntax/jquery.syntax.brush.yaml.js +0 -2
- data/docs/_components/jquery-syntax/jquery.syntax.cache.js +0 -7
- data/docs/_components/jquery-syntax/jquery.syntax.core.js +0 -34
- data/docs/_components/jquery-syntax/jquery.syntax.editor.js +0 -11
- data/docs/_components/jquery-syntax/jquery.syntax.js +0 -8
- data/docs/_components/jquery-syntax/jquery.syntax.min.js +0 -13
- data/docs/_components/jquery-syntax/paper/jquery.syntax.core.css +0 -31
- data/docs/_components/jquery-syntax/paper/theme.js +0 -1
- data/docs/_components/jquery/jquery.js +0 -10872
- data/docs/_components/jquery/jquery.min.js +0 -2
- data/docs/_components/jquery/jquery.min.map +0 -1
- data/docs/_components/jquery/jquery.slim.js +0 -8777
- data/docs/_components/jquery/jquery.slim.min.js +0 -2
- data/docs/_components/jquery/jquery.slim.min.map +0 -1
- data/docs/_static/icon.png +0 -0
- data/docs/_static/site.css +0 -191
- data/docs/development-environment-setup/index.html +0 -54
- data/docs/faq/what-is-xnode/index.html +0 -73
- data/docs/index.html +0 -86
- data/docs/javascript/index.html +0 -108
- data/docs/middleware/content/index.html +0 -58
- data/docs/middleware/controller/actions/index.html +0 -111
- data/docs/middleware/controller/index.html +0 -98
- data/docs/middleware/controller/rewrite/index.html +0 -105
- data/docs/middleware/localization/index.html +0 -53
- data/docs/middleware/redirection/index.html +0 -55
- data/docs/middleware/session/index.html +0 -65
- data/docs/middleware/static/index.html +0 -51
- data/docs/server-setup/index.html +0 -87
- data/docs/testing/index.html +0 -53
- data/docs/updating-utopia/index.html +0 -102
- data/docs/your-first-page/index.html +0 -74
- data/materials/utopia.png +0 -0
- data/materials/utopia.svg +0 -1
- data/spec/mock_node.rb +0 -16
- data/spec/spec_helper.rb +0 -13
- data/spec/utopia/command_spec.rb +0 -164
- data/spec/utopia/content/document_spec.rb +0 -60
- data/spec/utopia/content/links/bar/index.xnode +0 -0
- data/spec/utopia/content/links/bar/parent/child/index.en.xnode +0 -0
- data/spec/utopia/content/links/bar/parent/child/index.ja.xnode +0 -0
- data/spec/utopia/content/links/bar/parent/links.yaml +0 -2
- data/spec/utopia/content/links/foo/index.xnode +0 -0
- data/spec/utopia/content/links/foo/links.yaml +0 -2
- 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/index.xnode +0 -0
- data/spec/utopia/content/links/links.yaml +0 -18
- data/spec/utopia/content/links/redirect/links.yaml +0 -2
- data/spec/utopia/content/links/welcome.xnode +0 -0
- data/spec/utopia/content/links_spec.rb +0 -218
- 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 +0 -4
- data/spec/utopia/content/localized/links.yaml +0 -13
- 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/markup_spec.rb +0 -96
- data/spec/utopia/content/namespace_spec.rb +0 -45
- data/spec/utopia/content/node/lookup/content.xnode +0 -1
- data/spec/utopia/content/node/lookup/index.xnode +0 -1
- 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 +0 -4
- 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 +0 -4
- data/spec/utopia/content/node_spec.rb +0 -97
- data/spec/utopia/content/response_spec.rb +0 -54
- data/spec/utopia/content/tags_spec.rb +0 -82
- data/spec/utopia/content_spec.rb +0 -100
- data/spec/utopia/content_spec.ru +0 -6
- data/spec/utopia/content_spec/_heading.xnode +0 -1
- data/spec/utopia/content_spec/content/_show-value.xnode +0 -1
- data/spec/utopia/content_spec/content/links.yaml +0 -2
- data/spec/utopia/content_spec/content/test-partial.xnode +0 -1
- data/spec/utopia/content_spec/index.xnode +0 -1
- data/spec/utopia/content_spec/node/index.xnode +0 -1
- data/spec/utopia/content_spec/test.xnode +0 -10
- data/spec/utopia/controller/actions_spec.rb +0 -62
- data/spec/utopia/controller/middleware_spec.rb +0 -88
- data/spec/utopia/controller/middleware_spec.ru +0 -6
- data/spec/utopia/controller/middleware_spec/controller/controller.rb +0 -27
- data/spec/utopia/controller/middleware_spec/controller/index.xnode +0 -1
- data/spec/utopia/controller/middleware_spec/controller/nested/controller.rb +0 -7
- data/spec/utopia/controller/middleware_spec/empty/controller.rb +0 -0
- data/spec/utopia/controller/middleware_spec/redirect/controller.rb +0 -12
- data/spec/utopia/controller/middleware_spec/redirect/test/controller.rb +0 -9
- data/spec/utopia/controller/respond_spec.rb +0 -174
- data/spec/utopia/controller/respond_spec.ru +0 -12
- data/spec/utopia/controller/respond_spec/api/controller.rb +0 -28
- data/spec/utopia/controller/respond_spec/errors/controller.rb +0 -14
- data/spec/utopia/controller/respond_spec/errors/file-not-found.xnode +0 -8
- data/spec/utopia/controller/respond_spec/html/controller.rb +0 -11
- data/spec/utopia/controller/respond_spec/rewrite/controller.rb +0 -13
- data/spec/utopia/controller/rewrite_spec.rb +0 -80
- data/spec/utopia/controller/sequence_spec.rb +0 -135
- data/spec/utopia/controller/variables_spec.rb +0 -59
- data/spec/utopia/controller/websocket_spec.rb +0 -68
- data/spec/utopia/controller/websocket_spec.ru +0 -5
- data/spec/utopia/controller/websocket_spec/server/controller.rb +0 -11
- data/spec/utopia/exceptions/handler_spec.rb +0 -47
- data/spec/utopia/exceptions/handler_spec.ru +0 -8
- data/spec/utopia/exceptions/handler_spec/controller.rb +0 -19
- data/spec/utopia/exceptions/mailer_spec.rb +0 -43
- data/spec/utopia/exceptions/mailer_spec.ru +0 -10
- data/spec/utopia/extensions_spec.rb +0 -73
- data/spec/utopia/http/status_spec.rb +0 -44
- data/spec/utopia/locale_spec.rb +0 -58
- data/spec/utopia/localization_spec.rb +0 -92
- data/spec/utopia/localization_spec.ru +0 -15
- data/spec/utopia/localization_spec/controller.rb +0 -21
- data/spec/utopia/localization_spec/localized.de.txt +0 -1
- data/spec/utopia/localization_spec/localized.en.txt +0 -1
- data/spec/utopia/localization_spec/localized.ja.txt +0 -1
- data/spec/utopia/localization_spec/test.txt +0 -1
- data/spec/utopia/middleware_spec.rb +0 -31
- data/spec/utopia/path/matcher_spec.rb +0 -66
- data/spec/utopia/path_spec.rb +0 -207
- data/spec/utopia/performance_spec.rb +0 -92
- data/spec/utopia/performance_spec/cache/head/readme.txt +0 -1
- data/spec/utopia/performance_spec/cache/meta/readme.txt +0 -1
- data/spec/utopia/performance_spec/config.ru +0 -35
- data/spec/utopia/performance_spec/lib/readme.txt +0 -1
- data/spec/utopia/performance_spec/pages/_heading.xnode +0 -2
- data/spec/utopia/performance_spec/pages/_page.xnode +0 -26
- data/spec/utopia/performance_spec/pages/api/controller.rb +0 -8
- data/spec/utopia/performance_spec/pages/errors/exception.xnode +0 -5
- data/spec/utopia/performance_spec/pages/errors/file-not-found.xnode +0 -5
- data/spec/utopia/performance_spec/pages/links.yaml +0 -2
- data/spec/utopia/performance_spec/pages/welcome/index.xnode +0 -17
- data/spec/utopia/rack_helper.rb +0 -32
- data/spec/utopia/redirection_spec.rb +0 -77
- data/spec/utopia/redirection_spec.ru +0 -27
- data/spec/utopia/session_spec.rb +0 -189
- data/spec/utopia/session_spec.ru +0 -24
- data/spec/utopia/setup_spec.rb +0 -56
- data/spec/utopia/static_spec.rb +0 -49
- data/spec/utopia/static_spec.ru +0 -5
- data/spec/utopia/static_spec/test.txt +0 -1
- data/utopia.gemspec +0 -52
- data/wiki/Gemfile +0 -9
- data/wiki/config.ru +0 -7
- data/wiki/pages/development-environment-setup/index.md +0 -16
- data/wiki/pages/faq/links.yaml +0 -2
- data/wiki/pages/faq/what-is-xnode/index.md +0 -37
- data/wiki/pages/faq/what-is-xnode/links.yaml +0 -2
- data/wiki/pages/index.md +0 -35
- data/wiki/pages/javascript/index.md +0 -75
- data/wiki/pages/javascript/links.yaml +0 -2
- data/wiki/pages/links.yaml +0 -2
- data/wiki/pages/middleware/content/index.md +0 -21
- data/wiki/pages/middleware/controller/actions/index.md +0 -76
- data/wiki/pages/middleware/controller/index.md +0 -62
- data/wiki/pages/middleware/controller/links.yaml +0 -4
- data/wiki/pages/middleware/controller/rewrite/index.md +0 -69
- data/wiki/pages/middleware/localization/index.md +0 -16
- data/wiki/pages/middleware/redirection/index.md +0 -17
- data/wiki/pages/middleware/session/index.md +0 -29
- data/wiki/pages/middleware/static/index.md +0 -13
- data/wiki/pages/server-setup/index.md +0 -52
- data/wiki/pages/testing/index.md +0 -15
- data/wiki/pages/updating-utopia/index.md +0 -63
- data/wiki/pages/your-first-page/index.md +0 -38
@@ -23,8 +23,8 @@
|
|
23
23
|
module Utopia
|
24
24
|
module Extensions
|
25
25
|
module ArraySplit
|
26
|
-
def split_at(*
|
27
|
-
if middle = index(*
|
26
|
+
def split_at(*arguments, &block)
|
27
|
+
if middle = index(*arguments, &block)
|
28
28
|
[self[0...middle], self[middle], self[middle+1..-1]]
|
29
29
|
else
|
30
30
|
[[], nil, []]
|
data/lib/utopia/http.rb
CHANGED
@@ -90,9 +90,9 @@ module Utopia
|
|
90
90
|
503 => 'Service Unavailable'.freeze
|
91
91
|
}.merge(Rack::Utils::HTTP_STATUS_CODES)
|
92
92
|
|
93
|
-
CONTENT_TYPE = '
|
94
|
-
LOCATION = '
|
95
|
-
CACHE_CONTROL = '
|
93
|
+
CONTENT_TYPE = 'content-type'.freeze
|
94
|
+
LOCATION = 'location'.freeze
|
95
|
+
CACHE_CONTROL = 'cache-control'.freeze
|
96
96
|
|
97
97
|
# A small HTTP status wrapper that verifies the status code within a given range.
|
98
98
|
class Status
|
data/lib/utopia/middleware.rb
CHANGED
@@ -39,7 +39,7 @@ module Utopia
|
|
39
39
|
|
40
40
|
# The same as {default_root} but returns an instance of {Path}.
|
41
41
|
# @return [Path] The path as requested.
|
42
|
-
def self.default_path(*
|
43
|
-
Path[default_root(*
|
42
|
+
def self.default_path(*arguments)
|
43
|
+
Path[default_root(*arguments)]
|
44
44
|
end
|
45
45
|
end
|
data/lib/utopia/path.rb
CHANGED
@@ -25,7 +25,7 @@ module Utopia
|
|
25
25
|
class Path
|
26
26
|
include Comparable
|
27
27
|
|
28
|
-
SEPARATOR = '/'
|
28
|
+
SEPARATOR = '/'
|
29
29
|
|
30
30
|
def initialize(components = [])
|
31
31
|
@components = components
|
@@ -34,6 +34,8 @@ module Utopia
|
|
34
34
|
attr_accessor :components
|
35
35
|
|
36
36
|
def freeze
|
37
|
+
return self if frozen?
|
38
|
+
|
37
39
|
@components.freeze
|
38
40
|
|
39
41
|
super
|
@@ -126,8 +128,8 @@ module Utopia
|
|
126
128
|
@components = other_path.components.dup
|
127
129
|
end
|
128
130
|
|
129
|
-
def include?(*
|
130
|
-
@components.include?(*
|
131
|
+
def include?(*arguments)
|
132
|
+
@components.include?(*arguments)
|
131
133
|
end
|
132
134
|
|
133
135
|
def directory?
|
@@ -200,8 +202,8 @@ module Utopia
|
|
200
202
|
end
|
201
203
|
end
|
202
204
|
|
203
|
-
def with_prefix(*
|
204
|
-
self.class.create(*
|
205
|
+
def with_prefix(*arguments)
|
206
|
+
self.class.create(*arguments) + self
|
205
207
|
end
|
206
208
|
|
207
209
|
# Computes the difference of the path.
|
@@ -235,6 +237,22 @@ module Utopia
|
|
235
237
|
return self.class.new(result)
|
236
238
|
end
|
237
239
|
|
240
|
+
def first
|
241
|
+
if absolute?
|
242
|
+
@components[1]
|
243
|
+
else
|
244
|
+
@components[0]
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
def last
|
249
|
+
@components.last
|
250
|
+
end
|
251
|
+
|
252
|
+
def pop
|
253
|
+
@components.pop
|
254
|
+
end
|
255
|
+
|
238
256
|
# @return [String] the last path component without any file extension.
|
239
257
|
def basename
|
240
258
|
basename, _ = @components.last.split('.', 2)
|
@@ -284,7 +302,7 @@ module Utopia
|
|
284
302
|
end
|
285
303
|
|
286
304
|
def split(at)
|
287
|
-
if at.kind_of?
|
305
|
+
if at.kind_of?(String)
|
288
306
|
at = @components.index(at)
|
289
307
|
end
|
290
308
|
|
@@ -342,22 +360,6 @@ module Utopia
|
|
342
360
|
@components.delete_at(component_offset(index))
|
343
361
|
end
|
344
362
|
|
345
|
-
def first
|
346
|
-
if absolute?
|
347
|
-
@components[1]
|
348
|
-
else
|
349
|
-
@components[0]
|
350
|
-
end
|
351
|
-
end
|
352
|
-
|
353
|
-
def last
|
354
|
-
if directory?
|
355
|
-
@components[-2]
|
356
|
-
else
|
357
|
-
@components[-1]
|
358
|
-
end
|
359
|
-
end
|
360
|
-
|
361
363
|
private
|
362
364
|
|
363
365
|
# We adjust the index slightly so that indices reference path components rather than the directory markers at the start and end of the path components array.
|
data/lib/utopia/redirection.rb
CHANGED
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright, 2012, 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 'middleware'
|
24
|
+
|
25
|
+
module Utopia
|
26
|
+
class Responder
|
27
|
+
Handler = Struct.new(:content_type, :block) do
|
28
|
+
def split(*arguments)
|
29
|
+
self.content_type.split(*arguments)
|
30
|
+
end
|
31
|
+
|
32
|
+
def call(context, request, media_range, *arguments, **options)
|
33
|
+
context.instance_exec(media_range, *arguments, **options, &self.block)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
Responds = Struct.new(:responder, :context, :request) do
|
38
|
+
# @todo Refactor `object` -> `*arguments`...
|
39
|
+
def with(object, **options)
|
40
|
+
responder.call(context, request, object, **options)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def initialize
|
45
|
+
@handlers = HTTP::Accept::MediaTypes::Map.new
|
46
|
+
end
|
47
|
+
|
48
|
+
attr :handlers
|
49
|
+
|
50
|
+
def freeze
|
51
|
+
@handlers.freeze
|
52
|
+
|
53
|
+
super
|
54
|
+
end
|
55
|
+
|
56
|
+
def call(context, request, *arguments, **options)
|
57
|
+
# Parse the list of browser preferred content types and return ordered by priority:
|
58
|
+
media_types = HTTP::Accept::MediaTypes.browser_preferred_media_types(request.env)
|
59
|
+
|
60
|
+
handler, media_range = @handlers.for(media_types)
|
61
|
+
|
62
|
+
if handler
|
63
|
+
handler.call(context, request, media_range, *arguments, **options)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Add a converter for the specified content type. Call the block with the response content if the request accepts the specified content_type.
|
68
|
+
def handle(content_type, &block)
|
69
|
+
@handlers << Handler.new(content_type, block)
|
70
|
+
end
|
71
|
+
|
72
|
+
def respond_to(context, request)
|
73
|
+
Responds.new(self, context, request)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
data/lib/utopia/version.rb
CHANGED
data/setup/site/.gitignore
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
# Development specific:
|
2
|
-
|
3
|
-
|
4
|
-
.bundle
|
5
|
-
bin/
|
2
|
+
/.rspec_status
|
3
|
+
/.bundle
|
6
4
|
|
7
5
|
# Temporary data should not be added to the repository:
|
8
|
-
tmp
|
6
|
+
/tmp
|
7
|
+
|
8
|
+
# Node modules are 3rd party dependencies which can be fetched easily:
|
9
|
+
/node_modules
|
9
10
|
|
10
11
|
# This file should only ever exist on production, and may contain sensitive information:
|
11
|
-
config/environment.yaml
|
12
|
+
/config/environment.yaml
|
12
13
|
|
13
14
|
# Ignore resized gallery photos:
|
14
|
-
public/_gallery
|
15
|
+
/public/_gallery
|
File without changes
|
metadata
CHANGED
@@ -1,99 +1,99 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: concurrent-ruby
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: console
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: http-accept
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.1'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: mail
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '2.
|
61
|
+
version: '2.6'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '2.
|
68
|
+
version: '2.6'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: mime-types
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '3.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '3.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: msgpack
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0
|
89
|
+
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rack
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '2.2'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: samovar
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
@@ -123,33 +123,61 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '2.1'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: trenni
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '3.0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '3.0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: variant
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '1
|
145
|
+
version: '0.1'
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '1
|
152
|
+
version: '0.1'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: async-rspec
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: async-websocket
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
153
181
|
- !ruby/object:Gem::Dependency
|
154
182
|
name: bake
|
155
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,7 +193,7 @@ dependencies:
|
|
165
193
|
- !ruby/object:Gem::Version
|
166
194
|
version: '0'
|
167
195
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
196
|
+
name: bake-bundler
|
169
197
|
requirement: !ruby/object:Gem::Requirement
|
170
198
|
requirements:
|
171
199
|
- - ">="
|
@@ -179,7 +207,7 @@ dependencies:
|
|
179
207
|
- !ruby/object:Gem::Version
|
180
208
|
version: '0'
|
181
209
|
- !ruby/object:Gem::Dependency
|
182
|
-
name:
|
210
|
+
name: bake-modernize
|
183
211
|
requirement: !ruby/object:Gem::Requirement
|
184
212
|
requirements:
|
185
213
|
- - ">="
|
@@ -193,7 +221,7 @@ dependencies:
|
|
193
221
|
- !ruby/object:Gem::Version
|
194
222
|
version: '0'
|
195
223
|
- !ruby/object:Gem::Dependency
|
196
|
-
name:
|
224
|
+
name: bundler
|
197
225
|
requirement: !ruby/object:Gem::Requirement
|
198
226
|
requirements:
|
199
227
|
- - ">="
|
@@ -221,7 +249,7 @@ dependencies:
|
|
221
249
|
- !ruby/object:Gem::Version
|
222
250
|
version: '0'
|
223
251
|
- !ruby/object:Gem::Dependency
|
224
|
-
name:
|
252
|
+
name: falcon
|
225
253
|
requirement: !ruby/object:Gem::Requirement
|
226
254
|
requirements:
|
227
255
|
- - ">="
|
@@ -249,7 +277,7 @@ dependencies:
|
|
249
277
|
- !ruby/object:Gem::Version
|
250
278
|
version: '3.6'
|
251
279
|
- !ruby/object:Gem::Dependency
|
252
|
-
name:
|
280
|
+
name: utopia-project
|
253
281
|
requirement: !ruby/object:Gem::Requirement
|
254
282
|
requirements:
|
255
283
|
- - ">="
|
@@ -262,127 +290,19 @@ dependencies:
|
|
262
290
|
- - ">="
|
263
291
|
- !ruby/object:Gem::Version
|
264
292
|
version: '0'
|
265
|
-
description:
|
266
|
-
set of tools\n\t\tto build highly complex dynamic websites. It uses the filesystem
|
267
|
-
heavily for\n\t\tcontent and provides frameworks for interacting with files and
|
268
|
-
directories as\n\t\tstructure representing the website.\n"
|
293
|
+
description:
|
269
294
|
email:
|
270
|
-
- samuel.williams@oriontransfer.co.nz
|
271
295
|
executables:
|
272
296
|
- utopia
|
273
297
|
extensions: []
|
274
298
|
extra_rdoc_files: []
|
275
299
|
files:
|
276
|
-
- ".codeclimate.yml"
|
277
|
-
- ".github/workflows/development.yml"
|
278
|
-
- ".gitignore"
|
279
|
-
- ".rspec"
|
280
|
-
- ".yardopts"
|
281
|
-
- Gemfile
|
282
|
-
- README.md
|
283
300
|
- bake/utopia.rb
|
301
|
+
- bake/utopia/node.rb
|
284
302
|
- bake/utopia/shell.rb
|
285
303
|
- bake/utopia/static.rb
|
286
304
|
- bake/utopia/test.rb
|
287
|
-
- bake/utopia/yarn.rb
|
288
|
-
- benchmark/call_vs_check.rb
|
289
|
-
- benchmark/const_vs_hash.rb
|
290
|
-
- benchmark/hash_vs_openstruct.rb
|
291
|
-
- benchmark/string_vs_symbol.rb
|
292
|
-
- benchmark/struct_vs_class.rb
|
293
305
|
- bin/utopia
|
294
|
-
- docs/.nojekyll
|
295
|
-
- docs/_components/jquery-litebox/jquery.litebox.css
|
296
|
-
- docs/_components/jquery-litebox/jquery.litebox.gallery.css
|
297
|
-
- docs/_components/jquery-litebox/jquery.litebox.js
|
298
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.apache.css
|
299
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.applescript.css
|
300
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.assembly.css
|
301
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.bash-script.css
|
302
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.bash.css
|
303
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.clang.css
|
304
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.css.css
|
305
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.diff.css
|
306
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.html.css
|
307
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.ocaml.css
|
308
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.protobuf.css
|
309
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.python.css
|
310
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css
|
311
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.brush.xml.css
|
312
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.core.css
|
313
|
-
- docs/_components/jquery-syntax/base/jquery.syntax.editor.css
|
314
|
-
- docs/_components/jquery-syntax/base/theme.js
|
315
|
-
- docs/_components/jquery-syntax/bright/jquery.syntax.core.css
|
316
|
-
- docs/_components/jquery-syntax/bright/theme.js
|
317
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.apache.js
|
318
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.applescript.js
|
319
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.assembly.js
|
320
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.bash-script.js
|
321
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.bash.js
|
322
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.basic.js
|
323
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.clang.js
|
324
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.csharp.js
|
325
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.css.js
|
326
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.diff.js
|
327
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.go.js
|
328
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.haskell.js
|
329
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.html.js
|
330
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.io.js
|
331
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.java.js
|
332
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.javascript.js
|
333
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.kai.js
|
334
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.lisp.js
|
335
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.lua.js
|
336
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.nginx.js
|
337
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.ocaml.js
|
338
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.ooc.js
|
339
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.pascal.js
|
340
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.perl5.js
|
341
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.php-script.js
|
342
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.php.js
|
343
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.plain.js
|
344
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.protobuf.js
|
345
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.python.js
|
346
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.ruby.js
|
347
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.scala.js
|
348
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.smalltalk.js
|
349
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.sql.js
|
350
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.super-collider.js
|
351
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.swift.js
|
352
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.trenni.js
|
353
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.xml.js
|
354
|
-
- docs/_components/jquery-syntax/jquery.syntax.brush.yaml.js
|
355
|
-
- docs/_components/jquery-syntax/jquery.syntax.cache.js
|
356
|
-
- docs/_components/jquery-syntax/jquery.syntax.core.js
|
357
|
-
- docs/_components/jquery-syntax/jquery.syntax.editor.js
|
358
|
-
- docs/_components/jquery-syntax/jquery.syntax.js
|
359
|
-
- docs/_components/jquery-syntax/jquery.syntax.min.js
|
360
|
-
- docs/_components/jquery-syntax/paper/jquery.syntax.core.css
|
361
|
-
- docs/_components/jquery-syntax/paper/theme.js
|
362
|
-
- docs/_components/jquery/jquery.js
|
363
|
-
- docs/_components/jquery/jquery.min.js
|
364
|
-
- docs/_components/jquery/jquery.min.map
|
365
|
-
- docs/_components/jquery/jquery.slim.js
|
366
|
-
- docs/_components/jquery/jquery.slim.min.js
|
367
|
-
- docs/_components/jquery/jquery.slim.min.map
|
368
|
-
- docs/_static/icon.png
|
369
|
-
- docs/_static/site.css
|
370
|
-
- docs/development-environment-setup/index.html
|
371
|
-
- docs/faq/what-is-xnode/index.html
|
372
|
-
- docs/index.html
|
373
|
-
- docs/javascript/index.html
|
374
|
-
- docs/middleware/content/index.html
|
375
|
-
- docs/middleware/controller/actions/index.html
|
376
|
-
- docs/middleware/controller/index.html
|
377
|
-
- docs/middleware/controller/rewrite/index.html
|
378
|
-
- docs/middleware/localization/index.html
|
379
|
-
- docs/middleware/redirection/index.html
|
380
|
-
- docs/middleware/session/index.html
|
381
|
-
- docs/middleware/static/index.html
|
382
|
-
- docs/server-setup/index.html
|
383
|
-
- docs/testing/index.html
|
384
|
-
- docs/updating-utopia/index.html
|
385
|
-
- docs/your-first-page/index.html
|
386
306
|
- lib/utopia.rb
|
387
307
|
- lib/utopia/command.rb
|
388
308
|
- lib/utopia/command/environment.rb
|
@@ -417,6 +337,7 @@ files:
|
|
417
337
|
- lib/utopia/path.rb
|
418
338
|
- lib/utopia/path/matcher.rb
|
419
339
|
- lib/utopia/redirection.rb
|
340
|
+
- lib/utopia/responder.rb
|
420
341
|
- lib/utopia/session.rb
|
421
342
|
- lib/utopia/session/lazy_hash.rb
|
422
343
|
- lib/utopia/session/serialization.rb
|
@@ -426,12 +347,9 @@ files:
|
|
426
347
|
- lib/utopia/static/local_file.rb
|
427
348
|
- lib/utopia/static/mime_types.rb
|
428
349
|
- lib/utopia/version.rb
|
429
|
-
- materials/utopia.png
|
430
|
-
- materials/utopia.svg
|
431
350
|
- setup/server/git/hooks/post-receive
|
432
351
|
- setup/site/.gitignore
|
433
352
|
- setup/site/.rspec
|
434
|
-
- setup/site/Gemfile
|
435
353
|
- setup/site/Guardfile
|
436
354
|
- setup/site/README.md
|
437
355
|
- setup/site/bake.rb
|
@@ -439,6 +357,7 @@ files:
|
|
439
357
|
- setup/site/config/README.md
|
440
358
|
- setup/site/config/environment.rb
|
441
359
|
- setup/site/falcon.rb
|
360
|
+
- setup/site/gems.rb
|
442
361
|
- setup/site/lib/readme.txt
|
443
362
|
- setup/site/pages/_heading.xnode
|
444
363
|
- setup/site/pages/_page.xnode
|
@@ -454,145 +373,12 @@ files:
|
|
454
373
|
- setup/site/spec/spec_helper.rb
|
455
374
|
- setup/site/spec/website_context.rb
|
456
375
|
- setup/site/spec/website_spec.rb
|
457
|
-
- spec/mock_node.rb
|
458
|
-
- spec/spec_helper.rb
|
459
|
-
- spec/utopia/command_spec.rb
|
460
|
-
- spec/utopia/content/document_spec.rb
|
461
|
-
- spec/utopia/content/links/bar/index.xnode
|
462
|
-
- spec/utopia/content/links/bar/parent/child/index.en.xnode
|
463
|
-
- spec/utopia/content/links/bar/parent/child/index.ja.xnode
|
464
|
-
- spec/utopia/content/links/bar/parent/links.yaml
|
465
|
-
- spec/utopia/content/links/foo/index.xnode
|
466
|
-
- spec/utopia/content/links/foo/links.yaml
|
467
|
-
- spec/utopia/content/links/foo/test.de.xnode
|
468
|
-
- spec/utopia/content/links/foo/test.en.xnode
|
469
|
-
- spec/utopia/content/links/index.xnode
|
470
|
-
- spec/utopia/content/links/links.yaml
|
471
|
-
- spec/utopia/content/links/redirect/links.yaml
|
472
|
-
- spec/utopia/content/links/welcome.xnode
|
473
|
-
- spec/utopia/content/links_spec.rb
|
474
|
-
- spec/utopia/content/localized/five/index.en.xnode
|
475
|
-
- spec/utopia/content/localized/four/index.en.xnode
|
476
|
-
- spec/utopia/content/localized/four/index.zh.xnode
|
477
|
-
- spec/utopia/content/localized/four/links.yaml
|
478
|
-
- spec/utopia/content/localized/links.yaml
|
479
|
-
- spec/utopia/content/localized/one.xnode
|
480
|
-
- spec/utopia/content/localized/three/index.xnode
|
481
|
-
- spec/utopia/content/localized/two.en.xnode
|
482
|
-
- spec/utopia/content/localized/two.zh.xnode
|
483
|
-
- spec/utopia/content/markup_spec.rb
|
484
|
-
- spec/utopia/content/namespace_spec.rb
|
485
|
-
- spec/utopia/content/node/lookup/content.xnode
|
486
|
-
- spec/utopia/content/node/lookup/index.xnode
|
487
|
-
- spec/utopia/content/node/ordered/first.xnode
|
488
|
-
- spec/utopia/content/node/ordered/index.xnode
|
489
|
-
- spec/utopia/content/node/ordered/links.yaml
|
490
|
-
- spec/utopia/content/node/ordered/second.xnode
|
491
|
-
- spec/utopia/content/node/related/foo.en.xnode
|
492
|
-
- spec/utopia/content/node/related/foo.ja.xnode
|
493
|
-
- spec/utopia/content/node/related/links.yaml
|
494
|
-
- spec/utopia/content/node_spec.rb
|
495
|
-
- spec/utopia/content/response_spec.rb
|
496
|
-
- spec/utopia/content/tags_spec.rb
|
497
|
-
- spec/utopia/content_spec.rb
|
498
|
-
- spec/utopia/content_spec.ru
|
499
|
-
- spec/utopia/content_spec/_heading.xnode
|
500
|
-
- spec/utopia/content_spec/content/_show-value.xnode
|
501
|
-
- spec/utopia/content_spec/content/links.yaml
|
502
|
-
- spec/utopia/content_spec/content/test-partial.xnode
|
503
|
-
- spec/utopia/content_spec/index.xnode
|
504
|
-
- spec/utopia/content_spec/node/index.xnode
|
505
|
-
- spec/utopia/content_spec/test.xnode
|
506
|
-
- spec/utopia/controller/actions_spec.rb
|
507
|
-
- spec/utopia/controller/middleware_spec.rb
|
508
|
-
- spec/utopia/controller/middleware_spec.ru
|
509
|
-
- spec/utopia/controller/middleware_spec/controller/controller.rb
|
510
|
-
- spec/utopia/controller/middleware_spec/controller/index.xnode
|
511
|
-
- spec/utopia/controller/middleware_spec/controller/nested/controller.rb
|
512
|
-
- spec/utopia/controller/middleware_spec/empty/controller.rb
|
513
|
-
- spec/utopia/controller/middleware_spec/redirect/controller.rb
|
514
|
-
- spec/utopia/controller/middleware_spec/redirect/test/controller.rb
|
515
|
-
- spec/utopia/controller/respond_spec.rb
|
516
|
-
- spec/utopia/controller/respond_spec.ru
|
517
|
-
- spec/utopia/controller/respond_spec/api/controller.rb
|
518
|
-
- spec/utopia/controller/respond_spec/errors/controller.rb
|
519
|
-
- spec/utopia/controller/respond_spec/errors/file-not-found.xnode
|
520
|
-
- spec/utopia/controller/respond_spec/html/controller.rb
|
521
|
-
- spec/utopia/controller/respond_spec/rewrite/controller.rb
|
522
|
-
- spec/utopia/controller/rewrite_spec.rb
|
523
|
-
- spec/utopia/controller/sequence_spec.rb
|
524
|
-
- spec/utopia/controller/variables_spec.rb
|
525
|
-
- spec/utopia/controller/websocket_spec.rb
|
526
|
-
- spec/utopia/controller/websocket_spec.ru
|
527
|
-
- spec/utopia/controller/websocket_spec/server/controller.rb
|
528
|
-
- spec/utopia/exceptions/handler_spec.rb
|
529
|
-
- spec/utopia/exceptions/handler_spec.ru
|
530
|
-
- spec/utopia/exceptions/handler_spec/controller.rb
|
531
|
-
- spec/utopia/exceptions/mailer_spec.rb
|
532
|
-
- spec/utopia/exceptions/mailer_spec.ru
|
533
|
-
- spec/utopia/extensions_spec.rb
|
534
|
-
- spec/utopia/http/status_spec.rb
|
535
|
-
- spec/utopia/locale_spec.rb
|
536
|
-
- spec/utopia/localization_spec.rb
|
537
|
-
- spec/utopia/localization_spec.ru
|
538
|
-
- spec/utopia/localization_spec/controller.rb
|
539
|
-
- spec/utopia/localization_spec/localized.de.txt
|
540
|
-
- spec/utopia/localization_spec/localized.en.txt
|
541
|
-
- spec/utopia/localization_spec/localized.ja.txt
|
542
|
-
- spec/utopia/localization_spec/test.txt
|
543
|
-
- spec/utopia/middleware_spec.rb
|
544
|
-
- spec/utopia/path/matcher_spec.rb
|
545
|
-
- spec/utopia/path_spec.rb
|
546
|
-
- spec/utopia/performance_spec.rb
|
547
|
-
- spec/utopia/performance_spec/cache/head/readme.txt
|
548
|
-
- spec/utopia/performance_spec/cache/meta/readme.txt
|
549
|
-
- spec/utopia/performance_spec/config.ru
|
550
|
-
- spec/utopia/performance_spec/lib/readme.txt
|
551
|
-
- spec/utopia/performance_spec/pages/_heading.xnode
|
552
|
-
- spec/utopia/performance_spec/pages/_page.xnode
|
553
|
-
- spec/utopia/performance_spec/pages/api/controller.rb
|
554
|
-
- spec/utopia/performance_spec/pages/errors/exception.xnode
|
555
|
-
- spec/utopia/performance_spec/pages/errors/file-not-found.xnode
|
556
|
-
- spec/utopia/performance_spec/pages/links.yaml
|
557
|
-
- spec/utopia/performance_spec/pages/welcome/index.xnode
|
558
|
-
- spec/utopia/rack_helper.rb
|
559
|
-
- spec/utopia/redirection_spec.rb
|
560
|
-
- spec/utopia/redirection_spec.ru
|
561
|
-
- spec/utopia/session_spec.rb
|
562
|
-
- spec/utopia/session_spec.ru
|
563
|
-
- spec/utopia/setup_spec.rb
|
564
|
-
- spec/utopia/static_spec.rb
|
565
|
-
- spec/utopia/static_spec.ru
|
566
|
-
- spec/utopia/static_spec/test.txt
|
567
|
-
- utopia.gemspec
|
568
|
-
- wiki/Gemfile
|
569
|
-
- wiki/config.ru
|
570
|
-
- wiki/pages/development-environment-setup/index.md
|
571
|
-
- wiki/pages/faq/links.yaml
|
572
|
-
- wiki/pages/faq/what-is-xnode/index.md
|
573
|
-
- wiki/pages/faq/what-is-xnode/links.yaml
|
574
|
-
- wiki/pages/index.md
|
575
|
-
- wiki/pages/javascript/index.md
|
576
|
-
- wiki/pages/javascript/links.yaml
|
577
|
-
- wiki/pages/links.yaml
|
578
|
-
- wiki/pages/middleware/content/index.md
|
579
|
-
- wiki/pages/middleware/controller/actions/index.md
|
580
|
-
- wiki/pages/middleware/controller/index.md
|
581
|
-
- wiki/pages/middleware/controller/links.yaml
|
582
|
-
- wiki/pages/middleware/controller/rewrite/index.md
|
583
|
-
- wiki/pages/middleware/localization/index.md
|
584
|
-
- wiki/pages/middleware/redirection/index.md
|
585
|
-
- wiki/pages/middleware/session/index.md
|
586
|
-
- wiki/pages/middleware/static/index.md
|
587
|
-
- wiki/pages/server-setup/index.md
|
588
|
-
- wiki/pages/testing/index.md
|
589
|
-
- wiki/pages/updating-utopia/index.md
|
590
|
-
- wiki/pages/your-first-page/index.md
|
591
376
|
homepage: https://github.com/ioquatix/utopia
|
592
377
|
licenses:
|
593
378
|
- MIT
|
594
|
-
metadata:
|
595
|
-
|
379
|
+
metadata:
|
380
|
+
funding_uri: https://github.com/sponsors/ioquatix/
|
381
|
+
post_install_message:
|
596
382
|
rdoc_options: []
|
597
383
|
require_paths:
|
598
384
|
- lib
|
@@ -608,117 +394,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
608
394
|
version: '0'
|
609
395
|
requirements: []
|
610
396
|
rubygems_version: 3.1.2
|
611
|
-
signing_key:
|
397
|
+
signing_key:
|
612
398
|
specification_version: 4
|
613
399
|
summary: Utopia is a framework for building dynamic content-driven websites.
|
614
|
-
test_files:
|
615
|
-
- spec/mock_node.rb
|
616
|
-
- spec/spec_helper.rb
|
617
|
-
- spec/utopia/command_spec.rb
|
618
|
-
- spec/utopia/content/document_spec.rb
|
619
|
-
- spec/utopia/content/links/bar/index.xnode
|
620
|
-
- spec/utopia/content/links/bar/parent/child/index.en.xnode
|
621
|
-
- spec/utopia/content/links/bar/parent/child/index.ja.xnode
|
622
|
-
- spec/utopia/content/links/bar/parent/links.yaml
|
623
|
-
- spec/utopia/content/links/foo/index.xnode
|
624
|
-
- spec/utopia/content/links/foo/links.yaml
|
625
|
-
- spec/utopia/content/links/foo/test.de.xnode
|
626
|
-
- spec/utopia/content/links/foo/test.en.xnode
|
627
|
-
- spec/utopia/content/links/index.xnode
|
628
|
-
- spec/utopia/content/links/links.yaml
|
629
|
-
- spec/utopia/content/links/redirect/links.yaml
|
630
|
-
- spec/utopia/content/links/welcome.xnode
|
631
|
-
- spec/utopia/content/links_spec.rb
|
632
|
-
- spec/utopia/content/localized/five/index.en.xnode
|
633
|
-
- spec/utopia/content/localized/four/index.en.xnode
|
634
|
-
- spec/utopia/content/localized/four/index.zh.xnode
|
635
|
-
- spec/utopia/content/localized/four/links.yaml
|
636
|
-
- spec/utopia/content/localized/links.yaml
|
637
|
-
- spec/utopia/content/localized/one.xnode
|
638
|
-
- spec/utopia/content/localized/three/index.xnode
|
639
|
-
- spec/utopia/content/localized/two.en.xnode
|
640
|
-
- spec/utopia/content/localized/two.zh.xnode
|
641
|
-
- spec/utopia/content/markup_spec.rb
|
642
|
-
- spec/utopia/content/namespace_spec.rb
|
643
|
-
- spec/utopia/content/node/lookup/content.xnode
|
644
|
-
- spec/utopia/content/node/lookup/index.xnode
|
645
|
-
- spec/utopia/content/node/ordered/first.xnode
|
646
|
-
- spec/utopia/content/node/ordered/index.xnode
|
647
|
-
- spec/utopia/content/node/ordered/links.yaml
|
648
|
-
- spec/utopia/content/node/ordered/second.xnode
|
649
|
-
- spec/utopia/content/node/related/foo.en.xnode
|
650
|
-
- spec/utopia/content/node/related/foo.ja.xnode
|
651
|
-
- spec/utopia/content/node/related/links.yaml
|
652
|
-
- spec/utopia/content/node_spec.rb
|
653
|
-
- spec/utopia/content/response_spec.rb
|
654
|
-
- spec/utopia/content/tags_spec.rb
|
655
|
-
- spec/utopia/content_spec.rb
|
656
|
-
- spec/utopia/content_spec.ru
|
657
|
-
- spec/utopia/content_spec/_heading.xnode
|
658
|
-
- spec/utopia/content_spec/content/_show-value.xnode
|
659
|
-
- spec/utopia/content_spec/content/links.yaml
|
660
|
-
- spec/utopia/content_spec/content/test-partial.xnode
|
661
|
-
- spec/utopia/content_spec/index.xnode
|
662
|
-
- spec/utopia/content_spec/node/index.xnode
|
663
|
-
- spec/utopia/content_spec/test.xnode
|
664
|
-
- spec/utopia/controller/actions_spec.rb
|
665
|
-
- spec/utopia/controller/middleware_spec.rb
|
666
|
-
- spec/utopia/controller/middleware_spec.ru
|
667
|
-
- spec/utopia/controller/middleware_spec/controller/controller.rb
|
668
|
-
- spec/utopia/controller/middleware_spec/controller/index.xnode
|
669
|
-
- spec/utopia/controller/middleware_spec/controller/nested/controller.rb
|
670
|
-
- spec/utopia/controller/middleware_spec/empty/controller.rb
|
671
|
-
- spec/utopia/controller/middleware_spec/redirect/controller.rb
|
672
|
-
- spec/utopia/controller/middleware_spec/redirect/test/controller.rb
|
673
|
-
- spec/utopia/controller/respond_spec.rb
|
674
|
-
- spec/utopia/controller/respond_spec.ru
|
675
|
-
- spec/utopia/controller/respond_spec/api/controller.rb
|
676
|
-
- spec/utopia/controller/respond_spec/errors/controller.rb
|
677
|
-
- spec/utopia/controller/respond_spec/errors/file-not-found.xnode
|
678
|
-
- spec/utopia/controller/respond_spec/html/controller.rb
|
679
|
-
- spec/utopia/controller/respond_spec/rewrite/controller.rb
|
680
|
-
- spec/utopia/controller/rewrite_spec.rb
|
681
|
-
- spec/utopia/controller/sequence_spec.rb
|
682
|
-
- spec/utopia/controller/variables_spec.rb
|
683
|
-
- spec/utopia/controller/websocket_spec.rb
|
684
|
-
- spec/utopia/controller/websocket_spec.ru
|
685
|
-
- spec/utopia/controller/websocket_spec/server/controller.rb
|
686
|
-
- spec/utopia/exceptions/handler_spec.rb
|
687
|
-
- spec/utopia/exceptions/handler_spec.ru
|
688
|
-
- spec/utopia/exceptions/handler_spec/controller.rb
|
689
|
-
- spec/utopia/exceptions/mailer_spec.rb
|
690
|
-
- spec/utopia/exceptions/mailer_spec.ru
|
691
|
-
- spec/utopia/extensions_spec.rb
|
692
|
-
- spec/utopia/http/status_spec.rb
|
693
|
-
- spec/utopia/locale_spec.rb
|
694
|
-
- spec/utopia/localization_spec.rb
|
695
|
-
- spec/utopia/localization_spec.ru
|
696
|
-
- spec/utopia/localization_spec/controller.rb
|
697
|
-
- spec/utopia/localization_spec/localized.de.txt
|
698
|
-
- spec/utopia/localization_spec/localized.en.txt
|
699
|
-
- spec/utopia/localization_spec/localized.ja.txt
|
700
|
-
- spec/utopia/localization_spec/test.txt
|
701
|
-
- spec/utopia/middleware_spec.rb
|
702
|
-
- spec/utopia/path/matcher_spec.rb
|
703
|
-
- spec/utopia/path_spec.rb
|
704
|
-
- spec/utopia/performance_spec.rb
|
705
|
-
- spec/utopia/performance_spec/cache/head/readme.txt
|
706
|
-
- spec/utopia/performance_spec/cache/meta/readme.txt
|
707
|
-
- spec/utopia/performance_spec/config.ru
|
708
|
-
- spec/utopia/performance_spec/lib/readme.txt
|
709
|
-
- spec/utopia/performance_spec/pages/_heading.xnode
|
710
|
-
- spec/utopia/performance_spec/pages/_page.xnode
|
711
|
-
- spec/utopia/performance_spec/pages/api/controller.rb
|
712
|
-
- spec/utopia/performance_spec/pages/errors/exception.xnode
|
713
|
-
- spec/utopia/performance_spec/pages/errors/file-not-found.xnode
|
714
|
-
- spec/utopia/performance_spec/pages/links.yaml
|
715
|
-
- spec/utopia/performance_spec/pages/welcome/index.xnode
|
716
|
-
- spec/utopia/rack_helper.rb
|
717
|
-
- spec/utopia/redirection_spec.rb
|
718
|
-
- spec/utopia/redirection_spec.ru
|
719
|
-
- spec/utopia/session_spec.rb
|
720
|
-
- spec/utopia/session_spec.ru
|
721
|
-
- spec/utopia/setup_spec.rb
|
722
|
-
- spec/utopia/static_spec.rb
|
723
|
-
- spec/utopia/static_spec.ru
|
724
|
-
- spec/utopia/static_spec/test.txt
|
400
|
+
test_files: []
|