neh 0.0.16 → 0.0.18

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: dfe0d65e3408f013ff78b8fd68f4681631e603145afa2ba459d00f29295fb0b3
4
- data.tar.gz: a866fbb1d874bd0be0e9ef608674bc45a0f57ef13242a45b0715919871838ca0
3
+ metadata.gz: 3a0072dc145f6f3c9465b0ab362284e8524e12714c9fe691e2b3409068053bb2
4
+ data.tar.gz: dc46224b988d300326cb4bde008d244651e67bf0b723194992217db54d7b2f8c
5
5
  SHA512:
6
- metadata.gz: 825a107e9afe80f70e6c0736392b29c3ae604062552a1ce93a8cf2dec9c44eaa4661084efb89029f8817a8d48455a1815d3930d1c2664e81b8695b701966cd36
7
- data.tar.gz: 27e0f1c9215e4e0e52edc15011843cb7840bf59fdc08952ffcee42180a42298e11a3ee0de0a3c6e1999d35e7b7ea64d865d45919af9a8107c6f49893eb26e476
6
+ metadata.gz: 53cec3325e390fc4b6d480139178a97f8fd9b3cf656aabe1b88b033091573fd2b59914ac2ddc69596547588b9fe31eff9c5431d08df55e921d4b0fc971d30418
7
+ data.tar.gz: 5a6e101c210e48c84a8c29957e46a761c928e00b3a0a50cd62be7b5f803af195d9f77148e3e766e476a906b348d8f1eedacadc283d5a6adb6eeaa9b444ccb786
data/lib/neh/cli/base.rb CHANGED
@@ -38,9 +38,11 @@ class Neh::Cli::Base
38
38
  private
39
39
 
40
40
  def token
41
- ENV.fetch('NEH_PERSONAL_ACCESS_TOKEN')
42
- rescue KeyError
43
- puts 'Please set the environment variable NEH_PERSONAL_ACCESS_TOKEN'
41
+ neh_personal_access_token = ENV.fetch('NEH_PERSONAL_ACCESS_TOKEN', nil)
42
+
43
+ puts 'Please set the environment variable NEH_PERSONAL_ACCESS_TOKEN.' if neh_personal_access_token.blank?
44
+
45
+ neh_personal_access_token
44
46
  end
45
47
 
46
48
  def on_receive(connection, message)
@@ -59,6 +61,12 @@ class Neh::Cli::Base
59
61
  subscribe(connection)
60
62
  when 'confirm_subscription'
61
63
  on_subscribed
64
+ when 'disconnect'
65
+ puts "Connection has been disconnected. Reason: #{message[:reason]}"
66
+ close(connection)
67
+ else
68
+ puts "Unknown message type: #{type}. Closing connection."
69
+ close(connection)
62
70
  end
63
71
  end
64
72
 
data/lib/neh/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Neh
4
- VERSION = "0.0.16"
4
+ VERSION = "0.0.18"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atsushi Ishida
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-11 00:00:00.000000000 Z
11
+ date: 2024-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport