houseaccount 0.6.0 → 0.8.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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +11 -0
  3. data/README.md +13 -10
  4. data/app/views/layouts/houseaccount.html.erb +1 -1
  5. data/config/locales/houseaccount.en.yml +1 -4
  6. data/lib/houseaccount/helpers/heads.rb +7 -6
  7. data/lib/houseaccount/version.rb +1 -1
  8. data/lib/houseaccount.rb +4 -8
  9. data/public/index.html +2 -2
  10. data/public/{v0.6.0 → v0.8.0}/css/houseaccount.css +1 -1
  11. metadata +19 -19
  12. /data/public/{v0.6.0 → v0.8.0}/font/bootstrap-icons-6LILWPE2.woff2 +0 -0
  13. /data/public/{v0.6.0 → v0.8.0}/font/quicksand-500-latin-QHYSRFVK.woff2 +0 -0
  14. /data/public/{v0.6.0 → v0.8.0}/font/quicksand-500-latin-ext-QZ4PXVHB.woff2 +0 -0
  15. /data/public/{v0.6.0 → v0.8.0}/font/quicksand-500-latin-ext.woff2 +0 -0
  16. /data/public/{v0.6.0 → v0.8.0}/font/quicksand-500-latin.woff2 +0 -0
  17. /data/public/{v0.6.0 → v0.8.0}/font/quicksand-500-vietnamese-RRA5CUQB.woff2 +0 -0
  18. /data/public/{v0.6.0 → v0.8.0}/font/quicksand-500-vietnamese.woff2 +0 -0
  19. /data/public/{v0.6.0 → v0.8.0}/js/houseaccount.js +0 -0
  20. /data/public/{v0.6.0 → v0.8.0}/theme/bootstrap.css +0 -0
  21. /data/public/{v0.6.0 → v0.8.0}/theme/dawn.css +0 -0
  22. /data/public/{v0.6.0 → v0.8.0}/theme/dracula.css +0 -0
  23. /data/public/{v0.6.0 → v0.8.0}/theme/gruvbox.css +0 -0
  24. /data/public/{v0.6.0 → v0.8.0}/theme/monokai.css +0 -0
  25. /data/public/{v0.6.0 → v0.8.0}/theme/nord.css +0 -0
  26. /data/public/{v0.6.0 → v0.8.0}/theme/one_dark.css +0 -0
  27. /data/public/{v0.6.0 → v0.8.0}/theme/solarized.css +0 -0
  28. /data/public/{v0.6.0 → v0.8.0}/theme/tokyo_night.css +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa18dd4454ada3709be81ff0ff416708064b02c2a988c37a55152099371e2179
4
- data.tar.gz: b79f81239be25fb692c7e7fc60e1821014b61929cddc4740d29ea5d43fa15288
3
+ metadata.gz: 25c029d0c9b4a7be0acc92597d51ab5ff79de388f92446ad603a5d64ceeaab3a
4
+ data.tar.gz: 85a331299adfb3bc24800738dee1d094a185037a17bf169747912ea96f29f3f8
5
5
  SHA512:
6
- metadata.gz: bcecfd9589223bd8eb27679668b6fb441cf9d66ae8cc82cc67e19b7df8a464fef9dfdfa3b0044c344289156e8f9342a33d548bffe4bdf737ff26724f48e56f5e
7
- data.tar.gz: 7d2e72f1c2873f6a70482377f3792711a4f4940c40a7859495f0665059c9f05939e60ea46eeebbd12a3c62701dea43d10db58dfc63efa38fee8c61829ec17151
6
+ metadata.gz: 5639f3869ea8eaf95321546515d0aeaad2263042e8de41a77ff7c74a212638be06f73e842ef7e35c118e2009e3886be0e06c67de025cb0f77b6fb09b7ff2ec9a
7
+ data.tar.gz: 32dc62a114967214bf1f2ee7880223e599f306f0d74cc75e0a4d98eb33d6da61c7f66e73a23ca1fef22e8d2702c1f03f41c75abe3df88cdd2c21a969de8ac002
data/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## 0.8.0 - 2026-09-14
11
+
12
+ * [Breaking change] A one-time code is the sentence alone, without the line for the phone
13
+
14
+ `written` carried a second paragraph, `@host #code`, there for Safari and iOS to read and
15
+ offer the code above the keyboard. It is plainly visible in the message that arrives, so it
16
+ is gone: `written` is now the sentence `spoken` says, with its digits together, and
17
+ `HouseAccount.one_time_code` no longer takes `host:`.
18
+
19
+ ## 0.7.0 - 2026-09-14
20
+
10
21
  ## 0.6.0 - 2026-09-14
11
22
 
12
23
  * [Breaking change] `HouseAccount.one_time_code` answers the words in both voices
