utopia 2.18.4 → 2.18.5
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.
- checksums.yaml +4 -4
- data/bake/utopia/node.rb +22 -2
- data/lib/.DS_Store +0 -0
- data/lib/utopia/.DS_Store +0 -0
- data/lib/utopia/content.rb +3 -5
- data/lib/utopia/content/.DS_Store +0 -0
- data/lib/utopia/content/link.rb +6 -0
- data/lib/utopia/controller/.DS_Store +0 -0
- data/lib/utopia/path.rb +6 -0
- data/lib/utopia/version.rb +1 -1
- data/setup/.DS_Store +0 -0
- data/setup/server/.DS_Store +0 -0
- data/setup/site/.DS_Store +0 -0
- data/setup/site/pages/.DS_Store +0 -0
- data/setup/site/public/.DS_Store +0 -0
- metadata +13 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 526a3c6e7bb9c6d338f6b48e0a2967b9c0d5388206059904efd111600c9c9b37
|
4
|
+
data.tar.gz: dd9cb6a66793cd0d621cb6edc843480f0297ef594c2750bacc203c3649091fac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ae7de79938757ecd86a84d35a56d1185955812ab41cc0e29d44a6604ef669bfadbc52f36390e1d19cf53acc7a1f375cf59d484627d899c8ed3bdf3bb78b9927
|
7
|
+
data.tar.gz: 9d193e4f88eb12f346371c738396b555b94315f9dcdd004d9395cff0229887f37ad6f22ee5c87d86a12aa9e65b9ecd174005348e495e14ffda76ad57b930e8c5
|
data/bake/utopia/node.rb
CHANGED
@@ -15,9 +15,11 @@ def update
|
|
15
15
|
|
16
16
|
install_root = root + "public/_components"
|
17
17
|
|
18
|
-
package_root
|
18
|
+
package_paths = expand_package_paths(package_root)
|
19
|
+
|
20
|
+
package_paths.each do |package_path|
|
21
|
+
package_directory = package_path.relative_path_from(package_root)
|
19
22
|
install_path = install_root + package_directory
|
20
|
-
package_path = package_root + package_directory
|
21
23
|
|
22
24
|
dist_path = package_path + 'dist'
|
23
25
|
|
@@ -34,3 +36,21 @@ def update
|
|
34
36
|
FileUtils::Verbose.cp_r File.expand_path(link_path, install_path), install_path
|
35
37
|
end
|
36
38
|
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def expand_package_paths(root, into = [])
|
43
|
+
paths = root.children.select(&:directory?)
|
44
|
+
|
45
|
+
paths.each do |path|
|
46
|
+
basename = path.basename.to_s
|
47
|
+
# Handle organisation sub-directories which start with an '@' symbol:
|
48
|
+
if basename.start_with?('@')
|
49
|
+
expand_package_paths(path, into)
|
50
|
+
else
|
51
|
+
into << path
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
return into
|
56
|
+
end
|
data/lib/.DS_Store
ADDED
Binary file
|
Binary file
|
data/lib/utopia/content.rb
CHANGED
@@ -92,7 +92,7 @@ module Utopia
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
-
# @param path [Path] the
|
95
|
+
# @param path [Path] the request path is an absolute uri path, e.g. `/foo/bar`. If an xnode file exists on disk for this exact path, it is instantiated, otherwise nil.
|
96
96
|
def lookup_node(path, locale = nil)
|
97
97
|
resolve_link(
|
98
98
|
@links.for(path, locale)
|
@@ -100,11 +100,9 @@ module Utopia
|
|
100
100
|
end
|
101
101
|
|
102
102
|
def resolve_link(link)
|
103
|
-
if
|
104
|
-
full_path = File.join(@root, path.dirname, link.key + XNODE_EXTENSION)
|
105
|
-
|
103
|
+
if full_path = link&.full_path(@root)
|
106
104
|
if File.exist?(full_path)
|
107
|
-
return Node.new(self, path, path, full_path)
|
105
|
+
return Node.new(self, link.path, link.path, full_path)
|
108
106
|
end
|
109
107
|
end
|
110
108
|
end
|
Binary file
|
data/lib/utopia/content/link.rb
CHANGED
@@ -50,6 +50,12 @@ module Utopia
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
def full_path(root, extension = XNODE_EXTENSION)
|
54
|
+
if @path&.file?
|
55
|
+
File.join(root, @path.dirname, self.key + XNODE_EXTENSION)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
53
59
|
def href
|
54
60
|
@href ||= @info.fetch(:uri) do
|
55
61
|
@info.fetch(:href) do
|
Binary file
|
data/lib/utopia/path.rb
CHANGED
@@ -136,6 +136,10 @@ module Utopia
|
|
136
136
|
return @components.last == ''
|
137
137
|
end
|
138
138
|
|
139
|
+
def file?
|
140
|
+
return @components.last != ''
|
141
|
+
end
|
142
|
+
|
139
143
|
def to_directory
|
140
144
|
if directory?
|
141
145
|
return self
|
@@ -259,6 +263,8 @@ module Utopia
|
|
259
263
|
end
|
260
264
|
end
|
261
265
|
|
266
|
+
alias last? file?
|
267
|
+
|
262
268
|
# Pops the last path component.
|
263
269
|
def pop
|
264
270
|
# We don't want to convert an absolute path to a relative path.
|
data/lib/utopia/version.rb
CHANGED
data/setup/.DS_Store
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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.18.
|
4
|
+
version: 2.18.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -261,12 +261,15 @@ files:
|
|
261
261
|
- bake/utopia/static.rb
|
262
262
|
- bake/utopia/test.rb
|
263
263
|
- bin/utopia
|
264
|
+
- lib/.DS_Store
|
264
265
|
- lib/utopia.rb
|
266
|
+
- lib/utopia/.DS_Store
|
265
267
|
- lib/utopia/command.rb
|
266
268
|
- lib/utopia/command/environment.rb
|
267
269
|
- lib/utopia/command/server.rb
|
268
270
|
- lib/utopia/command/site.rb
|
269
271
|
- lib/utopia/content.rb
|
272
|
+
- lib/utopia/content/.DS_Store
|
270
273
|
- lib/utopia/content/document.rb
|
271
274
|
- lib/utopia/content/link.rb
|
272
275
|
- lib/utopia/content/links.rb
|
@@ -277,6 +280,7 @@ files:
|
|
277
280
|
- lib/utopia/content/tags.rb
|
278
281
|
- lib/utopia/content_length.rb
|
279
282
|
- lib/utopia/controller.rb
|
283
|
+
- lib/utopia/controller/.DS_Store
|
280
284
|
- lib/utopia/controller/actions.md
|
281
285
|
- lib/utopia/controller/actions.rb
|
282
286
|
- lib/utopia/controller/base.rb
|
@@ -307,7 +311,10 @@ files:
|
|
307
311
|
- lib/utopia/static/local_file.rb
|
308
312
|
- lib/utopia/static/mime_types.rb
|
309
313
|
- lib/utopia/version.rb
|
314
|
+
- setup/.DS_Store
|
315
|
+
- setup/server/.DS_Store
|
310
316
|
- setup/server/git/hooks/post-receive
|
317
|
+
- setup/site/.DS_Store
|
311
318
|
- setup/site/.gitignore
|
312
319
|
- setup/site/.rspec
|
313
320
|
- setup/site/Guardfile
|
@@ -319,12 +326,14 @@ files:
|
|
319
326
|
- setup/site/falcon.rb
|
320
327
|
- setup/site/gems.rb
|
321
328
|
- setup/site/lib/readme.txt
|
329
|
+
- setup/site/pages/.DS_Store
|
322
330
|
- setup/site/pages/_heading.xnode
|
323
331
|
- setup/site/pages/_page.xnode
|
324
332
|
- setup/site/pages/errors/exception.xnode
|
325
333
|
- setup/site/pages/errors/file-not-found.xnode
|
326
334
|
- setup/site/pages/links.yaml
|
327
335
|
- setup/site/pages/welcome/index.xnode
|
336
|
+
- setup/site/public/.DS_Store
|
328
337
|
- setup/site/public/_static/icon.svg
|
329
338
|
- setup/site/public/_static/site.css
|
330
339
|
- setup/site/public/_static/utopia-background.svg
|
@@ -333,6 +342,7 @@ files:
|
|
333
342
|
- setup/site/spec/spec_helper.rb
|
334
343
|
- setup/site/spec/website_context.rb
|
335
344
|
- setup/site/spec/website_spec.rb
|
345
|
+
- setup/site/tmp/Gemfile
|
336
346
|
homepage: https://github.com/ioquatix/utopia
|
337
347
|
licenses:
|
338
348
|
- MIT
|
@@ -353,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
353
363
|
- !ruby/object:Gem::Version
|
354
364
|
version: '0'
|
355
365
|
requirements: []
|
356
|
-
rubygems_version: 3.
|
366
|
+
rubygems_version: 3.2.3
|
357
367
|
signing_key:
|
358
368
|
specification_version: 4
|
359
369
|
summary: Utopia is a framework for building dynamic content-driven websites.
|