Skip to content

Instantly share code, notes, and snippets.

View beauraF's full-sized avatar
🚲
en free roue

Florent Beaurain beauraF

🚲
en free roue
View GitHub Profile
# frozen_string_literal: true
return unless defined?(DeprecationToolkit)
DeprecationToolkit::Configuration.warnings_treated_as_deprecation = [
%r{^((?!/gems/).)* warning: Using the last argument as keyword parameters is deprecated},
%r{^((?!/gems/).)* warning: Passing the keyword argument as the last hash parameter is deprecated},
%r{^((?!/gems/).)* warning: Splitting the last argument into positional and keyword parameters is deprecated},
]
# frozen_string_literal: true
Warning.singleton_class.prepend(
Module.new do
DISABLED_WARNINGS = Regexp.union(
/_pry_ is deprecated, use pry_instance instead/,
/warning: The called method( `.+')? is defined here/,
)
def warn(warning)
@beauraF
beauraF / .github | workflows | ci.yml
Last active April 26, 2022 21:00
Simple CI workflow for Rails that run minitest and brakeman on Github Actions
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
@beauraF
beauraF / test | linters | factory_bot_test.rb
Last active August 16, 2019 15:11
A test example to integrate FactoryBot.lint into your Rails tests
# frozen_string_literal: true
require 'test_helper'
class FactoryBotTest < ActiveSupport::TestCase
test 'lint all factories' do
FactoryBot.lint(traits: true, verbose: true)
end
end
@beauraF
beauraF / .rubocop.yml
Last active November 3, 2019 15:39
Simple rubocop configuration for Rails
require:
- rubocop-rails
- rubocop-performance
AllCops:
Exclude:
- 'bin/**/*'
- 'db/schema.rb'
- 'node_modules/**/*'
- 'vendor/**/*'
@beauraF
beauraF / docker-compose.yml
Last active November 3, 2019 15:40
Simple docker-compose configuration for Rails
version: '3'
services:
postgres:
container_name: my_rails_project_postgres
image: postgres:11.5-alpine
ports: ['5432:5432']
environment:
POSTGRES_USER: ${USER}
volumes:
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
@beauraF
beauraF / dependabot | config.yml
Last active August 16, 2019 14:34
Simple dependabot configuration for Rails
version: 1
update_configs:
- package_manager: "ruby:bundler"
update_schedule: "live"
directory: "/"
target_branch: "master"
allowed_updates:
- match:
update_type: "all"