actiontext 6.0.4.7 → 6.0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +23 -0
- data/app/helpers/action_text/content_helper.rb +1 -0
- data/lib/action_text/attachments/trix_conversion.rb +1 -1
- data/lib/action_text/content.rb +2 -6
- data/lib/action_text/engine.rb +12 -9
- data/lib/action_text/gem_version.rb +2 -2
- data/lib/action_text/rendering.rb +29 -0
- data/lib/action_text.rb +1 -0
- data/package.json +1 -1
- metadata +16 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6791bd84b8baa3e269b4aca66489a6692f50244821685e8622e5edc56506f698
|
4
|
+
data.tar.gz: 69d0f14f83ef82b937dac0e3254a4e61a2cf73a0d0b8abc0d5bc8bd59b0a5af0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89be14985618d343e8894e1077214bc3c2ec73dfeb28e997f0da0a2531f6bbb07a76d2ba515d577c1d98f2d3c4964fd06ab574de912893e055b135cae5d164b4
|
7
|
+
data.tar.gz: 66355ac968eea08bce46c1c91e5ab86f2b6db65c929c60320ebc4af8e726dc2c532c36626979df3cc1c3bd97b6e4bb0a3b6e9c0008b4b6db2c89d839d579166d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
## Rails 6.0.5.1 (July 12, 2022) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 6.0.5 (May 09, 2022) ##
|
7
|
+
|
8
|
+
* Disentangle Action Text from ApplicationController
|
9
|
+
|
10
|
+
Allow Action Text to be used without having an ApplicationController
|
11
|
+
defined.
|
12
|
+
This makes sure:
|
13
|
+
* Action Text attachments render the correct URL host in mailers.
|
14
|
+
* an ActionController::Renderer isn't allocated per request.
|
15
|
+
* Sidekiq doesn't hang with the "classic" autoloader.
|
16
|
+
|
17
|
+
*Jonathan Hefner*
|
18
|
+
|
19
|
+
## Rails 6.0.4.8 (April 26, 2022) ##
|
20
|
+
|
21
|
+
* No changes.
|
22
|
+
|
23
|
+
|
1
24
|
## Rails 6.0.4.7 (March 08, 2022) ##
|
2
25
|
|
3
26
|
* No changes.
|
@@ -26,7 +26,7 @@ module ActionText
|
|
26
26
|
private
|
27
27
|
def trix_attachment_content
|
28
28
|
if partial_path = attachable.try(:to_trix_content_attachment_partial_path)
|
29
|
-
ActionText::Content.
|
29
|
+
ActionText::Content.render(partial: partial_path, object: self, as: model_name.element)
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
data/lib/action_text/content.rb
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "active_support/core_ext/module/attribute_accessors_per_thread"
|
4
|
-
|
5
3
|
module ActionText
|
6
4
|
class Content
|
7
|
-
include Serialization
|
8
|
-
|
9
|
-
thread_cattr_accessor :renderer
|
5
|
+
include Rendering, Serialization
|
10
6
|
|
11
7
|
attr_reader :fragment
|
12
8
|
|
@@ -88,7 +84,7 @@ module ActionText
|
|
88
84
|
end
|
89
85
|
|
90
86
|
def to_rendered_html_with_layout
|
91
|
-
|
87
|
+
render partial: "action_text/content/layout", locals: { content: self }
|
92
88
|
end
|
93
89
|
|
94
90
|
def to_s
|
data/lib/action_text/engine.rb
CHANGED
@@ -37,21 +37,24 @@ module ActionText
|
|
37
37
|
end
|
38
38
|
|
39
39
|
initializer "action_text.helper" do
|
40
|
-
|
41
|
-
|
40
|
+
%i[action_controller_base action_mailer].each do |abstract_controller|
|
41
|
+
ActiveSupport.on_load(abstract_controller) do
|
42
|
+
helper ActionText::Engine.helpers
|
43
|
+
end
|
42
44
|
end
|
43
45
|
end
|
44
46
|
|
45
|
-
initializer "action_text.renderer" do
|
46
|
-
app.executor.to_run { ActionText::Content.renderer = ApplicationController.renderer }
|
47
|
-
app.executor.to_complete { ActionText::Content.renderer = ApplicationController.renderer }
|
48
|
-
|
47
|
+
initializer "action_text.renderer" do
|
49
48
|
ActiveSupport.on_load(:action_text_content) do
|
50
|
-
self.renderer =
|
49
|
+
self.renderer = Class.new(ActionController::Base).renderer
|
51
50
|
end
|
52
51
|
|
53
|
-
|
54
|
-
|
52
|
+
%i[action_controller_base action_mailer].each do |abstract_controller|
|
53
|
+
ActiveSupport.on_load(abstract_controller) do
|
54
|
+
around_action do |controller, action|
|
55
|
+
ActionText::Content.with_renderer(controller, &action)
|
56
|
+
end
|
57
|
+
end
|
55
58
|
end
|
56
59
|
end
|
57
60
|
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "active_support/concern"
|
4
|
+
require "active_support/core_ext/module/attribute_accessors_per_thread"
|
5
|
+
|
6
|
+
module ActionText
|
7
|
+
module Rendering #:nodoc:
|
8
|
+
extend ActiveSupport::Concern
|
9
|
+
|
10
|
+
included do
|
11
|
+
thread_cattr_accessor :renderer, instance_accessor: false
|
12
|
+
delegate :render, to: :class
|
13
|
+
end
|
14
|
+
|
15
|
+
class_methods do
|
16
|
+
def with_renderer(renderer)
|
17
|
+
previous_renderer = self.renderer
|
18
|
+
self.renderer = renderer
|
19
|
+
yield
|
20
|
+
ensure
|
21
|
+
self.renderer = previous_renderer
|
22
|
+
end
|
23
|
+
|
24
|
+
def render(*args, &block)
|
25
|
+
renderer.render_to_string(*args, &block)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/action_text.rb
CHANGED
data/package.json
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actiontext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javan Makhmali
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-07-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -18,56 +18,56 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 6.0.
|
21
|
+
version: 6.0.5.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 6.0.
|
28
|
+
version: 6.0.5.1
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: activerecord
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 6.0.
|
35
|
+
version: 6.0.5.1
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 6.0.
|
42
|
+
version: 6.0.5.1
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: activestorage
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 6.0.
|
49
|
+
version: 6.0.5.1
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 6.0.
|
56
|
+
version: 6.0.5.1
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: actionpack
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 6.0.
|
63
|
+
version: 6.0.5.1
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 6.0.
|
70
|
+
version: 6.0.5.1
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: nokogiri
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/action_text/gem_version.rb
|
123
123
|
- lib/action_text/html_conversion.rb
|
124
124
|
- lib/action_text/plain_text_conversion.rb
|
125
|
+
- lib/action_text/rendering.rb
|
125
126
|
- lib/action_text/serialization.rb
|
126
127
|
- lib/action_text/trix_attachment.rb
|
127
128
|
- lib/action_text/version.rb
|
@@ -135,10 +136,11 @@ licenses:
|
|
135
136
|
- MIT
|
136
137
|
metadata:
|
137
138
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
138
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.0.
|
139
|
-
documentation_uri: https://api.rubyonrails.org/v6.0.
|
139
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.0.5.1/actiontext/CHANGELOG.md
|
140
|
+
documentation_uri: https://api.rubyonrails.org/v6.0.5.1/
|
140
141
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
141
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.0.
|
142
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.0.5.1/actiontext
|
143
|
+
rubygems_mfa_required: 'true'
|
142
144
|
post_install_message:
|
143
145
|
rdoc_options: []
|
144
146
|
require_paths:
|
@@ -154,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
156
|
- !ruby/object:Gem::Version
|
155
157
|
version: '0'
|
156
158
|
requirements: []
|
157
|
-
rubygems_version: 3.
|
159
|
+
rubygems_version: 3.3.3
|
158
160
|
signing_key:
|
159
161
|
specification_version: 4
|
160
162
|
summary: Rich text framework.
|