lambda_open_api 0.4.0 → 0.4.2

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: 668813e6540b575a0f236bcd4573e62e8bbb1fd7a4da444cc4a45e12e8c79a19
4
- data.tar.gz: 3cea133cc9dc22238667bc1015c913d3d9a9af18a2a4c1301617810ee252d5ab
3
+ metadata.gz: 9fc21cc07b51a516198f994a6016701e0a07453ef976e58698c80ebcba51ebf1
4
+ data.tar.gz: 95545f944de7faa63ebe988a68c19b40452457b82b1c39483806a07889416c9a
5
5
  SHA512:
6
- metadata.gz: 9cb4df4f6c316ae4b94937dc35e156e6d882609a3ede0b72b19d58813bc2000654a88735721ecea9df1783fcead7e7141b9c7b59223df671becb646472c738ea
7
- data.tar.gz: 4ffa3f982fedbf0bc6db2a24369f293780b77a78bf4c016b1dd839dcd68ec14ce764dca2438dac74acfbba12e470708e4658f59efd5268400cbfd7e6c5fb9a31
6
+ metadata.gz: 4d07d3b88d381ba001bfbda911f72941c4a28862132d897350cb13eacb397dda1ee637e0250420048cdf87587e4722dc7dd51c51272f3392a320188b0585038b
7
+ data.tar.gz: 716a70f17e8569dfc1601f9271044c366abf77482b0b818be28a181c942bde9995e68251121abfe749094791cb343093b281606fd520af2d43d7fd29545410d4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lambda_open_api (0.4.0)
4
+ lambda_open_api (0.4.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -51,7 +51,7 @@ module LambdaOpenApi
51
51
  @action = LambdaOpenApi::Action.new(name: @name, http_verb: verb, path_name: path)
52
52
  @event = @default_event.dup
53
53
  @event.request_context = {"httpMethod" => verb.upcase, "http" => {"method" => verb.upcase}}
54
-
54
+ @event.path = path
55
55
  yield
56
56
 
57
57
  @action.set_request_body(JSON.parse(@event.body))
@@ -8,6 +8,7 @@ module LambdaOpenApi
8
8
  end
9
9
 
10
10
  def response_body
11
+ return unless response
11
12
  response["body"] || response[:body] || response
12
13
  end
13
14
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LambdaOpenApi
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lambda_open_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timothyjb
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-10 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -70,7 +70,6 @@ files:
70
70
  - LICENSE.txt
71
71
  - README.md
72
72
  - Rakefile
73
- - lambda_open_api.gemspec
74
73
  - lib/lambda_open_api.rb
75
74
  - lib/lambda_open_api/action.rb
76
75
  - lib/lambda_open_api/body_parameter.rb
@@ -1,38 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "lib/lambda_open_api/version"
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = "lambda_open_api"
7
- spec.version = LambdaOpenApi::VERSION
8
- spec.authors = ["Timothyjb"]
9
- spec.email = ["timothyjbarkley@gmail.com"]
10
-
11
- spec.summary = "A DSL for generating OpenAPI (swagger) files for APIs using AWS Lambda"
12
- spec.description = "This gem is a light weight DSL that works with rspec to allow developers to generate an OpenAPI (swagger) file based an AWS Lambda invoked by API Gateway. It works by writing a simple unit test for your lambda's code. When the test is executed, the input event and returned response are captured and used to build an OpenAPI file."
13
- spec.homepage = "https://github.com/Timothyjb/lambda_open_api"
14
- spec.license = "MIT"
15
- spec.required_ruby_version = ">= 2.5.0"
16
-
17
- spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = "https://github.com/Timothyjb/lambda_open_api"
19
-
20
- # Specify which files should be added to the gem when it is released.
21
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
- spec.files = Dir.chdir(__dir__) do
23
- `git ls-files -z`.split("\x0").reject do |f|
24
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
25
- end
26
- end
27
- spec.bindir = "exe"
28
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
- spec.require_paths = ["lib"]
30
-
31
- # Uncomment to register a new dependency of your gem
32
- spec.add_development_dependency "minitest"
33
- spec.add_development_dependency "minitest-reporters"
34
- spec.add_development_dependency "rspec"
35
-
36
- # For more information and examples about making a new gem, check out our
37
- # guide at: https://bundler.io/guides/creating_gem.html
38
- end