drive 0.18.1 → 0.19.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: 423a3e3ab4da5f43e50a9031b394d5f717f4b14a55593dd69c65369a9fb57261
4
+ data.tar.gz: af52bd22414d8526da376790d1741f538a8d030d3db814a50337c46693830243
5
5
  SHA512:
6
- metadata.gz: ec5656a0f255c6786a68779f6aae8ee1d3cd46a429263434137cf8435aa3524c031f5061e87ab43ce4bab2da888ecbe4276137eb0707dec929cda11aebe95617
7
- data.tar.gz: bdca46e2e38e09481808bba7ac2e35e2849a235dcbc456eda4024e0951e2e24ed835a0a8df30590eaf4edb48df01edd124df97178e9ad94af8d72a12329d728f
6
+ metadata.gz: 40430cd38f2679c60d0309f37d45dbcb8ab3e119eeec9396d409439bf121933390f536604c9e8c83d5fb7f37f92f7d8600698f9c9cf8d22f1a09032f9aaa23de
7
+ data.tar.gz: a722f980c5bde92b9d29e0018e6788436e41889245f5703309648ce5f950384c592de7a9fbf41c5cb3f77e36422c33789d00c4c218be6c0f1652d8a080130c29
data/CHANGELOG.md CHANGED
@@ -6,6 +6,11 @@ For more information about changelogs, check [Keep a Changelog](http://keepachan
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## 0.19.0 - 2026-11-07
10
+
11
+ * [FEATURE] The error pages name the app's own site, in their title, their one link and the maintenance message:
12
+ `Drive.site = ->(request) { ['easyAnnual', 'https://easyannual.com/'] }`. Without it, easyFAA as before.
13
+
9
14
  ## 0.18.1 - 2026-11-07
10
15
 
11
16
  * [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
 
@@ -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.19.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.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob