utopia 2.16.1 → 2.16.2
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.rb +7 -5
- data/lib/utopia/path.rb +9 -1
- data/lib/utopia/version.rb +1 -1
- metadata +2 -12
- data/lib/.DS_Store +0 -0
- data/lib/utopia/.DS_Store +0 -0
- data/lib/utopia/content/.DS_Store +0 -0
- data/lib/utopia/controller/.DS_Store +0 -0
- 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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1833aabc2d72234952e6ee164138d234cafc5d0d2015b64edcb28cead480c95
|
4
|
+
data.tar.gz: d6e9675b9921ae290547c25b11c8b5974860256393c65147705d0dd1472ba851
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd8ee2bdd633f9bcd10be1bd18db664299e9cc8c16169ad7d84d934ba8abb301037d0a0f459608087204cd43ac51eb155e88c4af2e988d03b2c29859df5fc2a3
|
7
|
+
data.tar.gz: 4a16550958bc3ddf8fc37760f8436cc450d3e84ee2178ba6f194ce557869e0e20bfee0f3412eb6f2364c7f5ccc831da2b8f440fce11a81e8fc7f436914d64dde
|
data/lib/utopia/content.rb
CHANGED
@@ -177,17 +177,19 @@ module Utopia
|
|
177
177
|
end
|
178
178
|
|
179
179
|
def content_tag(name, node)
|
180
|
-
|
180
|
+
full_path = node.parent_path + name
|
181
|
+
|
182
|
+
name = full_path.pop
|
181
183
|
|
182
184
|
# If the current node is called 'foo', we can't lookup 'foo' in the current directory or we will have infinite recursion.
|
183
|
-
|
184
|
-
|
185
|
+
while full_path.last == name
|
186
|
+
full_path.pop
|
185
187
|
end
|
186
188
|
|
187
|
-
cache_key =
|
189
|
+
cache_key = full_path + name
|
188
190
|
|
189
191
|
@node_cache.fetch_or_store(cache_key) do
|
190
|
-
lookup_content(name,
|
192
|
+
lookup_content(name, full_path)
|
191
193
|
end
|
192
194
|
end
|
193
195
|
end
|
data/lib/utopia/path.rb
CHANGED
@@ -235,6 +235,14 @@ module Utopia
|
|
235
235
|
return self.class.new(result)
|
236
236
|
end
|
237
237
|
|
238
|
+
def pop
|
239
|
+
@components.pop
|
240
|
+
end
|
241
|
+
|
242
|
+
def last
|
243
|
+
@components.last
|
244
|
+
end
|
245
|
+
|
238
246
|
# @return [String] the last path component without any file extension.
|
239
247
|
def basename
|
240
248
|
basename, _ = @components.last.split('.', 2)
|
@@ -284,7 +292,7 @@ module Utopia
|
|
284
292
|
end
|
285
293
|
|
286
294
|
def split(at)
|
287
|
-
if at.kind_of?
|
295
|
+
if at.kind_of?(String)
|
288
296
|
at = @components.index(at)
|
289
297
|
end
|
290
298
|
|
data/lib/utopia/version.rb
CHANGED
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.16.
|
4
|
+
version: 2.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -303,15 +303,12 @@ files:
|
|
303
303
|
- bake/utopia/static.rb
|
304
304
|
- bake/utopia/test.rb
|
305
305
|
- bin/utopia
|
306
|
-
- lib/.DS_Store
|
307
306
|
- lib/utopia.rb
|
308
|
-
- lib/utopia/.DS_Store
|
309
307
|
- lib/utopia/command.rb
|
310
308
|
- lib/utopia/command/environment.rb
|
311
309
|
- lib/utopia/command/server.rb
|
312
310
|
- lib/utopia/command/site.rb
|
313
311
|
- lib/utopia/content.rb
|
314
|
-
- lib/utopia/content/.DS_Store
|
315
312
|
- lib/utopia/content/document.rb
|
316
313
|
- lib/utopia/content/link.rb
|
317
314
|
- lib/utopia/content/links.rb
|
@@ -322,7 +319,6 @@ files:
|
|
322
319
|
- lib/utopia/content/tags.rb
|
323
320
|
- lib/utopia/content_length.rb
|
324
321
|
- lib/utopia/controller.rb
|
325
|
-
- lib/utopia/controller/.DS_Store
|
326
322
|
- lib/utopia/controller/actions.rb
|
327
323
|
- lib/utopia/controller/base.rb
|
328
324
|
- lib/utopia/controller/respond.rb
|
@@ -351,10 +347,7 @@ files:
|
|
351
347
|
- lib/utopia/static/local_file.rb
|
352
348
|
- lib/utopia/static/mime_types.rb
|
353
349
|
- lib/utopia/version.rb
|
354
|
-
- setup/.DS_Store
|
355
|
-
- setup/server/.DS_Store
|
356
350
|
- setup/server/git/hooks/post-receive
|
357
|
-
- setup/site/.DS_Store
|
358
351
|
- setup/site/.gitignore
|
359
352
|
- setup/site/.rspec
|
360
353
|
- setup/site/Gemfile
|
@@ -366,14 +359,12 @@ files:
|
|
366
359
|
- setup/site/config/environment.rb
|
367
360
|
- setup/site/falcon.rb
|
368
361
|
- setup/site/lib/readme.txt
|
369
|
-
- setup/site/pages/.DS_Store
|
370
362
|
- setup/site/pages/_heading.xnode
|
371
363
|
- setup/site/pages/_page.xnode
|
372
364
|
- setup/site/pages/errors/exception.xnode
|
373
365
|
- setup/site/pages/errors/file-not-found.xnode
|
374
366
|
- setup/site/pages/links.yaml
|
375
367
|
- setup/site/pages/welcome/index.xnode
|
376
|
-
- setup/site/public/.DS_Store
|
377
368
|
- setup/site/public/_static/icon.png
|
378
369
|
- setup/site/public/_static/site.css
|
379
370
|
- setup/site/public/_static/utopia-background.svg
|
@@ -382,7 +373,6 @@ files:
|
|
382
373
|
- setup/site/spec/spec_helper.rb
|
383
374
|
- setup/site/spec/website_context.rb
|
384
375
|
- setup/site/spec/website_spec.rb
|
385
|
-
- setup/site/tmp/Gemfile
|
386
376
|
homepage: https://github.com/ioquatix/utopia
|
387
377
|
licenses:
|
388
378
|
- MIT
|
data/lib/.DS_Store
DELETED
Binary file
|
data/lib/utopia/.DS_Store
DELETED
Binary file
|
Binary file
|
Binary file
|
data/setup/.DS_Store
DELETED
Binary file
|
data/setup/server/.DS_Store
DELETED
Binary file
|
data/setup/site/.DS_Store
DELETED
Binary file
|
data/setup/site/pages/.DS_Store
DELETED
Binary file
|
data/setup/site/public/.DS_Store
DELETED
Binary file
|