lamby 4.3.0 → 4.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/lib/lamby/command.rb +5 -4
- data/lib/lamby/runner.rb +4 -2
- data/lib/lamby/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dce401866a14fbce98621f6c677ab0f17df796c1c9c0792d4a1030adc69eadbd
|
4
|
+
data.tar.gz: 593c2f449b053f4bdc6ae2dbe74602f0debd93d57a57a1811d7f791bc1b40fc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f119c574a97288c37eb7c5c97643650d2d730fe16ab7b7e6b06a777088e069b6050c4ab023856e32c10c7da0029d74067eb8db37492b0dc0c1a0ed3948f7ee9
|
7
|
+
data.tar.gz: 1bf90e93726e78a75f408801976f65c7dafe369cc14d567fb4ddb337832a0b3dfb10fb1d8e2f91b9b7cf20d42c176f914f0b33c3641accbbc8fd757ec3d56ba6
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
|
3
3
|
See this http://keepachangelog.com link for information on how we want this documented formatted.
|
4
4
|
|
5
|
+
## v4.3.1, v4.3.2
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
- Command response will be #inspect for every command.
|
10
|
+
- Added x-lambda-console option to the event.
|
11
|
+
|
5
12
|
## v4.3.0
|
6
13
|
|
7
14
|
### Changed
|
data/Gemfile.lock
CHANGED
data/lib/lamby/command.rb
CHANGED
@@ -4,7 +4,8 @@ module Lamby
|
|
4
4
|
class << self
|
5
5
|
|
6
6
|
def handle?(event)
|
7
|
-
event.dig
|
7
|
+
event.dig('x-lambda-console', 'command') ||
|
8
|
+
event.dig('lamby', 'command')
|
8
9
|
end
|
9
10
|
|
10
11
|
def cmd(event:, context:)
|
@@ -20,8 +21,7 @@ module Lamby
|
|
20
21
|
|
21
22
|
def call
|
22
23
|
begin
|
23
|
-
body = eval(command, TOPLEVEL_BINDING).
|
24
|
-
body = body.inspect if body =~ /\A"/ && body =~ /"\z/
|
24
|
+
body = eval(command, TOPLEVEL_BINDING).inspect
|
25
25
|
{ statusCode: 200, headers: {}, body: body }
|
26
26
|
rescue Exception => e
|
27
27
|
body = "#<#{e.class}:#{e.message}>".tap do |b|
|
@@ -35,7 +35,8 @@ module Lamby
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def command
|
38
|
-
@event.dig
|
38
|
+
@event.dig('x-lambda-console', 'command') ||
|
39
|
+
@event.dig('lamby', 'command')
|
39
40
|
end
|
40
41
|
|
41
42
|
end
|
data/lib/lamby/runner.rb
CHANGED
@@ -10,7 +10,8 @@ module Lamby
|
|
10
10
|
class << self
|
11
11
|
|
12
12
|
def handle?(event)
|
13
|
-
event.dig
|
13
|
+
event.dig('x-lambda-console', 'runner') ||
|
14
|
+
event.dig('lamby', 'runner')
|
14
15
|
end
|
15
16
|
|
16
17
|
def cmd(event:, context:)
|
@@ -36,7 +37,8 @@ module Lamby
|
|
36
37
|
end
|
37
38
|
|
38
39
|
def command
|
39
|
-
@event.dig
|
40
|
+
@event.dig('x-lambda-console', 'runner') ||
|
41
|
+
@event.dig('lamby', 'runner')
|
40
42
|
end
|
41
43
|
|
42
44
|
private
|
data/lib/lamby/version.rb
CHANGED