Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed the luarocks source address #30

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

EricMarcantonio
Copy link

When trying to test locally, https://luarocks.org/releases/luarocks-3.1.3.tar.gz fails with Error code 60 (curl: (60) SSL certificate problem).

Adding this PR to change the Dockerfile to work with the releases from github instead.

Dockerfile Outdated
@@ -2,7 +2,7 @@ FROM openresty/openresty:stretch-fat

RUN apt-get update && \
apt-get -yq install cpanminus build-essential libreadline-dev unzip && \
curl -sSL https://luarocks.org/releases/luarocks-3.1.3.tar.gz -o luarocks-3.1.3.tar.gz && \
curl -sSL https://github.com/luarocks/luarocks/archive/refs/tags/v3.1.3.tar.gz -o luarocks-3.1.3.tar.gz && \
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curl -I https://luarocks.org/releases/luarocks-3.1.3.tar.gz
HTTP/1.1 302 Moved Temporarily
Server: nginx/1.20.1
Date: Thu, 26 May 2022 21:43:14 GMT
Content-Type: text/html
Content-Length: 151
Connection: keep-alive
Location: https://luarocks.github.io/luarocks/releases/luarocks-3.1.3.tar.gz
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
X-Frame-Options: deny

@EricMarcantonio
Copy link
Author

Upgraded LuaRocks and tested:

[----------] 16 tests from spec/resty/global_throttle/sliding_window_spec.lua (324.55 ms total)

[----------] Global test environment teardown.
[==========] 31 tests from 3 test files ran. (1554.01 ms total)
[  PASSED  ] 31 tests.

@EricMarcantonio
Copy link
Author

Changed a line to remove warnings, output:

Checking lib/resty/global_throttle/store/shared_dict.lua 1 warning

    lib/resty/global_throttle/store/shared_dict.lua:43:6: Error prone negation: negation is executed before relational operator.

Total: 1 warning / 0 errors in 5 files
make: *** [check] Error 1

is changed to:

Total: 0 warnings / 0 errors in 5 files
lib/resty/global_throttle.lua: 0.2.0 (0.2.0)
<line length warnings>

@@ -40,7 +40,7 @@ end

function _M.get(self, key)
local value = self.dict:get(key)
if not value == nil then
if (not value) == nil then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably just meant to say if not value then here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants