alembic 0.12.0 → 0.13.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 931643b6dc1be5388f7beb875b145be8c56ddc1a734b4007d704c8e1d8c83bcd
4
- data.tar.gz: c5f1a14d6770f25e6c88da122912d4437b75900326cd3f1c30f8cb1b30cef97b
3
+ metadata.gz: ae4f6fdd30b863971ed64168da8b19b238930a9d6983978e8fd80f5bad0ff206
4
+ data.tar.gz: 54d74ca4152be0bee97e02a639b11c240f76bd595523d1a21577b43e062caee0
5
5
  SHA512:
6
- metadata.gz: 1d99652cf6dc68f989c00377c940c9038a2e24fc06c3e40bb1bedec02b88f9aa07c24277bfd566c88c9d630466951542b9f8e10b45ce445be1a0ad38f40bd8bc
7
- data.tar.gz: 9f1e415dc29214afee236b18fac4694868808b9c238dc93884bb9895fe072b036124d054adc80e31b61c84a62e18445b0f51e2624345b92c147789daaf8cb374
6
+ metadata.gz: 7b507037a195cb807bccae95dbcfbb982a4325e535631fa4e53ba8f21316dca572904e9d2b92fc71b501407819ab1a4dc137718323730829911046af406363fe
7
+ data.tar.gz: 0cfdcb1374201572a0fadbd1a9671f2dca43cbedddb8c8e480fa845d415399412883faf53f854bbbc9756b2173766e52f84392ecdf5e85ffed6a7f14c77c86dd
@@ -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: "That's everything", subtitle: "Thanks — here's what you told us") do |header| %>
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? ? "What you told us" : nil) do %>
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? %>
@@ -1,3 +1,3 @@
1
1
  module Alembic
2
- VERSION = "0.12.0"
2
+ VERSION = "0.13.0"
3
3
  end
data/lib/alembic.rb CHANGED
@@ -15,6 +15,19 @@ module Alembic
15
15
  class << self
16
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
+ 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.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tylercschneider