data/README.md CHANGED
@@ -20,10 +20,10 @@ gem install houseaccount
20
20
 
21
21
  ```ruby
22
22
  # Gemfile
23
- gem 'houseaccount', '~> 0.6.0'
23
+ gem 'houseaccount', '~> 0.8.0'
24
24
  ```
25
25
 
26
- `~> 0.6.0` stops short of `0.7`, since below 1.0 a minor release may break whatever it likes.
26
+ `~> 0.8.0` stops short of `0.9`, since below 1.0 a minor release may break whatever it likes.
27
27
  Rails 8.1 and Ruby 3.2 are the minimum.
28
28
 
29
29
  A page takes the gem's layout, and wears the same head:
@@ -60,7 +60,7 @@ which Pages redirects away from.
60
60
 
61
61
  With the gem in the bundle an app serves `/css/houseaccount.css`, `/js/houseaccount.js`,
62
62
  `/theme/*`, `/font/*`, `/logo/*` and `/favicon/*` itself — and its own version's copy under
63
- `/v0.6.0/`, which is what the head helper links, cached for a year — answers a 400, 404, 406, 422 or 500
63
+ `/v0.8.0/`, which is what the head helper links, cached for a year — answers a 400, 404, 406, 422 or 500
64
64
  with the house's own page, and has these helpers in every view:
65
65
 
66
66
  ```erb
@@ -140,6 +140,8 @@ nests on the gem's layout, giving the page as `content_for :content` and renderi
140
140
  as a template:
141
141
 
142
142
  ```erb
143
+ <% content_for :logo, 'houseaccount' %>
144
+
143
145
  <% content_for :content do %>
144
146
  <%= flow logo: root_path, footer: [button_to('Sign out', session_path, method: :delete, class: 'btn btn-link')] do %>
145
147
  <%= yield %>
@@ -149,6 +151,9 @@ as a template:
149
151
  <%= render template: 'layouts/houseaccount' %>
150
152
  ```
151
153
 
154
+ `content_for :logo` is which of the family's marks the tab wears, for a page a customer reads
155
+ rather than the app's own people: unsaid, it is this app's, by its name.
156
+
152
157
  The words are the view's, said in `content_for`: `:title` is the `h1`, `:subtitle` the line
153
158
  under it, drawn only where there is one, and `:width` how wide the card is, a CSS length that
154
159
  is `30rem` unless said — a chat's page says `75rem`. What the layout knows goes in the call:
@@ -176,15 +181,13 @@ HouseAccount::Message.new side: :left, text: answer.note, sender: 'Claude', at:
176
181
  ```
177
182
 
178
183
  A code sent to a phone is the same words from every app, `HouseAccount.one_time_code`, in
179
- each voice they are said in. `written` is the sentence a person reads and, under it, the
180
- `@host #code` line that offers the code above the keyboard on the phone it arrived on;
181
- `spoken` is the sentence alone, its digits one at a time so a listener can write them down.
182
- The host is the application's default one unless `host:` says otherwise, and the words are
184
+ each voice they are said in. `written` is the one sentence a person reads; `spoken` is that
185
+ same sentence with its digits one at a time, so a listener can write them down. The words are
183
186
  the gem's `config/locales` entry.
184
187
 
185
188
  ```ruby
186
189
  HouseAccount.one_time_code(contact.pin).written
187
- # => "Enter this 6-digit code to proceed: 482913\n\n@houseaccount.com #482913"
190
+ # => "Enter this 6-digit code to proceed: 482913"
188
191
  HouseAccount.one_time_code(contact.pin).spoken
189
192
  # => "Enter this 6-digit code to proceed: 4, 8, 2, 9, 1, 3"
190
193
  ```
@@ -200,8 +203,8 @@ Those follow the latest release. Every release is also kept whole under its own
200
203
  forever and cached for a year, for a page that would rather move on its own terms:
201
204
 
202
205
  ```html
203
- <link rel='stylesheet' href='https://design.houseaccount.com/v0.6.0/css/houseaccount.css'>
204
- <script type='module' src='https://design.houseaccount.com/v0.6.0/js/houseaccount.js'></script>
206
+ <link rel='stylesheet' href='https://design.houseaccount.com/v0.8.0/css/houseaccount.css'>
207
+ <script type='module' src='https://design.houseaccount.com/v0.8.0/js/houseaccount.js'></script>
205
208
  ```
206
209
 
207
210
  A host with a Content Security Policy allows that origin for `style-src`, `script-src` and
@@ -10,7 +10,7 @@
10
10
  <%- if (csp = csp_meta_tag) -%>
11
11
  <%= csp %>
12
12
  <%- end -%>
13
- <%= houseaccount_head_tags %>
13
+ <%= houseaccount_head_tags content_for(:logo).presence || HouseAccount.app %>
14
14
  <%- if content_for?(:head) -%>
