enviroblyd 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/enviroblyd/command.rb +7 -1
- data/lib/enviroblyd/version.rb +1 -1
- data/lib/enviroblyd/web.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf14c9c81dfe5bf5842d0cfca53466605c2c053149096a74c955a506132ae30a
|
4
|
+
data.tar.gz: 45c8f5812463f757a9a56ab906d1a15e61fb3ed5ae6c84fc123b86b12e887f74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2c0a0d8077062a6149ad420e2e1a3769bc5ce16c47815bf65f4b96ab3ef15f5c7e3d1f93c5eb7ba862e822dbbb8cfb39c2c42122a823298e54e9a9c82e314cc
|
7
|
+
data.tar.gz: c82f027d69d99d30a3aa17b51adc6ed26e0474910aa89041747091193ddcd2ec8c2bb548c91574a4bbfd8eeb429b679c7b351f5cfdc5be71ae84e47ade290034
|
data/lib/enviroblyd/command.rb
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
require "open3"
|
4
4
|
require "json"
|
5
|
+
require "zlib"
|
6
|
+
require "base64"
|
5
7
|
|
6
8
|
class Enviroblyd::Command
|
7
9
|
DEFAULT_TIMEOUT_SECONDS = 5 * 60
|
@@ -10,7 +12,7 @@ class Enviroblyd::Command
|
|
10
12
|
def initialize(message)
|
11
13
|
params = parse_message message
|
12
14
|
@url = params.fetch "url"
|
13
|
-
@script = params.fetch
|
15
|
+
@script = decode_and_decompress params.fetch("script")
|
14
16
|
@runtime = params.fetch "runtime", DEFAULT_RUNTIME
|
15
17
|
@timeout = params.fetch "timeout", DEFAULT_TIMEOUT_SECONDS
|
16
18
|
@stdout = @stderr = @exit_code = nil
|
@@ -54,4 +56,8 @@ class Enviroblyd::Command
|
|
54
56
|
rescue
|
55
57
|
nil
|
56
58
|
end
|
59
|
+
|
60
|
+
def decode_and_decompress(encoded_data)
|
61
|
+
Zlib::Inflate.inflate Base64.decode64(encoded_data)
|
62
|
+
end
|
57
63
|
end
|
data/lib/enviroblyd/version.rb
CHANGED
data/lib/enviroblyd/web.rb
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "net/http"
|
4
4
|
require "uri"
|
5
|
-
require "open3"
|
6
5
|
require "fileutils"
|
7
6
|
require "pathname"
|
8
7
|
require "json"
|
@@ -10,7 +9,6 @@ require "json"
|
|
10
9
|
class Enviroblyd::Web
|
11
10
|
USER_AGENT = "enviroblyd #{Enviroblyd::VERSION}"
|
12
11
|
CONTENT_TYPE = "application/json"
|
13
|
-
API_HOST = ENV.fetch("ENVIROBLYD_API_HOST", "envirobly.com")
|
14
12
|
WORKING_DIR = Pathname.new ENV.fetch("ENVIROBLYD_WORKING_DIR", "/var/envirobly/daemon")
|
15
13
|
INITIALIZED_FILE = WORKING_DIR.join "initialized"
|
16
14
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enviroblyd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Starsi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|