alembic 0.12.0 → 0.14.0
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/concerns/alembic/summarizes.rb +1 -1
- data/app/views/alembic/flows/complete.html.erb +2 -2
- data/app/views/alembic/flows/step.html.erb +4 -0
- data/db/migrate/20260924220000_move_flows_onto_easy_flow.rb +1 -1
- data/lib/alembic/version.rb +1 -1
- data/lib/alembic.rb +14 -1
- metadata +9 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26fff39c56e3627fa327fc6ae59d02d9d034687db485abf2e7d991e19beac021
|
|
4
|
+
data.tar.gz: e8eb409d6bff630da792f4d084138e6c48d7d7b443a659e257a31f19b91e0627
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45395f01c87606d7a626341112ed4b99c27ba1e4b11b82cb8cc186a8e33f2b3279f9f7542c625f8f879b37327defa4a57ac7bbcfef3846f1b5053d02abf65076
|
|
7
|
+
data.tar.gz: 523ec9fda8a088f4843bcb3b5347bca4771a523fd42e7c9314ea128792f1279d97186418bcaf56b8b6c650b4f93b9a31f42f7c20789eb61d537f9b6afa123ae3
|
|
@@ -97,7 +97,7 @@ module Alembic
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
def answered_right?(step, value)
|
|
100
|
-
|
|
100
|
+
Alembic.marks_right_answers && Outputs::WeightedSum.weight_of(step_settings(step), value).positive?
|
|
101
101
|
end
|
|
102
102
|
|
|
103
103
|
def step_settings(id)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<% starting_over = start_over_path %>
|
|
4
4
|
|
|
5
5
|
<%= ui_page(max_width: :md) do %>
|
|
6
|
-
<%= ui_page_header(title:
|
|
6
|
+
<%= ui_page_header(title: Alembic.finish_title, subtitle: Alembic.finish_subtitle) do |header| %>
|
|
7
7
|
<% if starting_over %>
|
|
8
8
|
<% header.action do %>
|
|
9
9
|
<%= ui_button(label: "Start over", href: starting_over, variant: :secondary) %>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<% end %>
|
|
36
36
|
<% end %>
|
|
37
37
|
|
|
38
|
-
<%= ui_section(title: @outputs.any? ?
|
|
38
|
+
<%= ui_section(title: @outputs.any? ? Alembic.finish_answers_heading : nil) do %>
|
|
39
39
|
<ul class="divide-y divide-(color:--ks-color-divider) border-y border-(color:--ks-color-divider) dark:divide-(color:--ks-color-divider-dark) dark:border-(color:--ks-color-divider-dark)">
|
|
40
40
|
<% @answered.each do |step, value| %>
|
|
41
41
|
<li data-answer="<%= step %>" class="flex items-baseline justify-between gap-6 py-3">
|
|
@@ -32,6 +32,10 @@
|
|
|
32
32
|
<%= render @drawing, step: shown(@question), chosen: chosen_answer(@question) %>
|
|
33
33
|
<% end %>
|
|
34
34
|
|
|
35
|
+
<% if (right_answer = chosen_answer(@question)).present? %>
|
|
36
|
+
<%= ui_value_list(rows: [ { label: ui_badge(label: "Right answer", variant: :success), value: @guide.choice_label(@question.id, right_answer) } ]) %>
|
|
37
|
+
<% end %>
|
|
38
|
+
|
|
35
39
|
<div class="mt-8 flex items-center gap-4">
|
|
36
40
|
<%= ui_button(label: "Next", type: :submit) unless single_choice?(@question) %>
|
|
37
41
|
<% if @answers.any? %>
|
|
@@ -130,7 +130,7 @@ class MoveFlowsOntoEasyFlow < ActiveRecord::Migration[8.1]
|
|
|
130
130
|
|
|
131
131
|
def copy_flows
|
|
132
132
|
OldFlow.order(:id).to_h do |flow|
|
|
133
|
-
[ flow.id, Definition.create!(flow.attributes.slice(*FLOW_COLUMNS).merge("host" => HOST)).id ]
|
|
133
|
+
[ flow.id, Definition.create!(flow.attributes.slice(*FLOW_COLUMNS & Definition.column_names).merge("host" => HOST)).id ]
|
|
134
134
|
end
|
|
135
135
|
end
|
|
136
136
|
|
data/lib/alembic/version.rb
CHANGED
data/lib/alembic.rb
CHANGED
|
@@ -13,8 +13,21 @@ 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, :start_over_address, :finish_link
|
|
16
|
+
attr_accessor :lead_address, :lead_fields_partial, :lead_note, :start_over_address, :finish_link, :marks_right_answers
|
|
17
17
|
attr_reader :admin_authentication_method, :visitor_authorization_method, :refusal_method, :owner_method
|
|
18
|
+
attr_writer :finish_title, :finish_subtitle, :finish_answers_heading
|
|
19
|
+
|
|
20
|
+
def finish_title
|
|
21
|
+
@finish_title || "That's everything"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def finish_subtitle
|
|
25
|
+
@finish_subtitle || "Thanks — here's what you told us"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def finish_answers_heading
|
|
29
|
+
@finish_answers_heading || "What you told us"
|
|
30
|
+
end
|
|
18
31
|
|
|
19
32
|
FLOW_HOST_SETTINGS.each do |name|
|
|
20
33
|
define_method(:"#{name}=") do |value|
|
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.
|
|
4
|
+
version: 0.14.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- tylercschneider
|
|
@@ -57,14 +57,20 @@ dependencies:
|
|
|
57
57
|
requirements:
|
|
58
58
|
- - "~>"
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0.
|
|
60
|
+
version: '0.32'
|
|
61
|
+
- - ">="
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: 0.32.1
|
|
61
64
|
type: :runtime
|
|
62
65
|
prerelease: false
|
|
63
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
67
|
requirements:
|
|
65
68
|
- - "~>"
|
|
66
69
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0.
|
|
70
|
+
version: '0.32'
|
|
71
|
+
- - ">="
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: 0.32.1
|
|
68
74
|
description: Alembic builds and runs data-driven interactive diagnostics — scored
|
|
69
75
|
assessments and branching guides — that place a visitor on an outcome and capture
|
|
70
76
|
the result. A runtime engine plus a UI builder.
|