vident-phlex 0.1.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b3f57652bc326a7ed139dfa36ac6753eeb925a76c895d4a08f05a22e463a846
4
- data.tar.gz: 9f221a164fe0ef827595c73aa51339a6b2ca556d6127bedcbefd7e9f2ee6ce6d
3
+ metadata.gz: 01fdc288b02728f29b9cb62d423991a69571d8b65cb7c60a06fa884f6515cf52
4
+ data.tar.gz: 7b0852b10647e0ad7e83ed025118d8fbe2487ff89f6b18420fdc5ef7ee01ffa4
5
5
  SHA512:
6
- metadata.gz: 3d19da664b01409b656e45ae400a1ca7622c8c3653db62347888d887ffc0d014723a7175e8d40a9363c2009f165512713abc3bb2cec94ad5dab3026d7c2fed7c
7
- data.tar.gz: 0aee2eaaa771af432cc1330715c52591be9269e3b9a96339c17c7ad62c09333e7b501c77de40d84286ee1ea3c004b86cd5a5b0c764577674e21807f1def1cc01
6
+ metadata.gz: '089ed6bb5951a0732656353a2debf807b28ae869a0d175b4443c8245bd9545236e63e7aa209b13a01e6f93cccabeeba96f812c07150cfe5e629b73541acd8c94'
7
+ data.tar.gz: 4ebc7801536958604147ef70869421b35158641032238e84e1927b8de923ab964fd8b12e4e2bbe7af07558a901a8ece54e289f2f079cce158cd3598afeb8d027
data/README.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Vident::Phlex
2
- Short description and motivation.
2
+
3
+ [Phlex](https://phlex.fun/) powered [Vident](https://github.com/stevegeek/vident) components.
4
+
5
+ ```ruby
6
+ class ApplicationComponent < ::Vident::Phlex::HTML
7
+ end
8
+ ```
9
+
10
+ For more details see [vident](https://github.com/stevegeek/vident).
3
11
 
4
12
  ## Usage
5
13
  How to use my plugin.
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Vident
4
+ module Phlex
5
+ class Core < ::Phlex::HTML
6
+ class << self
7
+ def inherited(subclass)
8
+ subclass.component_source_file_path = caller_locations(1, 10).reject { |l| l.label == "inherited" }[0].path
9
+ super
10
+ end
11
+
12
+ attr_accessor :component_source_file_path
13
+
14
+ # Caching support
15
+ def current_component_modified_time
16
+ path = component_source_file_path
17
+ raise StandardError, "No component source file exists #{path}" unless path && ::File.exist?(path)
18
+ ::File.mtime(path).to_i.to_s
19
+ end
20
+ end
21
+
22
+ # Helper to create the main element
23
+ def parent_element(**options)
24
+ @parent_element ||= ::Vident::Phlex::RootComponent.new(**parent_element_attributes(options))
25
+ end
26
+ alias_method :root, :parent_element
27
+ end
28
+ end
29
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Vident
4
4
  module Phlex
5
- class HTML < ::Phlex::HTML
5
+ class HTML < Core
6
6
  include ::Vident::Component
7
7
 
8
8
  class << self
@@ -14,12 +14,6 @@ module Vident
14
14
  super
15
15
  end
16
16
  end
17
-
18
- # Helper to create the main element
19
- def parent_element(**options)
20
- @parent_element ||= RootComponent.new(**parent_element_attributes(options))
21
- end
22
- alias_method :root, :parent_element
23
17
  end
24
18
  end
25
19
  end
@@ -1,5 +1,5 @@
1
1
  module Vident
2
2
  module Phlex
3
- VERSION = "0.1.0"
3
+ VERSION = "0.3.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.3.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-12 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'
@@ -101,6 +101,7 @@ files:
101
101
  - Rakefile
102
102
  - lib/tasks/vident/phlex_tasks.rake
103
103
  - lib/vident/phlex.rb
104
+ - lib/vident/phlex/core.rb
104
105
  - lib/vident/phlex/engine.rb
105
106
  - lib/vident/phlex/html.rb
106
107
  - lib/vident/phlex/root_component.rb
@@ -127,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
128
  - !ruby/object:Gem::Version
128
129
  version: '0'
129
130
  requirements: []
130
- rubygems_version: 3.4.6
131
+ rubygems_version: 3.4.10
131
132
  signing_key:
132
133
  specification_version: 4
133
134
  summary: Vident with Phlex