liquidum 1.2.0 → 1.2.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 +4 -4
- data/app/controllers/liquidum/sandbox_controller.rb +11 -10
- data/app/tables/liquidum/application_table.rb +4 -0
- data/app/views/liquidum/conversions/index.html.slim +2 -2
- data/app/views/liquidum/sandbox/edit.html.slim +3 -3
- data/app/views/liquidum/sandbox/index.html.slim +1 -1
- data/lib/liquidum/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d329e99f05c6d46b176299ca0c2feac75ae3e5aeeb4b8bea0eb472b8cc6c6390
|
4
|
+
data.tar.gz: b48bbd71720359afc2124fad497a4c73b3a51ec823e245cce996d733f941e511
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57b9531c2f52655fd04cf0432b3e87375facd2dab8f79d8c1d9c480f4a946d54ecf85175319b2f1433050ac85a8bb3a4d596143f9ce7cdc063fc9f60cc249c5c
|
7
|
+
data.tar.gz: b50bbe44304824e22b1cbc0e5bb92ffcbcfec7c2676c2b3caa5d335a3d99e9957663f3f1c58c65e3377b2ad3d40b8f0cd3e32110c2997430106131d04118d2e4
|
@@ -1,23 +1,24 @@
|
|
1
|
-
require_dependency
|
1
|
+
require_dependency "liquidum/application_controller"
|
2
2
|
|
3
3
|
module Liquidum
|
4
4
|
class SandboxController < ApplicationController
|
5
|
-
before_action :set_objects, except: %i[index
|
5
|
+
before_action :set_objects, except: %i[index]
|
6
6
|
|
7
|
-
def index
|
7
|
+
def index
|
8
|
+
end
|
8
9
|
|
9
10
|
def new
|
10
11
|
render :edit
|
11
12
|
end
|
12
13
|
|
13
14
|
def create
|
14
|
-
return render_only if params[:render_only] ==
|
15
|
+
return render_only if params[:render_only] == "commit"
|
15
16
|
|
16
17
|
@sandbox.update(sandbox_attributes)
|
17
18
|
|
18
19
|
respond_with @sandbox,
|
19
|
-
|
20
|
-
|
20
|
+
collection_location: -> { edit_sandbox_path(@sandbox) },
|
21
|
+
action: :edit
|
21
22
|
end
|
22
23
|
|
23
24
|
def edit
|
@@ -27,13 +28,13 @@ module Liquidum
|
|
27
28
|
end
|
28
29
|
|
29
30
|
def update
|
30
|
-
return render_only if params[:render_only] ==
|
31
|
+
return render_only if params[:render_only] == "commit"
|
31
32
|
|
32
33
|
@sandbox.update(sandbox_attributes)
|
33
34
|
|
34
35
|
respond_with @sandbox,
|
35
|
-
|
36
|
-
|
36
|
+
collection_location: -> { edit_sandbox_path(@sandbox) },
|
37
|
+
action: :edit
|
37
38
|
end
|
38
39
|
|
39
40
|
private
|
@@ -49,7 +50,7 @@ module Liquidum
|
|
49
50
|
|
50
51
|
def set_objects
|
51
52
|
@sandbox = Sandbox.find(params[:id]) if params[:id]
|
52
|
-
@sandbox ||= Sandbox.new(template:
|
53
|
+
@sandbox ||= Sandbox.new(template: "{{test}}", context: '{"test": "context"}')
|
53
54
|
end
|
54
55
|
|
55
56
|
def sandbox_attributes
|
@@ -1,10 +1,10 @@
|
|
1
1
|
= sts.form_for(@conversion, url: conversions_path, data: { turbo: false }) do |f|
|
2
2
|
= sts.card(title: 'Conversions') do |card|
|
3
|
-
- card.
|
3
|
+
- card.with_action
|
4
4
|
= f.submit "JSON -> YAML", name: "json_to_yaml"
|
5
5
|
= f.submit "YAML -> JSON", name: "yaml_to_json"
|
6
6
|
= f.submit "SLIM -> HTML", name: "slim_to_html"
|
7
|
-
- card.
|
7
|
+
- card.with_tab :main, padding: true
|
8
8
|
.grid.grid-cols-12.gap-4
|
9
9
|
.col-span-12
|
10
10
|
= f.editor :source, mode: "application/json"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
= sts.form_for(@sandbox, url: @sandbox.persisted? ? sandbox_path(@sandbox) : sandbox_index_path) do |f|
|
2
2
|
= sts.card(title: 'Liquid Sandbox') do |card|
|
3
|
-
- card.
|
3
|
+
- card.with_action
|
4
4
|
= f.submit "Save", value: 'save'
|
5
|
-
- card.
|
5
|
+
- card.with_action
|
6
6
|
= f.submit t('.render'), name: "render_only"
|
7
|
-
- card.
|
7
|
+
- card.with_tab :main, padding: true
|
8
8
|
.grid.grid-cols-12.gap-4
|
9
9
|
.col-span-12
|
10
10
|
= f.input :description
|
@@ -1,2 +1,2 @@
|
|
1
1
|
= sts.card title: t('.sandboxes'), icon: 'fad fa-toolbox', content_padding: false, menu: liquidum_sandboxes_menu do |card|
|
2
|
-
|
2
|
+
= sts.table 'liquidum/sandboxes', parameters: { search_placeholder: "Search By Context, Template and Description" }
|
data/lib/liquidum/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liquidum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom de Grunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -285,6 +285,7 @@ files:
|
|
285
285
|
- app/jobs/liquidum/application_job.rb
|
286
286
|
- app/models/concerns/liquidum/to_liquid.rb
|
287
287
|
- app/models/liquidum/sandbox.rb
|
288
|
+
- app/tables/liquidum/application_table.rb
|
288
289
|
- app/tables/liquidum/sandboxes_table.rb
|
289
290
|
- app/views/liquidum/conversions/index.html.slim
|
290
291
|
- app/views/liquidum/sandbox/edit.html.slim
|