vident-typed-phlex 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 12eb9aa5550366e02e2684dac229f9b859ab1af731d166cf238143cbf63437dc
4
+ data.tar.gz: deb17c92e9aaa80075f34cbb91b0a8b5115955848d80d35d3d45f87d094f95b7
5
+ SHA512:
6
+ metadata.gz: 106bf47a5fbf4ccbe2ebe74809d22aba45c65819bca2f8871b056f9daa112b1a6a1eae3917039c913127f3be3982fd2933656442cae520f1b66be1c2cf89e747
7
+ data.tar.gz: 2cad99582ecb49af4660bfe2e877630855956cf10803a1192d5cf29cf4a8366edf6828e6bd7dd5ba6a6f4c0e8d70c956e63c3fb9a056eba62aec2eef1c69aafb
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # Vident::Typed::Phlex
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem "vident-typed-phlex"
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install vident-typed-phlex
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :vident_typed_phlex do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,20 @@
1
+ module Vident
2
+ module Typed
3
+ module Phlex
4
+ class Engine < ::Rails::Engine
5
+ lib_path = File.expand_path("../../../../../lib/", __FILE__)
6
+ config.autoload_paths << lib_path
7
+ config.eager_load_paths << lib_path
8
+
9
+ config.before_initialize do
10
+ Rails.autoloaders.each do |autoloader|
11
+ autoloader.inflector.inflect(
12
+ "html" => "HTML",
13
+ "version" => "VERSION"
14
+ )
15
+ end
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,27 @@
1
+ # frozen-string-literal: true
2
+
3
+ module Vident
4
+ module Typed
5
+ module Phlex
6
+ class HTML < ::Phlex::HTML
7
+ include ::Vident::Typed::Component
8
+
9
+ class << self
10
+ # Phlex uses a DSL to define the document, and those methods could easily clash with our attribute
11
+ # accessors. Therefore in Phlex components we do not create attribute accessors, and instead use instance
12
+ # variables directly.
13
+ def attribute(name, signature = :any, **options, &converter)
14
+ options[:delegates] = false
15
+ super
16
+ end
17
+ end
18
+
19
+ # Helper to create the main element
20
+ def parent_element(**options)
21
+ @parent_element ||= ::Vident::Phlex::RootComponent.new(**parent_element_attributes(options))
22
+ end
23
+ alias_method :root, :parent_element
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,7 @@
1
+ module Vident
2
+ module Typed
3
+ module Phlex
4
+ VERSION = "0.1.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ require "vident/typed/phlex/version"
2
+ require "vident/typed/phlex/engine"
3
+
4
+ module Vident
5
+ module Typed
6
+ module Phlex
7
+ # Your code goes here...
8
+ end
9
+ end
10
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: vident-typed-phlex
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Stephen Ierodiaconou
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-04-01 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '7'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: vident-phlex
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.1.0
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '1'
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 0.1.0
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '1'
47
+ - !ruby/object:Gem::Dependency
48
+ name: vident-typed
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 0.1.0
54
+ - - "<"
55
+ - !ruby/object:Gem::Version
56
+ version: '1'
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 0.1.0
64
+ - - "<"
65
+ - !ruby/object:Gem::Version
66
+ version: '1'
67
+ description: Vident with Phlex & typed attributes
68
+ email:
69
+ - stevegeek@gmail.com
70
+ executables: []
71
+ extensions: []
72
+ extra_rdoc_files: []
73
+ files:
74
+ - README.md
75
+ - Rakefile
76
+ - lib/tasks/vident/typed/phlex_tasks.rake
77
+ - lib/vident/typed/phlex.rb
78
+ - lib/vident/typed/phlex/engine.rb
79
+ - lib/vident/typed/phlex/html.rb
80
+ - lib/vident/typed/phlex/version.rb
81
+ homepage: https://github.com/stevegeek/vident-typed-phlex
82
+ licenses:
83
+ - MIT
84
+ metadata:
85
+ homepage_uri: https://github.com/stevegeek/vident-typed-phlex
86
+ source_code_uri: https://github.com/stevegeek/vident-typed-phlex
87
+ changelog_uri: https://github.com/stevegeek/vident-typed-phlex/blob/main/CHANGELOG.md
88
+ post_install_message:
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubygems_version: 3.4.6
104
+ signing_key:
105
+ specification_version: 4
106
+ summary: Vident with Phlex & typed attributes
107
+ test_files: []