drive 0.18.1 → 0.20.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: 28a503c4b91fd92ba7b1f6f583b04614cf86fc728d3a5fbd3a1732c449a4d2b1
4
- data.tar.gz: a4311ea2ba46a32284b04e86ae17b49058cef0b9d8f625ba9375bef15d2fb1e7
3
+ metadata.gz: 12c3567db32f3d5c51d829b69dad32f6e65ab616510b2342b392542e02dc1ed2
4
+ data.tar.gz: 9b0a60d3abcc604fd6c8c88660c5a4d30beda8bb1754a61463e4022c6527d402
5
5
  SHA512:
6
- metadata.gz: ec5656a0f255c6786a68779f6aae8ee1d3cd46a429263434137cf8435aa3524c031f5061e87ab43ce4bab2da888ecbe4276137eb0707dec929cda11aebe95617
7
- data.tar.gz: bdca46e2e38e09481808bba7ac2e35e2849a235dcbc456eda4024e0951e2e24ed835a0a8df30590eaf4edb48df01edd124df97178e9ad94af8d72a12329d728f
6
+ metadata.gz: 26565dd60012484daa85e88c6e5b4ba39a4eb030ee0fa2326036ccd375ff2b5e3caa98c081064c1abbfa5f6b54cc4929374010a6e61167a82db27945bbc9bda9
7
+ data.tar.gz: 78b67e3da10387cf58a34cd8554e43189d116a4035d4798ed7450ffa01221b61762eb553bdade926ccd69964fb7887cd7132afbdb65eaeb7c3b6f1ae0bf92446
data/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## 0.20.0 - 2026-11-07
10
+
11
+ * [FEATURE] `ruled`: parts of a page one after another are ruled apart by a thin line, in the color of a line,
12
+ fading out toward both ends.
13
+
14
+ ## 0.19.0 - 2026-11-07
15
+
16
+ * [FEATURE] The error pages name the app's own site, in their title, their one link and the maintenance message:
17
+ `Drive.site = ->(request) { ['easyAnnual', 'https://easyannual.com/'] }`. Without it, easyFAA as before.
18
+
9
19
  ## 0.18.1 - 2026-11-07
10
20
 
11
21
  * [ENHANCEMENT] Every page, its header and its footer are 76rem wide on a big screen, the one width of the easy apps
data/README.md CHANGED
@@ -11,7 +11,8 @@ gem's.
11
11
  ChatGPT or Perplexity publish, fetched once a day.
12
12
  - **`Drive::Cloudflare`**: purges pages by tag or everything, and warms pages. Its addresses are
13
13
  the app's trusted proxies.
14
- - **Error pages**: the same page for 400, 404, 422 and 500 on every app, and `/down.html`.
14
+ - **Error pages**: the same page for 400, 404, 422 and 500 on every app, and `/down.html`, naming
15
+ easyFAA or the site `Drive.site` names for the request.
15
16
  - **`NNumber`**, **`Designation`**, **`Serial`**: an N-number, a designation's key and a serial
16
17
  number, as every app reads them.
17
18
 
@@ -320,6 +320,9 @@ a.tooltip-trigger:hover,a.tooltip-trigger:focus{box-shadow:0 0 0 2px currentColo
320
320
  .flow-card.narrow{max-width:30rem;margin:24px auto 40px}
321
321
  .flow-card.narrow .field-list li{flex-basis:100%}
322
322
  .flow-card-actions .pill{text-decoration:none;text-align:center}
323
+ /* ruled: parts of a page ruled apart, a thin line over each but the first, fading out toward both ends */
324
+ .ruled+.ruled::before{content:"";display:block;height:3px;margin:8px 0 28px;border-radius:2px;opacity:.6;
325
+ background:linear-gradient(90deg,transparent,var(--color-line) 30%,var(--color-line) 70%,transparent)}
323
326
  .field-list li.wide{flex-basis:100%}
324
327
  .field-list li.side{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
325
328
  .field-list select{display:block;width:100%;margin-top:6px;height:46px;padding:0 12px;border:1px solid var(--color-line);border-radius:10px;background:var(--color-bg);color:var(--color-text);font:inherit;font-size:16px}
@@ -4,6 +4,7 @@ module Drive
4
4
  # the moment the database or a session might be what broke, so nothing here may depend on either.
5
5
  class ErrorsController < ActionController::Base # rubocop:disable Rails/ApplicationController
6
6
  layout 'drive/errors'
7
+ before_action :set_site
7
8
 
8
9
  # Heading and sentence by status.
9
10
  MESSAGES = {
@@ -26,8 +27,15 @@ module Drive
26
27
  # The page shown while the app is down for maintenance.
27
28
  def down
28
29
  @heading = 'Down for maintenance'
29
- @message = 'easyFAA is being updated and will be back in a few minutes.'
30
+ @message = "#{@site_name} is being updated and will be back in a few minutes."
30
31
  render :show, formats: :html
31
32
  end
33
+
34
+ private
35
+
36
+ # The site's name and address, as the app names it for the request (Drive.site).
37
+ def set_site
38
+ @site_name, @site_url = Drive.site.call(request)
39
+ end
32
40
  end
33
41
  end
@@ -1,4 +1,4 @@
1
- <% content_for :title, "#{@heading} | easyFAA" %>
1
+ <% content_for :title, "#{@heading} | #{@site_name}" %>
2
2
  <h1>
3
3
  <svg viewBox="0 0 64 64" aria-hidden="true">
4
4
  <g stroke="currentColor" stroke-width="2.5" stroke-linejoin="round">
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <meta name="color-scheme" content="light dark">
7
7
  <meta name="robots" content="noindex">
8
- <title><%= content_for(:title) || "easyFAA" %></title>
8
+ <title><%= content_for(:title) || @site_name %></title>
9
9
  <style>
10
10
  :root{color-scheme:light;--bg:#ffffff;--ink:#15202e;--muted:#50575d;--primary:#1a70d0}
11
11
  @media (prefers-color-scheme: dark){:root{color-scheme:dark;--bg:#131415;--ink:#f3f5f8;--muted:#abb2b8;--primary:#689dff}}
@@ -21,6 +21,6 @@ footer a{color:inherit;text-decoration:none}
21
21
  </head>
22
22
  <body>
23
23
  <%= yield %>
24
- <footer><a href="https://easyfaa.com/">easyFAA</a></footer>
24
+ <footer><%= link_to @site_name, @site_url %></footer>
25
25
  </body>
26
26
  </html>
data/lib/drive/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Drive
2
2
  # Version of the gem, read by the gemspec.
3
- VERSION = '0.18.1'.freeze
3
+ VERSION = '0.20.0'.freeze
4
4
  end
data/lib/drive.rb CHANGED
@@ -6,4 +6,9 @@ require 'drive/engine'
6
6
  # What every easyFAA app in front of Cloudflare needs alike: Drive::Cloudflare, Crawler,
7
7
  # RateLimited, the error pages, NNumber, Designation and Serial.
8
8
  module Drive
9
+ # The site an error page names, in its title and its one link: easyFAA, unless the app says
10
+ # otherwise for the request:
11
+ #
12
+ # Drive.site = ->(request) { ['easyAnnual', 'https://easyannual.com/'] }
13
+ mattr_accessor :site, default: ->(_request) { ['easyFAA', 'https://easyfaa.com/'] }
9
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob