vident-phlex 0.1.0 → 0.2.0

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: 5b3f57652bc326a7ed139dfa36ac6753eeb925a76c895d4a08f05a22e463a846
4
- data.tar.gz: 9f221a164fe0ef827595c73aa51339a6b2ca556d6127bedcbefd7e9f2ee6ce6d
3
+ metadata.gz: 731f9c7918cc00ef43f05fc30ad246d168c2a5484d1ed2e56be7133b38ef5898
4
+ data.tar.gz: fe49bbf87d991a04eca3f7796d8a8fdb1fc1b6ed04ba69e03d7ae2f8fe8274b0
5
5
  SHA512:
6
- metadata.gz: 3d19da664b01409b656e45ae400a1ca7622c8c3653db62347888d887ffc0d014723a7175e8d40a9363c2009f165512713abc3bb2cec94ad5dab3026d7c2fed7c
7
- data.tar.gz: 0aee2eaaa771af432cc1330715c52591be9269e3b9a96339c17c7ad62c09333e7b501c77de40d84286ee1ea3c004b86cd5a5b0c764577674e21807f1def1cc01
6
+ metadata.gz: d439e0ba255d7fd23f06669906ca1abdc482dfbc1e097178709760575c129e9ba37e6cafaf1140f4977e19484b9e59a2ca07441555f7467e420a2007378d1f08
7
+ data.tar.gz: 6ed48a31f50e9ccb3f19df915c4720cbfc0eb37d47ba3f5c503c41604e64c9038d024e2268cc76a3015e79198668723d9bdc47e74fb864c7ede101cc97f246a8
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Vident
2
2
  module Phlex
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
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.1.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-04-01 00:00:00.000000000 Z
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.8.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.8.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.6
130
+ rubygems_version: 3.4.10
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Vident with Phlex