phlex-rails 1.2.0 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -1
- data/Appraisals +5 -1
- data/Gemfile +1 -1
- data/lib/phlex/rails/helpers.rb +1 -1
- data/lib/phlex/rails/html/method_missing.rb +1 -1
- data/lib/phlex/rails/layout.rb +2 -3
- data/lib/phlex/rails/sgml.rb +5 -2
- data/lib/phlex/rails/version.rb +1 -1
- data/phlex-rails.gemspec +35 -0
- metadata +16 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0c5e5715ad28ed3d2937ff5c4e10da35d6aa69457b7cd8cd58ebd6bd94184ae
|
4
|
+
data.tar.gz: 94ecf35f601133ec056af07a8f1b3cc6bed10d3a550edcf9a9a0d697e23267a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f1f13b2bb32c567ff85ee1f0fa4a313be93e3b0a8e009577851c4f705bc57a0ada0ec63eadcd9367383728839dd5b55fc194ac41b85681ee3bb8a3700eeec0b
|
7
|
+
data.tar.gz: db527c51816488639f198162089a811eb11e1943a0e3b48dd19fb006ddc0afdf5615a00db2a6bb54ec91c1e4a45c456d7e2f32919f6076f184900e96f4a2c360
|
data/.rubocop.yml
CHANGED
data/Appraisals
CHANGED
data/Gemfile
CHANGED
data/lib/phlex/rails/helpers.rb
CHANGED
@@ -224,7 +224,7 @@ module Phlex::Rails::Helpers
|
|
224
224
|
StyleSheetPath: :StylesheetPath,
|
225
225
|
StyleSheetURL: :StylesheetURL,
|
226
226
|
URLToJavaScript: :URLToJavascript,
|
227
|
-
URLToStyleSheet: :URLToStylesheet
|
227
|
+
URLToStyleSheet: :URLToStylesheet,
|
228
228
|
}
|
229
229
|
|
230
230
|
def self.const_missing(name)
|
@@ -8,6 +8,6 @@ module Phlex::Rails::HTML::MethodMissing
|
|
8
8
|
module_name = Phlex::Rails::Helpers.constants.find { |mod| mod.to_s.underscore.gsub("domid", "dom_id") == const_name }
|
9
9
|
return super unless module_name
|
10
10
|
|
11
|
-
raise NoMethodError
|
11
|
+
raise NoMethodError.new("Try including `Phlex::Rails::Helpers::#{module_name}` in #{self.class.name}.")
|
12
12
|
end
|
13
13
|
end
|
data/lib/phlex/rails/layout.rb
CHANGED
@@ -38,14 +38,13 @@ module Phlex::Rails
|
|
38
38
|
|
39
39
|
def self.included(klass)
|
40
40
|
unless klass < Phlex::HTML
|
41
|
-
raise Phlex::ArgumentError
|
42
|
-
"👋 #{name} should only be included into Phlex::HTML classes."
|
41
|
+
raise Phlex::ArgumentError.new("👋 #{name} should only be included into Phlex::HTML classes.")
|
43
42
|
end
|
44
43
|
|
45
44
|
klass.extend(Interface)
|
46
45
|
end
|
47
46
|
|
48
|
-
def render(view_context, *args, **kwargs, &block)
|
47
|
+
def render(view_context = nil, *args, **kwargs, &block)
|
49
48
|
if @_context
|
50
49
|
super
|
51
50
|
else
|
data/lib/phlex/rails/sgml.rb
CHANGED
@@ -29,8 +29,11 @@ module Phlex
|
|
29
29
|
when Enumerable
|
30
30
|
return super unless renderable.is_a?(ActiveRecord::Relation)
|
31
31
|
else
|
32
|
-
|
33
|
-
|
32
|
+
if block
|
33
|
+
@_context.target << @_view_context.render(*args, **kwargs) { capture(&block) }
|
34
|
+
else
|
35
|
+
@_context.target << @_view_context.render(*args, **kwargs)
|
36
|
+
end
|
34
37
|
end
|
35
38
|
|
36
39
|
nil
|
data/lib/phlex/rails/version.rb
CHANGED
data/phlex-rails.gemspec
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/phlex/rails/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "phlex-rails"
|
7
|
+
spec.version = Phlex::Rails::VERSION
|
8
|
+
spec.authors = ["Joel Drapper"]
|
9
|
+
spec.email = ["joel@drapper.me"]
|
10
|
+
|
11
|
+
spec.summary = "A Phlex adapter for Rails"
|
12
|
+
spec.description = "A high-performance view framework optimised for developer happiness."
|
13
|
+
spec.homepage = "https://www.phlex.fun"
|
14
|
+
spec.license = "MIT"
|
15
|
+
spec.required_ruby_version = ">= 2.7"
|
16
|
+
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/phlex-ruby/phlex-rails"
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/phlex-ruby/phlex-rails/blob/main/CHANGELOG.md"
|
20
|
+
spec.metadata["funding_uri"] = "https://github.com/sponsors/joeldrapper"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.require_paths = ["lib"]
|
30
|
+
|
31
|
+
spec.add_dependency "phlex", ">= 1.10", "< 2"
|
32
|
+
spec.add_dependency "railties", ">= 6.1", "< 9"
|
33
|
+
|
34
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
35
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phlex-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Drapper
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phlex
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.10'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
22
|
+
version: '2'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.10'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
32
|
+
version: '2'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: railties
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -33,7 +39,7 @@ dependencies:
|
|
33
39
|
version: '6.1'
|
34
40
|
- - "<"
|
35
41
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
42
|
+
version: '9'
|
37
43
|
type: :runtime
|
38
44
|
prerelease: false
|
39
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +49,7 @@ dependencies:
|
|
43
49
|
version: '6.1'
|
44
50
|
- - "<"
|
45
51
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
52
|
+
version: '9'
|
47
53
|
description: A high-performance view framework optimised for developer happiness.
|
48
54
|
email:
|
49
55
|
- joel@drapper.me
|
@@ -291,6 +297,7 @@ files:
|
|
291
297
|
- lib/phlex/rails/unbuffered_overrides.rb
|
292
298
|
- lib/phlex/rails/version.rb
|
293
299
|
- lib/phlex/testing/rails/view_helper.rb
|
300
|
+
- phlex-rails.gemspec
|
294
301
|
- phlex_logo.png
|
295
302
|
homepage: https://www.phlex.fun
|
296
303
|
licenses:
|
@@ -316,7 +323,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
316
323
|
- !ruby/object:Gem::Version
|
317
324
|
version: '0'
|
318
325
|
requirements: []
|
319
|
-
rubygems_version: 3.
|
326
|
+
rubygems_version: 3.5.18
|
320
327
|
signing_key:
|
321
328
|
specification_version: 4
|
322
329
|
summary: A Phlex adapter for Rails
|