html-native-rails 0.1.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 +7 -0
- data/lib/html-native-rails.rb +29 -0
- data/lib/html-native-rails/railtie.rb +7 -0
- metadata +73 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: da96dc5b6d47c1bad02bceabcc1a862a786408fc5f060db8a552db1cb937a5d9
|
4
|
+
data.tar.gz: b9adc186eb4d9dc0de7a3aec857834036900efbcf7d53309ea1f44fd5ce7d946
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b9f03df7779f3158bf42690fbcaafefc477c93276571beac7057f3151b4bf71cf6698f14b1d445d9aec29961e290c6543675da0596e2c51dde75c6afd84844b6
|
7
|
+
data.tar.gz: 51b0a4b296ce570c3d7bf1905d740ca1151d69f800dbbb6bdaf6a310cf3084ccb1c7d464b7a1621961d698c13fcb617fb3cf6bf16811279281a228d4f8cb3f8a
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require "html-native"
|
2
|
+
require "rails"
|
3
|
+
|
4
|
+
# HTMLComponent is included in ActionView::Base to make sure the HTMLComponent
|
5
|
+
# methods are available for rendering.
|
6
|
+
class ActionView::Base
|
7
|
+
include HTMLComponent
|
8
|
+
end
|
9
|
+
|
10
|
+
# As a note to my future self, restricting that to be specifically included
|
11
|
+
# when the view is first rendered might be a better idea, though I don't quite
|
12
|
+
# know how I'd do that right now.
|
13
|
+
|
14
|
+
class HTMLComponent::Builder
|
15
|
+
# Converts the Builder instance to an HTML-safe String. This does not
|
16
|
+
# guarantee the string is valid HTML, just safe.
|
17
|
+
def to_s
|
18
|
+
@strings.join(" ").html_safe
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
module HTMLNativeRails
|
23
|
+
def self.call(template, source)
|
24
|
+
source
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# ActionView::Template.register_template_handler(:rbh, HTMLNativeRails)
|
29
|
+
require "html-native-rails/railtie" # no if defined? check. I already included "rails"
|
metadata
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: html-native-rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kellen Watt
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-01-30 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: html-native
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '6'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '6'
|
41
|
+
description: An html generation DSL designed for fluid code integration. Now with
|
42
|
+
added Rails support!
|
43
|
+
email:
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- lib/html-native-rails.rb
|
49
|
+
- lib/html-native-rails/railtie.rb
|
50
|
+
homepage: https://github.com/KellenWatt/html-native/rails
|
51
|
+
licenses:
|
52
|
+
- MIT
|
53
|
+
metadata: {}
|
54
|
+
post_install_message:
|
55
|
+
rdoc_options: []
|
56
|
+
require_paths:
|
57
|
+
- lib
|
58
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
requirements: []
|
69
|
+
rubygems_version: 3.1.4
|
70
|
+
signing_key:
|
71
|
+
specification_version: 4
|
72
|
+
summary: html-native, but as a Rails template engine
|
73
|
+
test_files: []
|