I hereby claim:
- I am palkan on github.
- I am palkan (https://keybase.io/palkan) on keybase.
- I have a public key ASD9_7Qr5xvMYx75u8VApLRsuCjYGR87WquHVLTtuUahwAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class RackRewriteConfig | |
class << self | |
# Configure named rewrite rule | |
def configure(name, &block) | |
raise ArgumentError, "Block is required" unless block_given? | |
rules[name] = block | |
end | |
# Apply named rule to the target | |
def apply(target, name, *args) |
# See issue: https://github.com/palkan/action_policy/issues/15 | |
module ActionPolicy | |
module I18n | |
class << self | |
def full_message(policy_class, rule) | |
# generate candidates | |
candidates = [:"#{policy_class.identifier}.#{rule}"] | |
# add global fallbacks |
From Pundit to ActionPolicy:
include Pundit
from ApplicationControlleralias authorize authorize!
authorize :current_user, as: :user
include ActionPolicy::Policy::Core
to ApplicationPolicy
ApplicationPolicy#initialize
:def initialize(target, user:)
Ref: https://github.com/anycable/anycable/releases/tag/v0.6.0
RubyConf 2018 special.
tl;dr anycable
CLI; redis
gem is no longer a runtime dependency (but still required for Redis broadcast adapter); health checkers; middlewares support and more flexible configuration.
📝 Check out a new documentation website.
# frozen_string_literal: true | |
# Faker load tons of useless locales by default | |
# (see https://github.com/stympy/faker/tree/master/lib/locales) | |
# | |
# And it's impossible to configure it( | |
# (see https://github.com/stympy/faker/blob/v1.9.3/lib/faker.rb#L14-L15) | |
# | |
# First, ensure i18n is loaded |
# frozen_string_literal: true | |
# PR: https://github.com/rspec/rspec-rails/pull/2095 | |
RSpec::Rails::ViewRendering::EmptyTemplateHandler.singleton_class.prepend(Module.new do | |
def call(template, _source) | |
super(template) | |
end | |
end) |
version: 2.1 | |
workflows: | |
version: 2 | |
build_and_test: | |
jobs: | |
- checkout | |
- yarn_install: | |
requires: | |
- checkout |
Since our architecture is modularized, we need a way for our components/engines to communicate with each other.
We do this by adding a pub/sub (or event sourcing) layer to our application via Rails Event Store.
We do not use RES directly but through the railsy-events
engine, which wraps RES functionality and provide its own API. That would allow us to replace RES in the future (if necessary) without changing our application code.
I hereby claim:
To claim this, I am signing this object: