dato-rails 0.12.0 → 0.12.1

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: 5e19e4ce3d305f7b0231b2eb8f1a8b7d66656651d6d7686f242bd87863dea8a0
4
- data.tar.gz: 5b6800b3523761a387c1fa22c552b66dcd0939fde9627797aa814f77211f353e
3
+ metadata.gz: 8deafc18f10be673f5349ce8eee374fd4d2cffda9935d9ba1d5809b464e7daec
4
+ data.tar.gz: 6ff76199a809434bf91d4f9db8db9766bdb21a8d1385123cb4a2a985b345a20a
5
5
  SHA512:
6
- metadata.gz: '0846ce4508a65f97adc2e769f2162f26248db1fde01317706219c9c14824b3037419ce4e4c9804cacac35f05e00afa52c0b446f49edb043e29815883d52788d8'
7
- data.tar.gz: a5cf7c55353ff9b02f446202c366216f59ffec50e4adda2718649574372f8cbe6db98ec63035d379812b773ade61a76c45636feea361e86c1dea45edf55890d9
6
+ metadata.gz: 1c3a256fc03848d9366dd73b447cc6f7e34bfb72e88a8ac406c19aad8625606cb9eb72ca173e3ccc80556c6efc0387de152b33eccb4a87740f50f631c8e1e6ac
7
+ data.tar.gz: d806381a4158cdcba8d3655c2cf606a95d315c318009f6cdbc21b009a320d8db206a5f60a15b8fd025e7072394fb184c2a5b9b0c74c727a10ed643bc751ee888
@@ -29,6 +29,7 @@ module Dato
29
29
  # Get the type of the immediate parent node
30
30
  # @return [String, nil] the parent's type or nil if no parent
31
31
  def node_type = node&.type
32
+
32
33
  def parent_type = parent&.node_type
33
34
 
34
35
  def blocks
@@ -5,7 +5,6 @@ class Dato::Span < Dato::DastNode
5
5
  super(node, "span", root, parent)
6
6
  end
7
7
 
8
-
9
8
  def wrap_styles(&block)
10
9
  wrapping_symbols = ""
11
10
  wrapping_symbols += "**" if @node.marks&.include?("strong")
@@ -20,7 +19,7 @@ class Dato::Span < Dato::DastNode
20
19
  mapping = {
21
20
  emphasis: "font-style: italic",
22
21
  strong: "font-weight: bold",
23
- highlight: "background-color: var(--dato-highlight-color, yellow)",
22
+ highlight: "background-color: var(--dato-highlight-color, yellow)"
24
23
  }.with_indifferent_access
25
24
 
26
25
  text_decoration_mappings = {
@@ -2,6 +2,9 @@ module Dato
2
2
  class LiveController < ActionController::Base
3
3
  def create
4
4
  @data = Hashie::Mash.new(JSON.parse(params[:data], symbolize_names: true).dig(:response, :data))
5
+ # Ensure HTML format is available for ViewComponent template resolution
6
+ # ViewComponent 4 requires explicit format matching
7
+ lookup_context.formats |= [:html]
5
8
  end
6
9
  end
7
10
  end
data/lib/dato/config.rb CHANGED
@@ -11,12 +11,8 @@ module Dato
11
11
  class_attribute :base_editing_url, default: ENV.fetch("DATO_BASE_EDITING_URL", Rails.application.credentials.dig(:dato, :base_editing_url))
12
12
  class_attribute :mount_path, default: "/dato"
13
13
 
14
- def self.configuration
15
- @configuration ||= Config.new
16
- end
17
-
18
14
  def self.configure
19
- yield configuration
15
+ yield self
20
16
  end
21
17
  end
22
18
  end
data/lib/dato/engine.rb CHANGED
@@ -4,6 +4,10 @@ module Dato
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace Dato
6
6
 
7
+ initializer "dato_rails.mime_types", before: :load_config_initializers do
8
+ Mime::Type.register "text/markdown", :md unless Mime::Type.lookup_by_extension(:md)
9
+ end
10
+
7
11
  initializer "dato_rails.action_controller" do
8
12
  ActiveSupport.on_load(:action_controller) do
9
13
  include Dato::Railties::ControllerRuntime
data/lib/dato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dato
2
- VERSION = "0.12.0"
2
+ VERSION = "0.12.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dato-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Rodi
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-01-15 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rspec-rails
@@ -99,42 +99,42 @@ dependencies:
99
99
  requirements:
100
100
  - - ">="
101
101
  - !ruby/object:Gem::Version
102
- version: '2.0'
102
+ version: '4.0'
103
103
  type: :runtime
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '2.0'
109
+ version: '4.0'
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: rails
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '6'
116
+ version: '8'
117
117
  type: :runtime
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - ">="
122
122
  - !ruby/object:Gem::Version
123
- version: '6'
123
+ version: '8'
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: turbo-rails
126
126
  requirement: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: '1'
130
+ version: '2'
131
131
  type: :runtime
132
132
  prerelease: false
133
133
  version_requirements: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: '1'
137
+ version: '2'
138
138
  - !ruby/object:Gem::Dependency
139
139
  name: gqli
140
140
  requirement: !ruby/object:Gem::Requirement
@@ -273,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
273
273
  - !ruby/object:Gem::Version
274
274
  version: '0'
275
275
  requirements: []
276
- rubygems_version: 3.6.2
276
+ rubygems_version: 4.0.2
277
277
  specification_version: 4
278
278
  summary: Use Dato CMS in your Rails application.
279
279
  test_files: []