neh 0.0.15 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0fcd7a31e9cd33e09713b00d1f7cc0b4f50c2cf8318e6030133d27959ecc742
4
- data.tar.gz: d85ae50d14de761edfb5d7b00ec7a99a1b82a04ef8cecc5d394fd80956cda89d
3
+ metadata.gz: 3fbbad76600f29de32a2230087fa413ff037e8b890fc66d0d1761057e11e457f
4
+ data.tar.gz: 60dd8915dd7f3ca9d43334edeec940cd1364f0ad4e5ab2207eaccc09c66d3b01
5
5
  SHA512:
6
- metadata.gz: 14190faccda79ce77123c39b8e658b5829e9f6aacef8395f8429a5cdf6a67a899387c0ae5957d152f8e64aef3832e52014b41e192f41de919b26851d0e431eb5
7
- data.tar.gz: b7a9d0a744422f6c6b2fde1a2bfce49dcce667b967d3fd2962d60d2cc51a19b7d3ddbf5c4194c533fe6ff59a58ca9499ec1118b42026db37298efe8ed890253c
6
+ metadata.gz: 2fbda86199f54a166cff5dc086ab349c9a56f48cb2c64c67686c67b045bd63128c7c4e37c3bdb34bc3f7429a0904ee2fe9ed6b1bf794ff8072d727cd47e7347a
7
+ data.tar.gz: c1ef501a69604b58236d689554f59c9387c9f637a1d281516b0b34daa28bdfac6510e64ffd4799e89279d6a82f75757d12292ac0de467c1d4543a387f832ea1c
data/lib/neh/cli/base.rb CHANGED
@@ -25,14 +25,12 @@ class Neh::Cli::Base
25
25
  end
26
26
 
27
27
  def execute
28
- Async do |_task|
29
- Async::WebSocket::Client.connect(@endpoint, headers: { 'Authorization' => "Bearer #{token}" }) do |connection|
30
- while (message = connection.read)
31
- parsed_message =
32
- JSON.parse(message, symbolize_names: true)
33
-
34
- on_receive(connection, parsed_message)
35
- end
28
+ Async::WebSocket::Client.connect(@endpoint, headers: { 'Authorization' => "Bearer #{token}" }) do |connection|
29
+ while (message = connection.read)
30
+ parsed_message =
31
+ JSON.parse(message, symbolize_names: true)
32
+
33
+ on_receive(connection, parsed_message)
36
34
  end
37
35
  end
38
36
  end
@@ -40,9 +38,11 @@ class Neh::Cli::Base
40
38
  private
41
39
 
42
40
  def token
43
- ENV.fetch('NEH_PERSONAL_ACCESS_TOKEN')
44
- rescue KeyError
45
- 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
46
46
  end
47
47
 
48
48
  def on_receive(connection, message)
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.15"
4
+ VERSION = "0.0.17"
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.15
4
+ version: 0.0.17
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