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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ee23f077b2167f86dc40dcf5d0f2c1d8d04f806ebf883cb4b926778a549d37c
4
- data.tar.gz: 95cf5614fa37ae4abcbddcfdca91bd364580c2aaf4fe73c99d0fdac13799009e
3
+ metadata.gz: 0c3f44261ded942a8b71b5220b9090665c7bab7a421cad3679021b0532659bec
4
+ data.tar.gz: 5933563a6faface0525a0e09db270fc110a5701124e31f64fed68d21c293d27c
5
5
  SHA512:
6
- metadata.gz: f0348653539a6f078c28a17544b5a0ca9119458457774937b1e6cbcf5ec59a8038a36992f03885f0fca7773ad1e975a7241c25471ead5055495ff453cebeeb1e
7
- data.tar.gz: f4c05d264f7ec7669d846e83eea18680e0178b0830f5ecfdce5cf0a1898c5cb1190e4bcb3f65b7692a7da18d4df2553977359d4a38d55ccf64cca16599bbe05a
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
- puts ''
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
- puts body['message'] if debug_mode?
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.split('::').last.downcase
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
@@ -2,5 +2,11 @@
2
2
 
3
3
  module Neh::Cli
4
4
  class O < Base
5
+ private
6
+
7
+ def close(connection)
8
+ puts ''
9
+ super
10
+ end
5
11
  end
6
12
  end
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.12"
4
+ VERSION = "0.0.13"
5
5
  end
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.12
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