Commit a4a7593a authored by Cool Fire's avatar Cool Fire
Browse files

Merge branch 'development' into 'master'

Ruby 2.3 hotfix for preview-003

See merge request !3
parents ac99668e a2bd6d8f
Loading
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -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
+2 −2
Original line number Diff line number Diff line
@@ -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