15
15
  <%= yield :head %>
16
16
  <%- end -%>
@@ -4,10 +4,7 @@ en:
4
4
  ask: Ask a question
5
5
  close: Close
6
6
  okay: Okay
7
- one_time_code: |-
8
- Enter this 6-digit code to proceed: %{pin}
9
-
10
- @%{host} #%{pin}
7
+ one_time_code: 'Enter this 6-digit code to proceed: %{pin}'
11
8
  send: Send
12
9
  spoken_one_time_code: 'Enter this 6-digit code to proceed: %{pin}'
13
10
  typing: Typing
@@ -6,11 +6,12 @@ module HouseAccount
6
6
  # by two: `<html>`, then `<head>`, then these.
7
7
  INDENT = "\n "
8
8
 
9
- # The stylesheet and the script every page needs, and the icons this app is known
10
- # by. Both files at this version's own path, which never changes and so is kept for
11
- # a year. A page refresh Turbo is sent morphs the page in place and keeps the scroll,
12
- # so an answer landing in a thread leaves the reader where they were.
13
- def houseaccount_head_tags
9
+ # The stylesheet and the script every page needs, and the icons `app` is known by —
10
+ # this app unless said, since a page a customer reads may wear the house's mark rather
11
+ # than the app's. Both files at this version's own path, which never changes and so is
12
+ # kept for a year. A page refresh Turbo is sent morphs the page in place and keeps the
13
+ # scroll, so an answer landing in a thread leaves the reader where they were.
14
+ def houseaccount_head_tags(app = HouseAccount.app)
14
15
  safe_join [
15
16
  tag.meta(name: 'viewport', content: 'width=device-width, initial-scale=1'),
16
17
  tag.meta(name: 'color-scheme', content: 'light dark'),
@@ -18,7 +19,7 @@ module HouseAccount
18
19
  tag.meta(name: 'turbo-refresh-scroll', content: 'preserve'),
19
20
  tag.link(rel: 'stylesheet', href: "/v#{VERSION}/css/houseaccount.css"),
20
21
  tag.script('', type: 'module', src: "/v#{VERSION}/js/houseaccount.js"),
21
- houseaccount_icons,
22
+ houseaccount_icons(app),
22
23
  ], INDENT
23
24
  end
24
25
 
@@ -1,4 +1,4 @@
1
1
  module HouseAccount
2
2
  # Version of the gem, read by the gemspec and by hosts checking compatibility.
3
- VERSION = '0.6.0'
3
+ VERSION = '0.8.0'
4
4
  end
data/lib/houseaccount.rb CHANGED
@@ -29,14 +29,10 @@ module HouseAccount
29
29
  MARKS.key?(name) ? name : :houseaccount
30
30
  end
31
31
 
32
- # The words that carry a 6-digit code to a phone, in both voices. `written` is the sentence
33
- # a person reads and, under it, the line Safari matches against the page about to be filled,
34
- # `@host #code`, which offers the code above the keyboard so nobody leaves for Messages to
35
- # copy it. `spoken` is the sentence alone, its digits one at a time so a listener can write
36
- # them down, and without a line meant for a phone rather than a person. Every app of the
37
- # house that sends a code sends these, from `config/locales`.
38
- def self.one_time_code(pin, host: Rails.application.default_url_options[:host])
39
- Copy.new written: I18n.t('houseaccount.one_time_code', pin:, host:),
32
+ # The one sentence that carries a 6-digit code to a phone, written as a person reads it and
33
+ # spoken a digit at a time so a listener can write it down.
34
+ def self.one_time_code(pin)
35
+ Copy.new written: I18n.t('houseaccount.one_time_code', pin:),
40
36
  spoken: I18n.t('houseaccount.spoken_one_time_code', pin: pin.chars.join(', '))
41
37
  end
42
38
  end
data/public/index.html CHANGED
@@ -66,8 +66,8 @@
66
66
  </div>
67
67
  <div class='col-12'>
68
68
  <div class='card p-3'>
69
- <strong>Pinned to a version — the latest is 0.6.0</strong>
70
- <span class='design-url'>https://design.houseaccount.com/v0.6.0/css/houseaccount.css · /v0.6.0/js/houseaccount.js · /v0.6.0/theme/nord.css</span>
69
+ <strong>Pinned to a version — the latest is 0.8.0</strong>
70
+ <span class='design-url'>https://design.houseaccount.com/v0.8.0/css/houseaccount.css · /v0.8.0/js/houseaccount.js · /v0.8.0/theme/nord.css</span>
71
71
  <span class='small fg-2 mt-1'>Every release stays at its own prefix forever, whole and cached for a year, for a page that moves on its own terms. The unversioned paths follow the latest.</span>
72
72
  </div>
73
73
  </div>