neh 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/neh/cli/base.rb +9 -8
- data/lib/neh/cli/o.rb +6 -0
- data/lib/neh/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c3f44261ded942a8b71b5220b9090665c7bab7a421cad3679021b0532659bec
|
4
|
+
data.tar.gz: 5933563a6faface0525a0e09db270fc110a5701124e31f64fed68d21c293d27c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c937fce4a966a8862dfa7a49a6559384d0ec2d4cc310d3953a37930b70e61cc2cd950945282600980b79c6f548e388650c5bbb0d44f85c4494963e33d5f55412
|
7
|
+
data.tar.gz: f916960510c1afee4da69f1769e80d5f3fcf564dbe327cc25f4380df9c1f24b281ca4a908c12da602696358bd44883dad74b5b9c5911c7933836a2d967df823f
|
data/lib/neh/cli/base.rb
CHANGED
@@ -9,6 +9,7 @@ require 'async/websocket/client'
|
|
9
9
|
require 'ruby-progressbar'
|
10
10
|
require 'faraday'
|
11
11
|
require 'pry'
|
12
|
+
require 'active_support/all'
|
12
13
|
|
13
14
|
class Neh::Cli::Base
|
14
15
|
def initialize(*args, options:)
|
@@ -68,11 +69,14 @@ class Neh::Cli::Base
|
|
68
69
|
when 'output'
|
69
70
|
print message[:message]
|
70
71
|
when 'worker_done'
|
71
|
-
|
72
|
-
connection.close
|
72
|
+
close(connection)
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
+
def close(connection)
|
77
|
+
connection.close
|
78
|
+
end
|
79
|
+
|
76
80
|
def subscribe(connection)
|
77
81
|
content =
|
78
82
|
{
|
@@ -96,7 +100,8 @@ class Neh::Cli::Base
|
|
96
100
|
end
|
97
101
|
|
98
102
|
body = JSON.parse response.body
|
99
|
-
|
103
|
+
message = body['message']
|
104
|
+
puts message if message.present?
|
100
105
|
end
|
101
106
|
|
102
107
|
def command
|
@@ -106,7 +111,7 @@ class Neh::Cli::Base
|
|
106
111
|
raise NotImplementedError, 'command method must be implemented in subclasses'
|
107
112
|
end
|
108
113
|
|
109
|
-
self.class.name.
|
114
|
+
self.class.name.demodulize.downcase
|
110
115
|
end
|
111
116
|
|
112
117
|
def http_connection
|
@@ -119,8 +124,4 @@ class Neh::Cli::Base
|
|
119
124
|
def protocol
|
120
125
|
@endpoint.secure? ? 'https' : 'http'
|
121
126
|
end
|
122
|
-
|
123
|
-
def debug_mode?
|
124
|
-
ENV['NEH_DEBUG'] == 'true'
|
125
|
-
end
|
126
127
|
end
|
data/lib/neh/cli/o.rb
CHANGED
data/lib/neh/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Atsushi Ishida
|
@@ -10,6 +10,20 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2024-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '7.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '7.2'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: async-io
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|