neh 0.0.12 → 0.0.14
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: '08399492b4d47444c8c43d975b3df949219276b076a98579b461823c0e5d1081'
|
4
|
+
data.tar.gz: 07c1d0c6e29b7953d840e92fa773b0ffc755ea72f6e43b062b71072267aa45d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf8804f0e3a76aa3a07a97051a14d09434cd48773f0304d85e0bf7cfa0f8e0182ad8d99b8bcf71a59a88376f1608b3285a99bd0c171b54a0dbe8919dda2a3cc9
|
7
|
+
data.tar.gz: 11049ae95e7cdb9934f37549d7e79bf4ccc4fbf23705f13f15cad36817bf9bb075b402d3bf96b16496495dae5978b021114d6eaaf9872daba93b57084addc4d5
|
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.14
|
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.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '7.1'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: async-io
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|