alembic 0.8.0 → 0.8.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: b9fe70ef3945d5a70f24110f819a17db43ee9f54ebf70e81631e76e96fe4e7a2
4
- data.tar.gz: eb5c70109254d9e121b2fbe5b8bbf6ce7988e53deaf322a9a904ee556c6ede6a
3
+ metadata.gz: 38b85ba5df0fb5c018bdda961a5fbfedff2a8984c580f1cd3111bed2a172dcaf
4
+ data.tar.gz: 42f4e71e2eded17a8c739f058e772f3eb8c5e017cc421f0f3c60074ace786426
5
5
  SHA512:
6
- metadata.gz: 98520320480c38a5a72a8d11b11f0510b70352c8a6a9765c732842dae8075a6f843c419f29fe9c3308a5b9b8230fe8a20840274d4e5b866aa741ea414b2cbab0
7
- data.tar.gz: 131062d6d22160f9ab6b3688d33f43120b783410d9836c2c03d09d6617b8efe47c7656896eca9bb0537151bf801cf1971564b7543afc279994071b40965636d3
6
+ metadata.gz: 96d4a18b7007ffe69ad222ef08bdee58957ebfe7c3d5a69f59426af2c11e405e10309dab90c0503f3620db2b5ab691fa99c282c889b2a6db93e98db3d471c1a3
7
+ data.tar.gz: 9b7f7c1e6fd198a91291667438282ff42106bb5eae407639dc614ac7b925eb07a65d8d2158f8b2c6f9b9d455d05689af62045a8d712b9c975af6b28ff2463ec5
@@ -45,7 +45,16 @@ module Alembic
45
45
  end
46
46
 
47
47
  def start_over_path
48
- Alembic.start_over_address&.call(run&.flow || flow) || super
48
+ address = host_start_over_address
49
+ address.nil? ? super : address
50
+ end
51
+
52
+ def host_start_over_address
53
+ setting = Alembic.start_over_address
54
+ return unless setting
55
+ return setting.call(run&.flow || flow, run) if setting.arity == 2
56
+
57
+ setting.call(run&.flow || flow)
49
58
  end
50
59
 
51
60
  def finish_link
@@ -4,8 +4,10 @@
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| %>
7
- <% header.action do %>
8
- <%= ui_button(label: "Start over", href: starting_over, variant: :secondary) %>
7
+ <% if starting_over %>
8
+ <% header.action do %>
9
+ <%= ui_button(label: "Start over", href: starting_over, variant: :secondary) %>
10
+ <% end %>
9
11
  <% end %>
10
12
  <% end %>
11
13
 
@@ -5,7 +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", start_over_path, class: "text-sm text-accent-600 hover:text-accent-700" %>
8
+ <% if (starting_over = start_over_path) %>
9
+ <%= link_to "← Start over", starting_over, class: "text-sm text-accent-600 hover:text-accent-700" %>
10
+ <% end %>
9
11
 
10
12
  <%= form_with url: flow_step_path(visited_flow_address), method: :get, data: { turbo: false, one_page: true }, class: "mt-6" do %>
11
13
  <% @questions.each_with_index do |question, index| %>
@@ -2,7 +2,9 @@
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", start_over_path, class: "text-sm text-accent-600 hover:text-accent-700" %>
5
+ <% if (starting_over = start_over_path) %>
6
+ <%= link_to "← Start over", starting_over, class: "text-sm text-accent-600 hover:text-accent-700" %>
7
+ <% end %>
6
8
 
7
9
  <% answered = @answers.size %>
8
10
  <% questions = answered + @guide.questions_left(@answers) %>
@@ -1,3 +1,3 @@
1
1
  module Alembic
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
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.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - tylercschneider