Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
pushing on master

Florent Beaurain beauraF

🚀
pushing on master
View GitHub Profile
View deprecation_toolkit.rb
# 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},
]
View warning.rb
# 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 Apr 12, 2020
Simple CI workflow for Rails that run minitest, rubocop, prettier and brakeman on Github Actions
View .github | workflows | ci.yml
name: CI
on: [push]
jobs:
minitest:
runs-on: ubuntu-latest
services:
postgres:
@beauraF
beauraF / test | linters | factory_bot_test.rb
Last active Aug 16, 2019
A test example to integrate FactoryBot.lint into your Rails tests
View test | linters | factory_bot_test.rb
# 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 Nov 3, 2019
Simple rubocop configuration for Rails
View .rubocop.yml
require:
- rubocop-rails
- rubocop-performance
AllCops:
Exclude:
- 'bin/**/*'
- 'db/schema.rb'
- 'node_modules/**/*'
- 'vendor/**/*'
@beauraF
beauraF / docker-compose.yml
Last active Nov 3, 2019
Simple docker-compose configuration for Rails
View docker-compose.yml
version: '3'
services:
postgres:
container_name: my_rails_project_postgres
image: postgres:11.5-alpine
ports: ['5432:5432']
environment:
POSTGRES_USER: ${USER}
volumes:
View .editorconfig
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 Aug 16, 2019
Simple dependabot configuration for Rails
View dependabot | config.yml
version: 1
update_configs:
- package_manager: "ruby:bundler"
update_schedule: "live"
directory: "/"
target_branch: "master"
allowed_updates:
- match:
update_type: "all"
You can’t perform that action at this time.