mirror of
https://github.com/hakanensari/frankfurter.git
synced 2024-11-25 04:22:28 +01:00
Housekeeping
- Use setup ruby action - Update gems - Rubocop fixes - Don't mutate params
This commit is contained in:
parent
663034093f
commit
72fe6022c9
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -5,8 +5,6 @@ on: [push, pull_request]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ruby:2.7.1
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:12
|
||||
@ -17,6 +15,7 @@ jobs:
|
||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ruby/setup-ruby@v1
|
||||
- run: gem install bundler
|
||||
- run: bundle install --jobs 4 --retry 3
|
||||
- run: bundle exec rake
|
||||
|
@ -1,8 +1,9 @@
|
||||
inherit_from: ".rubocop_todo.yml"
|
||||
|
||||
require:
|
||||
- rubocop-minitest
|
||||
- rubocop-performance
|
||||
- rubocop-sequel
|
||||
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.6
|
||||
TargetRubyVersion: 2.7
|
||||
|
@ -1,15 +1,21 @@
|
||||
Lint/RaiseException:
|
||||
Enabled: true
|
||||
Lint/StructNewOverride:
|
||||
Enabled: true
|
||||
Metrics/AbcSize:
|
||||
Max: 21.79
|
||||
Metrics/BlockLength:
|
||||
ExcludedMethods: ['dataset_module', 'describe', 'helpers']
|
||||
ExcludedMethods: ['describe', 'helpers']
|
||||
Metrics/MethodLength:
|
||||
Max: 13
|
||||
Style/Documentation:
|
||||
Enabled: false
|
||||
|
||||
# New cops
|
||||
Layout/SpaceAroundMethodCallOperator:
|
||||
Enabled: true
|
||||
Lint/RaiseException:
|
||||
Enabled: true
|
||||
Lint/StructNewOverride:
|
||||
Enabled: true
|
||||
Style/ExponentialNotation:
|
||||
Enabled: true
|
||||
Style/HashEachMethods:
|
||||
Enabled: true
|
||||
Style/HashTransformKeys:
|
||||
|
3
Gemfile
3
Gemfile
@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
source 'http://rubygems.org'
|
||||
source 'https://rubygems.org'
|
||||
|
||||
ruby '2.7.1'
|
||||
|
||||
@ -19,6 +19,7 @@ group :test do
|
||||
gem 'minitest-around'
|
||||
gem 'minitest-focus'
|
||||
gem 'rack-test'
|
||||
gem 'rubocop-minitest'
|
||||
gem 'rubocop-performance'
|
||||
gem 'rubocop-sequel'
|
||||
gem 'simplecov'
|
||||
|
23
Gemfile.lock
23
Gemfile.lock
@ -1,5 +1,5 @@
|
||||
GEM
|
||||
remote: http://rubygems.org/
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
@ -10,7 +10,7 @@ GEM
|
||||
docile (1.3.2)
|
||||
et-orbi (1.2.4)
|
||||
tzinfo
|
||||
fugit (1.3.3)
|
||||
fugit (1.3.4)
|
||||
et-orbi (~> 1.1, >= 1.1.8)
|
||||
raabro (~> 1.1)
|
||||
hashdiff (1.0.1)
|
||||
@ -27,13 +27,13 @@ GEM
|
||||
i18n (>= 0.6.4, <= 2)
|
||||
mustermann (1.1.1)
|
||||
ruby2_keywords (~> 0.0.1)
|
||||
oj (3.10.5)
|
||||
oj (3.10.6)
|
||||
ox (2.13.2)
|
||||
parallel (1.19.1)
|
||||
parser (2.7.0.5)
|
||||
parser (2.7.1.2)
|
||||
ast (~> 2.4.0)
|
||||
pg (1.2.3)
|
||||
public_suffix (4.0.3)
|
||||
public_suffix (4.0.4)
|
||||
raabro (1.1.6)
|
||||
rack (2.2.2)
|
||||
rack-cors (1.1.1)
|
||||
@ -46,7 +46,7 @@ GEM
|
||||
raindrops (0.19.1)
|
||||
rake (13.0.1)
|
||||
rexml (3.2.4)
|
||||
rubocop (0.81.0)
|
||||
rubocop (0.82.0)
|
||||
jaro_winkler (~> 1.5.1)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.7.0.1)
|
||||
@ -54,6 +54,8 @@ GEM
|
||||
rexml
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 2.0)
|
||||
rubocop-minitest (0.9.0)
|
||||
rubocop (>= 0.74)
|
||||
rubocop-performance (1.5.2)
|
||||
rubocop (>= 0.71.0)
|
||||
rubocop-sequel (0.0.6)
|
||||
@ -63,8 +65,8 @@ GEM
|
||||
rufus-scheduler (3.6.0)
|
||||
fugit (~> 1.1, >= 1.1.6)
|
||||
safe_yaml (1.0.5)
|
||||
sequel (5.31.0)
|
||||
sequel_pg (1.12.5)
|
||||
sequel (5.32.0)
|
||||
sequel_pg (1.13.0)
|
||||
pg (>= 0.18.0, != 1.2.0)
|
||||
sequel (>= 4.38.0)
|
||||
simplecov (0.18.5)
|
||||
@ -77,10 +79,10 @@ GEM
|
||||
rack-protection (= 2.0.8.1)
|
||||
tilt (~> 2.0)
|
||||
tilt (2.0.10)
|
||||
tzinfo (2.0.1)
|
||||
tzinfo (2.0.2)
|
||||
concurrent-ruby (~> 1.0)
|
||||
unicode-display_width (1.7.0)
|
||||
unicorn (5.5.4)
|
||||
unicorn (5.5.5)
|
||||
kgio (~> 2.6)
|
||||
raindrops (~> 0.7)
|
||||
vcr (5.1.0)
|
||||
@ -102,6 +104,7 @@ DEPENDENCIES
|
||||
rack-cors
|
||||
rack-test
|
||||
rake
|
||||
rubocop-minitest
|
||||
rubocop-performance
|
||||
rubocop-sequel
|
||||
rufus-scheduler
|
||||
|
@ -56,7 +56,7 @@ helpers do
|
||||
|
||||
def json(data)
|
||||
json = Oj.dump(data, mode: :compat)
|
||||
callback = params.delete('callback')
|
||||
callback = params['callback']
|
||||
|
||||
if callback
|
||||
content_type :js
|
||||
|
Loading…
Reference in New Issue
Block a user