trmnl_preview 0.5.1 → 0.5.2
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +3 -0
- data/bin/trmnlp +4 -1
- data/lib/trmnlp/config/project.rb +2 -0
- data/lib/trmnlp/context.rb +9 -3
- data/lib/trmnlp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff4e3150ccec1606d5368198055556d8650b129a682ae398fa7ff29e30e42009
|
4
|
+
data.tar.gz: d65492ec3e770e5203bbfd736651e56b052aa726dd1ead38bff93eccb2cbf023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7157fc2656c9228482b11b4806280a29b9ce6ae3017af3f57a79e70b3f8f00ee125671476542808fc8411a8381e0569a4cfd19e6057ed4c7fd6a21a8ebee016
|
7
|
+
data.tar.gz: c03598652d732f5922fbe7ea9b5b24c5d09e22ac2b1f793c511d59ca0739648fced9ee6c8579794298541669ffb42c5f6a37338ba523ad8b1dd193aac721a5ba
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -94,6 +94,9 @@ watch:
|
|
94
94
|
custom_fields:
|
95
95
|
station: "{{ env.ICAO }}" # interpolate $IACO environment variable
|
96
96
|
|
97
|
+
# Time zone IANA identifier to inject into trmnl.user; see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
98
|
+
time_zone: America/New_York
|
99
|
+
|
97
100
|
# override variables
|
98
101
|
variables:
|
99
102
|
trmnl:
|
data/bin/trmnlp
CHANGED
data/lib/trmnlp/context.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'active_support/time'
|
1
2
|
require 'erb'
|
2
3
|
require 'faraday'
|
3
4
|
require 'filewatcher'
|
@@ -159,6 +160,11 @@ module TRMNLP
|
|
159
160
|
end
|
160
161
|
|
161
162
|
def base_trmnl_data
|
163
|
+
tz = ActiveSupport::TimeZone.find_tzinfo(config.project.time_zone)
|
164
|
+
time_zone_iana = tz.name
|
165
|
+
time_zone_name = ActiveSupport::TimeZone::MAPPING.invert[time_zone_iana] || time_zone_iana
|
166
|
+
utc_offset = tz.utc_offset
|
167
|
+
|
162
168
|
{
|
163
169
|
'trmnl' => {
|
164
170
|
'user' => {
|
@@ -166,9 +172,9 @@ module TRMNLP
|
|
166
172
|
'first_name' => 'first_name',
|
167
173
|
'last_name' => 'last_name',
|
168
174
|
'locale' => 'en',
|
169
|
-
'time_zone' =>
|
170
|
-
'time_zone_iana' =>
|
171
|
-
'utc_offset' =>
|
175
|
+
'time_zone' => time_zone_name,
|
176
|
+
'time_zone_iana' => time_zone_iana,
|
177
|
+
'utc_offset' => utc_offset,
|
172
178
|
},
|
173
179
|
'device' => {
|
174
180
|
'friendly_id' => 'ABC123',
|
data/lib/trmnlp/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trmnl_preview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rockwell Schrock
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-05-09 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: sinatra
|