Commit a4a7593a authored by Cool Fire's avatar Cool Fire

Merge branch 'development' into 'master'

Ruby 2.3 hotfix for preview-003

See merge request !3
parents ac99668e a2bd6d8f
Pipeline #355 passed with stages
in 2 minutes and 15 seconds
......@@ -4,15 +4,29 @@ stages:
- linting
- testing
- deploy
syntax_ruby:
syntax_ruby_2-4:
stage: syntax
image: ruby:2.4
script:
- ruby -v
- find . -name '*\.rb' -exec bash -c 'echo -ne "{}\t\t\t" && ruby -c {}' \;
syntax_erb:
syntax_erb_2-4:
stage: syntax
image: ruby:2.4
script:
- ruby -v
- find . -name '*\.erb' -exec bash -c 'echo -ne "{}\t\t\t" && erb -P -x {} | ruby -c' \;
syntax_ruby_2-3:
stage: syntax
image: ruby:2.3
script:
- ruby -v
- find . -name '*\.rb' -exec bash -c 'echo -ne "{}\t\t\t" && ruby -c {}' \;
syntax_erb_2-3:
stage: syntax
image: ruby:2.3
script:
- ruby -v
- find . -name '*\.erb' -exec bash -c 'echo -ne "{}\t\t\t" && erb -P -x {} | ruby -c' \;
lint_ruby:
stage: linting
......
......@@ -27,8 +27,8 @@ class SignupSite < Sinatra::Base
def check_code(code)
return true if code.nil?
return false if code.match?(/^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$/)
return true if code.match(/^\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$/).nil?
# TODO: Check code against database
true
false
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment