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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ee1d66c80f81d7cc0caa58bd4eeee0d107c6fe02e29228281a5fdcc231f808f
4
- data.tar.gz: ca0ce61dab155c561c94547569e680b27c5a4fc36150f739290fdc91da1d9b42
3
+ metadata.gz: dce401866a14fbce98621f6c677ab0f17df796c1c9c0792d4a1030adc69eadbd
4
+ data.tar.gz: 593c2f449b053f4bdc6ae2dbe74602f0debd93d57a57a1811d7f791bc1b40fc9
5
5
  SHA512:
6
- metadata.gz: ccec86a4dc162eaab7bb8dcf7629a7aec1d8b6d04ad1e32a6f10f41cca63054172c8a5dc1a046d871b0308a5b788a9a12933c5c524cc155fbf1101ee52df9aef
7
- data.tar.gz: 5c85d4254987888fc1f53605f6f16dcaa3aaa306fbcdff6444b63cb399216e8decca1363a4309b7603a0073b3ab18c2b8ad397c2aa03fd611c4ac121e3ad8015
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lamby (4.3.0)
4
+ lamby (4.3.3)
5
5
  rack
6
6
 
7
7
  GEM
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 'lamby', 'command'
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).to_s
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 'lamby', 'command'
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 'lamby', 'runner'
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 'lamby', 'runner'
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
@@ -1,3 +1,3 @@
1
1
  module Lamby
2
- VERSION = '4.3.0'
2
+ VERSION = '4.3.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lamby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.0
4
+ version: 4.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins