astropanel 2.2 → 2.3

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/astropanel +12 -1
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18a6f4c22f384f633ee5d6ceccf1c360b5531ef0b60b2515330bcc67943462fa
4
- data.tar.gz: 53d3eec673b1e085eeeff5255e28a42d3241499ec9f0bcbe277b9da040b30d40
3
+ metadata.gz: de884bc4fb426c44911a873006857920bd52313fcd5ac719578a4bc3357877a6
4
+ data.tar.gz: b367c2e2ba020f6bf3cd982da21d9cec58bce2d9e3598afca28d19ab0108e53d
5
5
  SHA512:
6
- metadata.gz: 9c6298b4461d14b5e7f588d2ac25e0f27b584b3ba3d3173c800edfcff5037c0d828594804fc0c3babe496b0c5153238b6bd213d2fef75a69b4dfd2c32bf2b6d1
7
- data.tar.gz: 30e9ad3300d9db14a584c57efc30f6edf5cb231cbb35ce0e920db7cc8dbcd7b040950eaa8b1d09c9ffbf7afd91ac814a94a0fcdc074bb2bbeead9ea7ff8c2c6f
6
+ metadata.gz: fd9cc4447bf4900d393986a317daf171cc460dbbed69fc3debcb8d90115e1dcc6d37fc3f3bb7bc8d66c13770adbcc7daee90372e74b56d515e3f3c19082c03b5
7
+ data.tar.gz: 57eadc094de148690f8a3a2b60c52c3933730a8a127f6b7a9d8ed7da70009833bbbdce88ee73caf0f72ca8db9ef69adf298fcd421d3e3c274785d96d1e55f3dc
data/bin/astropanel CHANGED
@@ -14,7 +14,7 @@
14
14
  # for any damages resulting from its use. Further, I am under no
15
15
  # obligation to maintain or extend this software. It is provided
16
16
  # on an 'as is' basis without any expressed or implied warranty.
17
- # Version: 2.2: Fixed help (key '?')
17
+ # Version: 2.3: Greaceful exit when networks is down
18
18
 
19
19
  # LOAD MODULES {{{1
20
20
  require 'io/console'
@@ -1043,6 +1043,17 @@ class AstroPanelApp
1043
1043
  end
1044
1044
  end
1045
1045
 
1046
+ # START PROGRAM {{{1
1047
+ begin
1048
+ # a single quick DNS + TCP check
1049
+ TCPSocket.new('api.met.no', 443).close
1050
+ rescue SocketError, Socket::ResolutionError => e
1051
+ $stderr.puts "FATAL: can’t resolve api.met.no – network appears down (#{e.message})"
1052
+ $stdin.cooked!
1053
+ $stdin.echo = true
1054
+ exit!
1055
+ end
1056
+
1046
1057
  AstroPanelApp.new
1047
1058
 
1048
1059
  # VIM MODELINE{{{1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: astropanel
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.2'
4
+ version: '2.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-10 00:00:00.000000000 Z
11
+ date: 2025-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rcurses
@@ -28,8 +28,8 @@ description: 'This program shows essential data in order to plan your observatio
28
28
  9 days weather forecast, full ephemeris for the Sun, the Moon and all major planets,
29
29
  complete with graphic representation of rise/set times, detailed info for each day
30
30
  with important astronomical events, star chart displayed in the terminal and more.
31
- New in 2.0: Full rewrite using rcurses (https://github.com/isene/rcurses). 2.2:
32
- Fixed help (key ''?'')'
31
+ New in 2.0: Full rewrite using rcurses (https://github.com/isene/rcurses). 2.3:
32
+ Greaceful exit when networks is down.'
33
33
  email: g@isene.com
34
34
  executables:
35
35
  - astropanel