This is an automated email from the ASF dual-hosted git repository.

rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-apigateway.git


The following commit(s) were added to refs/heads/master by this push:
     new f2a091b  chore: fix spelling (#390)
f2a091b is described below

commit f2a091b6174bf7b60500b448abb2421377200bfa
Author: John Bampton <[email protected]>
AuthorDate: Wed Mar 10 02:21:59 2021 +1000

    chore: fix spelling (#390)
---
 conf.d/api_gateway_init.conf                   | 2 +-
 doc/v2/management_interface_v2.md              | 2 +-
 naxsi_core.rules                               | 2 +-
 scripts/lua/lib/redis.lua                      | 2 +-
 scripts/lua/management/lib/tenants.lua         | 2 +-
 scripts/lua/policies/mapping.lua               | 2 +-
 scripts/lua/policies/security.lua              | 2 +-
 scripts/lua/policies/security/clientSecret.lua | 2 +-
 scripts/lua/policies/security/oauth2.lua       | 2 +-
 tests/fakengx.lua                              | 6 +++---
 tests/scripts/lua/lib/redis.lua                | 2 +-
 tests/scripts/lua/lib/utils.lua                | 6 +++---
 12 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/conf.d/api_gateway_init.conf b/conf.d/api_gateway_init.conf
index cbd0c41..9470413 100644
--- a/conf.d/api_gateway_init.conf
+++ b/conf.d/api_gateway_init.conf
@@ -26,7 +26,7 @@ sendfile        on;
 # or for throughput optimization.
 tcp_nopush     on;
 
-# Caches information about open FDs, freqently accessed files.
+# Caches information about open FDs, frequently accessed files.
 open_file_cache max=200000 inactive=20s;
 open_file_cache_valid 30s;
 open_file_cache_min_uses 2;
diff --git a/doc/v2/management_interface_v2.md 
b/doc/v2/management_interface_v2.md
index 31ab76b..e9c1b39 100644
--- a/doc/v2/management_interface_v2.md
+++ b/doc/v2/management_interface_v2.md
@@ -168,7 +168,7 @@ Update an existing managed API.
 
 * `tenant_id`: *(string) the tenant associated with this API
 * `artifact_id`: *(string) the id associated with this API
-* The body is a JSON object that represents this API's [OpenAPI 2.0 
spec](http://swagger.io/specification/), as decribed above
+* The body is a JSON object that represents this API's [OpenAPI 2.0 
spec](http://swagger.io/specification/), as described above
 
 _returns:_
 
diff --git a/naxsi_core.rules b/naxsi_core.rules
index f713232..1bf6831 100644
--- a/naxsi_core.rules
+++ b/naxsi_core.rules
@@ -87,7 +87,7 @@ MainRule "rx:%[2|3]."  "msg:double encoding !" 
"mz:ARGS|URL|BODY|$HEADERS_VAR:Co
 ####################################
 MainRule "str:&#" "msg: utf7/8 encoding" 
"mz:ARGS|BODY|URL|$HEADERS_VAR:Cookie" "s:$EVADE:4" id:1400;
 MainRule "str:%U" "msg: M$ encoding" "mz:ARGS|BODY|URL|$HEADERS_VAR:Cookie" 
"s:$EVADE:4" id:1401;
-MainRule negative "rx:multipart/form-data|application/x-www-form-urlencoded" 
"msg:Content is neither mulipart/x-www-form.." "mz:$HEADERS_VAR:Content-type" 
"s:$EVADE:4" id:1402;
+MainRule negative "rx:multipart/form-data|application/x-www-form-urlencoded" 
"msg:Content is neither multipart/x-www-form.." "mz:$HEADERS_VAR:Content-type" 
"s:$EVADE:4" id:1402;
 
 #############################
 ## File uploads: 1500-1600 ##
diff --git a/scripts/lua/lib/redis.lua b/scripts/lua/lib/redis.lua
index 0012281..ccf524f 100644
--- a/scripts/lua/lib/redis.lua
+++ b/scripts/lua/lib/redis.lua
@@ -71,7 +71,7 @@ function _M.init()
   local retryCount = REDIS_RETRY_COUNT
   local connect, err = red:connect(host, port)
   while not connect and retryCount > 0 do
-    local msg = utils.concatStrings({"Failed to conect to redis at ", host, 
":", port, ". Retrying ", retryCount, " more times."})
+    local msg = utils.concatStrings({"Failed to connect to redis at ", host, 
":", port, ". Retrying ", retryCount, " more times."})
     if retryCount == 1 then
       msg = utils.concatStrings({msg:sub(1, -3), "."})
     end
diff --git a/scripts/lua/management/lib/tenants.lua 
b/scripts/lua/management/lib/tenants.lua
index e99d885..69a67c5 100644
--- a/scripts/lua/management/lib/tenants.lua
+++ b/scripts/lua/management/lib/tenants.lua
@@ -124,7 +124,7 @@ local function applyPagingToAPIs(apiList, queryParams)
   return apis_obj
 end
 
---- Filter apis based on query paramters
+--- Filter apis based on query parameters
 -- @param queryParams query parameters to filter apis
 local function filterTenantAPIs(id, apis_obj, queryParams)
   local basePath = queryParams['filter[where][basePath]']
diff --git a/scripts/lua/policies/mapping.lua b/scripts/lua/policies/mapping.lua
index 9b06fdc..dc72466 100644
--- a/scripts/lua/policies/mapping.lua
+++ b/scripts/lua/policies/mapping.lua
@@ -226,7 +226,7 @@ local function finalize()
 end
 
 --- Implementation for the mapping policy.
--- @param map The mapping object that contains details about request 
tranformations
+-- @param map The mapping object that contains details about request 
transformations
 local function processMap(map)
   getRequestParams()
   for _, v in pairs(map) do
diff --git a/scripts/lua/policies/security.lua 
b/scripts/lua/policies/security.lua
index 4afe76c..70ee329 100644
--- a/scripts/lua/policies/security.lua
+++ b/scripts/lua/policies/security.lua
@@ -27,7 +27,7 @@ local utils = require "lib/utils"
 local function process(dataStore, securityObj)
   local ok, result = pcall(require, utils.concatStrings({'policies/security/', 
securityObj.type}))
   if not ok then
-    ngx.log(ngx.ERR, 'An unexpected error ocurred while processing the 
security policy: ' .. securityObj.type)
+    ngx.log(ngx.ERR, 'An unexpected error occurred while processing the 
security policy: ' .. securityObj.type)
     request.err(500, 'Gateway error.')
   end
   return result.process(dataStore, securityObj)
diff --git a/scripts/lua/policies/security/clientSecret.lua 
b/scripts/lua/policies/security/clientSecret.lua
index ee161d8..19a9505 100644
--- a/scripts/lua/policies/security/clientSecret.lua
+++ b/scripts/lua/policies/security/clientSecret.lua
@@ -49,7 +49,7 @@ local function validate(dataStore, tenant, gatewayPath, 
apiId, scope, clientId,
   end
 end
 
---- In order to properly test this functionallity, I use this function to do 
all of the business logic with injected dependencies
+--- In order to properly test this functionality, I use this function to do 
all of the business logic with injected dependencies
 -- Takes 2 headers and decides if the request should be allowed based on a 
hashed secret key
 -- @param dataStore the datastore object
 -- @param securityObj the security configuration for the tenant/resource/api 
we are verifying
diff --git a/scripts/lua/policies/security/oauth2.lua 
b/scripts/lua/policies/security/oauth2.lua
index c1492e5..505ab36 100644
--- a/scripts/lua/policies/security/oauth2.lua
+++ b/scripts/lua/policies/security/oauth2.lua
@@ -27,7 +27,7 @@ local _M = {}
 -- @param dataStore the datastore object
 -- @param token the accessToken passed in the authorization header of the 
routing request
 -- @param provider the name of the provider we will load from a file. 
Currently supported google/github/facebook
--- @return the json object recieved from exchanging tokens with the provider
+-- @return the json object received from exchanging tokens with the provider
 local function exchange(dataStore, token, provider, securityObj)
   -- exchange tokens with the provider
   local loaded, impl = pcall(require, utils.concatStrings({'oauth/', 
provider}))
diff --git a/tests/fakengx.lua b/tests/fakengx.lua
index bae2d2a..a78ee84 100644
--- a/tests/fakengx.lua
+++ b/tests/fakengx.lua
@@ -241,7 +241,7 @@ function SharedDict:incr(key, value)
 end
 
 -- NGX Prototype
-local protoype = {
+local prototype = {
 
   -- Log constants
   STDERR = 0,
@@ -303,10 +303,10 @@ local fakengx = {}
 -- Constructor
 function fakengx.new()
   local ngx = {}
-  for k, v in pairs(protoype) do
+  for k, v in pairs(prototype) do
     ngx[k] = v
   end
-  setmetatable(ngx, getmetatable(protoype))
+  setmetatable(ngx, getmetatable(prototype))
 
   -- Create namespaces
   ngx.req       = {}
diff --git a/tests/scripts/lua/lib/redis.lua b/tests/scripts/lua/lib/redis.lua
index 5ff393e..71636b7 100644
--- a/tests/scripts/lua/lib/redis.lua
+++ b/tests/scripts/lua/lib/redis.lua
@@ -165,7 +165,7 @@ describe('Testing Redis module', function()
     assert.are.same(expected, generated)
   end)
 
-  it('shoud create an API Key subscription', function()
+  it('should create an API Key subscription', function()
     local key = 'subscriptions:test:apikey'
     local ds = require "lib/dataStore"
     local dataStore = ds.initWithDriver(red)
diff --git a/tests/scripts/lua/lib/utils.lua b/tests/scripts/lua/lib/utils.lua
index 598b52f..21982d0 100644
--- a/tests/scripts/lua/lib/utils.lua
+++ b/tests/scripts/lua/lib/utils.lua
@@ -34,14 +34,14 @@ describe('Testing utils module', function()
       test = true
     }
     local serialized = utils.serializeTable(expected)
-    loadstring('generated = ' .. serialized)() -- convert serialzed string to 
lua table
+    loadstring('generated = ' .. serialized)() -- convert serialized string to 
lua table
     assert.are.same(expected, generated)
   end)
 
   it('should serialize an empty table', function()
     local expected = {}
     local serialized = utils.serializeTable(expected)
-    loadstring('generated = ' .. serialized)() -- convert serialzed string to 
lua table
+    loadstring('generated = ' .. serialized)() -- convert serialized string to 
lua table
     assert.are.same(expected, generated)
   end)
 
@@ -53,7 +53,7 @@ describe('Testing utils module', function()
       test2 = true
     }
     local serialized = utils.serializeTable(expected)
-    loadstring('generated = ' .. serialized)() -- convert serialzed string to 
lua table
+    loadstring('generated = ' .. serialized)() -- convert serialized string to 
lua table
     assert.are.same(expected, generated)
   end)
 end)

Reply via email to