vident-phlex 0.1.0 → 0.2.0
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/lib/vident/phlex/html.rb +14 -0
- data/lib/vident/phlex/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 731f9c7918cc00ef43f05fc30ad246d168c2a5484d1ed2e56be7133b38ef5898
|
|
4
|
+
data.tar.gz: fe49bbf87d991a04eca3f7796d8a8fdb1fc1b6ed04ba69e03d7ae2f8fe8274b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d439e0ba255d7fd23f06669906ca1abdc482dfbc1e097178709760575c129e9ba37e6cafaf1140f4977e19484b9e59a2ca07441555f7467e420a2007378d1f08
|
|
7
|
+
data.tar.gz: 6ed48a31f50e9ccb3f19df915c4720cbfc0eb37d47ba3f5c503c41604e64c9038d024e2268cc76a3015e79198668723d9bdc47e74fb864c7ede101cc97f246a8
|
data/lib/vident/phlex/html.rb
CHANGED
|
@@ -6,6 +6,11 @@ module Vident
|
|
|
6
6
|
include ::Vident::Component
|
|
7
7
|
|
|
8
8
|
class << self
|
|
9
|
+
def inherited(subclass)
|
|
10
|
+
subclass.component_source_file_path = caller_locations(1, 10).reject { |l| l.label == "inherited" }[0].path
|
|
11
|
+
super
|
|
12
|
+
end
|
|
13
|
+
|
|
9
14
|
# Phlex uses a DSL to define the document, and those methods could easily clash with our attribute
|
|
10
15
|
# accessors. Therefore in Phlex components we do not create attribute accessors, and instead use instance
|
|
11
16
|
# variables directly.
|
|
@@ -13,6 +18,15 @@ module Vident
|
|
|
13
18
|
options[:delegates] = false
|
|
14
19
|
super
|
|
15
20
|
end
|
|
21
|
+
|
|
22
|
+
attr_accessor :component_source_file_path
|
|
23
|
+
|
|
24
|
+
# Caching support
|
|
25
|
+
def current_component_modified_time
|
|
26
|
+
path = component_source_file_path
|
|
27
|
+
raise StandardError, "No component source file exists #{path}" unless path && ::File.exist?(path)
|
|
28
|
+
::File.mtime(path).to_i.to_s
|
|
29
|
+
end
|
|
16
30
|
end
|
|
17
31
|
|
|
18
32
|
# Helper to create the main element
|
data/lib/vident/phlex/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vident-phlex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stephen Ierodiaconou
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-08-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -36,7 +36,7 @@ dependencies:
|
|
|
36
36
|
requirements:
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 0.
|
|
39
|
+
version: 0.9.0
|
|
40
40
|
- - "<"
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
42
|
version: '1'
|
|
@@ -46,7 +46,7 @@ dependencies:
|
|
|
46
46
|
requirements:
|
|
47
47
|
- - ">="
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
|
-
version: 0.
|
|
49
|
+
version: 0.9.0
|
|
50
50
|
- - "<"
|
|
51
51
|
- !ruby/object:Gem::Version
|
|
52
52
|
version: '1'
|
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
127
127
|
- !ruby/object:Gem::Version
|
|
128
128
|
version: '0'
|
|
129
129
|
requirements: []
|
|
130
|
-
rubygems_version: 3.4.
|
|
130
|
+
rubygems_version: 3.4.10
|
|
131
131
|
signing_key:
|
|
132
132
|
specification_version: 4
|
|
133
133
|
summary: Vident with Phlex
|