Skip to content

Commit 21bfa1f

Browse files
committed
Use body and POST for requests
1 parent 5d35f77 commit 21bfa1f

File tree

5 files changed

+3
-106
lines changed

5 files changed

+3
-106
lines changed

Gemfile

-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ group :test do
1515
gem 'minitest-stub-const'
1616
gem 'mocha'
1717
gem 'simplecov', '~> 0.17.0'
18-
gem 'httparty'
1918
gem 'rubocop', require: false
2019
gem 'rubocop-minitest', require: false
2120
gem 'rubocop-performance', require: false
22-
2321
end

Gemfile.lock

-8
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,11 @@ GEM
33
specs:
44
ast (2.4.2)
55
docile (1.3.2)
6-
httparty (0.18.1)
7-
mime-types (~> 3.0)
8-
multi_xml (>= 0.5.2)
96
json (2.3.1)
107
mandate (0.3.0)
11-
mime-types (3.3.1)
12-
mime-types-data (~> 3.2015)
13-
mime-types-data (3.2021.0225)
148
minitest (5.14.2)
159
minitest-stub-const (0.6)
1610
mocha (1.11.2)
17-
multi_xml (0.6.0)
1811
parallel (1.20.1)
1912
parser (3.0.0.0)
2013
ast (~> 2.4.1)
@@ -51,7 +44,6 @@ PLATFORMS
5144
ruby
5245

5346
DEPENDENCIES
54-
httparty
5547
json
5648
mandate
5749
minitest (~> 5.10, != 5.10.2)

lib/snippet_extractor/process_request.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def call
2121
end
2222

2323
def source_code
24-
event['queryStringParameters']['source_code']
24+
event['body']
2525
end
2626

2727
def language

template.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
AWSTemplateFormatVersion: '2010-09-09'
1+
AWSTemplateFormatVersion: "2010-09-09"
22
Transform: AWS::Serverless-2016-10-31
33
Description: >
44
sam-app
5-
65
Sample SAM Template for sam-app
76
87
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
@@ -20,7 +19,7 @@ Resources:
2019
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
2120
Properties:
2221
Path: /extract_snippet
23-
Method: get
22+
Method: post
2423
Metadata:
2524
DockerTag: ruby2.7-v1
2625
DockerContext: ./

test/e2e_test.rb

-92
This file was deleted.

0 commit comments

Comments
 (0)