archival 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd9c755847bfaabb7c6dee0882426534c44c7130a8cbfe84a45b755bca91088a
4
- data.tar.gz: 3bbd4cb0b322db5eff11b85d9afc9f76e4cdbe1bc166c530f015583369c7f141
3
+ metadata.gz: e0b66a3140671bb0e77bceb609bf3474cd69aa960f7c3de3a9d9931b5c14bb6f
4
+ data.tar.gz: 8451171849fc29a01f773861b5436dedcf411b91578ace7847a08d02cb53389b
5
5
  SHA512:
6
- metadata.gz: db20449d88ba3394580bd5efebd259a7479bd423fea6983a4790e21d124d831490f4e9f4bea3fe97411cc2b72898e93534be2b34d122e6c93e47290381cd74b3
7
- data.tar.gz: f25b29c4fdb0b676dcee6156ab571877764ead475cac70944c6e81a1f5c445b3ebaf07b7266087b3163209184cf2c9dc50f33797105b8abb3a8e2564a19861c2
6
+ metadata.gz: 5712c5e1f67f602b667bad310b265991942ad9d4ac3a6fa6d8f1e0ca74808a7aeb4625ccc11a69ca9bec87bfbdf9066430c30e04e9c64c8817ce8f159d4dd003
7
+ data.tar.gz: 612032276d7031ec758f6023e4c11f438e2e74d7882c4afe359f0e95024ca2be04080662a7dfd04b24b2eb62620343ee22beee87b06ffe03c206a9c06848dfef
data/archival.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'archival'
5
- s.version = '0.0.9'
5
+ s.version = '0.0.10'
6
6
  s.summary = 'An incredibly simple CMS for durable websites'
7
7
  s.description = 'https://jesseditson.com/the-simplest-cms-part-1'
8
8
  s.authors = ['Jesse Ditson']
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Archival
4
- VERSION = '0.0.9'
4
+ VERSION = '0.0.10'
5
5
  end
data/lib/tags/asset.rb CHANGED
@@ -14,7 +14,7 @@ class Asset < Liquid::Tag
14
14
 
15
15
  prepend Liquid::Tag::Disableable
16
16
 
17
- SYNTAX = /(#{Liquid::QuotedFragment}+)/o.freeze
17
+ SYNTAX = /(#{Liquid::QuotedFragment}+|\w+)/o.freeze
18
18
 
19
19
  def initialize(tag_name, markup, tokens)
20
20
  super
@@ -41,6 +41,8 @@ class Asset < Liquid::Tag
41
41
  end
42
42
 
43
43
  def render_to_output_buffer(context, output)
44
+ path = @path
45
+ path = path.evaluate(context) if path.is_a? Liquid::VariableLookup
44
46
  unless @@root_dir
45
47
  raise AssetError,
46
48
  'root_dir must be set on Archival::Asset'
@@ -51,7 +53,7 @@ class Asset < Liquid::Tag
51
53
  'template_path must be provided to parse when using assets'
52
54
  end
53
55
  template_path = File.dirname(context['template_path'])
54
- abs_asset_path = Pathname.new(File.join(@@root_dir, @path))
56
+ abs_asset_path = Pathname.new(File.join(@@root_dir, path))
55
57
  asset_path = abs_asset_path.relative_path_from(template_path).cleanpath.to_s
56
58
  output << if @attributes['serve'] == true
57
59
  "http://localhost:#{@@helper_port}/#{asset_path}"
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archival",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "An incredibly simple CMS for durable websites",
5
5
  "bin": "build.rb",
6
6
  "directories": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: archival
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Ditson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-16 00:00:00.000000000 Z
11
+ date: 2022-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: liquid