alembic 0.7.0 → 0.7.2
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/alembic/flows_controller.rb +8 -0
- data/app/controllers/concerns/alembic/summarizes.rb +17 -1
- data/app/views/alembic/flows/complete.html.erb +7 -1
- data/app/views/alembic/flows/one_page.html.erb +2 -2
- data/app/views/alembic/flows/step.html.erb +1 -1
- data/app/views/alembic/flows/summary_page.html.erb +5 -0
- data/lib/alembic/version.rb +1 -1
- data/lib/alembic.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ef24a6bad349612e40a70a030fee5e1f7d5eaee540c29fb20645f489fde6de05
|
|
4
|
+
data.tar.gz: 633acbe75014d6fbb3d5735e9141d08fd90b54e32c89fa20f2abc09583d03569
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a92ef4a24bb3a47ae63d14b999043b5f48d393960e18e6a338a0e0074a11e311508f6637e0393250ae928e2013ce0fa5fda97e40ac5f732e3afa7b7323eec4bd
|
|
7
|
+
data.tar.gz: 20b1066d5f7977222a01d415db83fe5de05f0d28c94c126baab9592b431b514bd5a46cefcfc6efbaef9443a44948063f546ed4666f32a68ca444e7a3d77d6e41
|
|
@@ -44,6 +44,14 @@ module Alembic
|
|
|
44
44
|
alembic.flow_path(slug)
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
def start_over_path
|
|
48
|
+
Alembic.start_over_address&.call(run&.flow || flow) || super
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def finish_link
|
|
52
|
+
Alembic.finish_link&.call(run&.flow || flow)
|
|
53
|
+
end
|
|
54
|
+
|
|
47
55
|
def flow_step_path(slug)
|
|
48
56
|
alembic.flow_step_path(slug)
|
|
49
57
|
end
|
|
@@ -9,7 +9,7 @@ module Alembic
|
|
|
9
9
|
helper ResultBlocksHelper
|
|
10
10
|
helper ContentBlocksHelper
|
|
11
11
|
helper KsBlocks::LayoutHelper
|
|
12
|
-
helper_method :flow_summary, :first_step_path, :summary_values, :intro_values
|
|
12
|
+
helper_method :flow_summary, :first_step_path, :summary_values, :intro_values, :start_over_path, :finish_link, :visited_flow_address
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
private
|
|
@@ -22,6 +22,22 @@ module Alembic
|
|
|
22
22
|
flow_step_path(slug)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
def start_over_path
|
|
26
|
+
flow_start_path(visited_flow_address)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def finish_link; end
|
|
30
|
+
|
|
31
|
+
def visited_flow_address
|
|
32
|
+
flow_address((run&.flow || flow).slug)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def step_form
|
|
36
|
+
return super if run
|
|
37
|
+
|
|
38
|
+
{ url: flow_step_path(visited_flow_address), method: :get }
|
|
39
|
+
end
|
|
40
|
+
|
|
25
41
|
def start_run(flow)
|
|
26
42
|
super.tap { |run| Flow::Summaries.new(flow).pin(run) }
|
|
27
43
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% content_for(:title, "Complete") %>
|
|
2
2
|
|
|
3
|
-
<% starting_over =
|
|
3
|
+
<% starting_over = start_over_path %>
|
|
4
4
|
|
|
5
5
|
<%= ui_page(max_width: :md) do %>
|
|
6
6
|
<%= ui_page_header(title: "That's everything", subtitle: "Thanks — here's what you told us") do |header| %>
|
|
@@ -21,6 +21,12 @@
|
|
|
21
21
|
<% end %>
|
|
22
22
|
<% end %>
|
|
23
23
|
|
|
24
|
+
<% if (link = finish_link) %>
|
|
25
|
+
<%= ui_section do %>
|
|
26
|
+
<%= ui_button(label: link[:label], href: link[:url]) %>
|
|
27
|
+
<% end %>
|
|
28
|
+
<% end %>
|
|
29
|
+
|
|
24
30
|
<% if Alembic.lead_address %>
|
|
25
31
|
<%= ui_section do %>
|
|
26
32
|
<%= alembic_lead_block(slug: summary_values["slug"], note: summary_values["note"]) %>
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
<section class="py-20 md:py-28">
|
|
7
7
|
<div class="max-w-2xl mx-auto px-6">
|
|
8
|
-
<%= link_to "← Start over",
|
|
8
|
+
<%= link_to "← Start over", start_over_path, class: "text-sm text-accent-600 hover:text-accent-700" %>
|
|
9
9
|
|
|
10
|
-
<%= form_with url: flow_step_path(
|
|
10
|
+
<%= form_with url: flow_step_path(visited_flow_address), method: :get, data: { turbo: false, one_page: true }, class: "mt-6" do %>
|
|
11
11
|
<% @questions.each_with_index do |question, index| %>
|
|
12
12
|
<div data-one-page-question>
|
|
13
13
|
<div class="flex items-center justify-between text-sm text-gray-500 mb-2">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<section class="py-20 md:py-28">
|
|
4
4
|
<div class="max-w-2xl mx-auto px-6">
|
|
5
|
-
<%= link_to "← Start over",
|
|
5
|
+
<%= link_to "← Start over", start_over_path, class: "text-sm text-accent-600 hover:text-accent-700" %>
|
|
6
6
|
|
|
7
7
|
<% answered = @answers.size %>
|
|
8
8
|
<% questions = answered + @guide.questions_left(@answers) %>
|
|
@@ -5,5 +5,10 @@
|
|
|
5
5
|
<section class="py-20 md:py-28">
|
|
6
6
|
<div class="max-w-2xl mx-auto px-6">
|
|
7
7
|
<%= drawn_page(@summary_page, values: summary_values) %>
|
|
8
|
+
<% if (link = finish_link) %>
|
|
9
|
+
<div class="mt-10">
|
|
10
|
+
<%= ui_button(label: link[:label], href: link[:url]) %>
|
|
11
|
+
</div>
|
|
12
|
+
<% end %>
|
|
8
13
|
</div>
|
|
9
14
|
</section>
|
data/lib/alembic/version.rb
CHANGED
data/lib/alembic.rb
CHANGED
|
@@ -13,7 +13,7 @@ module Alembic
|
|
|
13
13
|
visitor_authorization_method refusal_method owner_method].freeze
|
|
14
14
|
|
|
15
15
|
class << self
|
|
16
|
-
attr_accessor :lead_address, :lead_fields_partial, :lead_note
|
|
16
|
+
attr_accessor :lead_address, :lead_fields_partial, :lead_note, :start_over_address, :finish_link
|
|
17
17
|
attr_reader :admin_authentication_method, :visitor_authorization_method, :refusal_method, :owner_method
|
|
18
18
|
|
|
19
19
|
FLOW_HOST_SETTINGS.each do |name|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: alembic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- tylercschneider
|
|
@@ -57,14 +57,14 @@ dependencies:
|
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0.
|
|
60
|
+
version: '0.25'
|
|
61
61
|
type: :runtime
|
|
62
62
|
prerelease: false
|
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
64
|
requirements:
|
|
65
65
|
- - "~>"
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0.
|
|
67
|
+
version: '0.25'
|
|
68
68
|
description: Alembic builds and runs data-driven interactive diagnostics — scored
|
|
69
69
|
assessments and branching guides — that place a visitor on an outcome and capture
|
|
70
70
|
the result. A runtime engine plus a UI builder.
|