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 +4 -4
- data/archival.gemspec +1 -1
- data/lib/archival/version.rb +1 -1
- data/lib/tags/asset.rb +4 -2
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0b66a3140671bb0e77bceb609bf3474cd69aa960f7c3de3a9d9931b5c14bb6f
|
4
|
+
data.tar.gz: 8451171849fc29a01f773861b5436dedcf411b91578ace7847a08d02cb53389b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5712c5e1f67f602b667bad310b265991942ad9d4ac3a6fa6d8f1e0ca74808a7aeb4625ccc11a69ca9bec87bfbdf9066430c30e04e9c64c8817ce8f159d4dd003
|
7
|
+
data.tar.gz: 612032276d7031ec758f6023e4c11f438e2e74d7882c4afe359f0e95024ca2be04080662a7dfd04b24b2eb62620343ee22beee87b06ffe03c206a9c06848dfef
|
data/archival.gemspec
CHANGED
data/lib/archival/version.rb
CHANGED
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,
|
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
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.
|
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-
|
11
|
+
date: 2022-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: liquid
|