profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/pyromaniac/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Arkadiy Zabazhanov pyromaniac @BookingSync Russia

jashmenn/activeuuid 335

Binary uuid keys in Rails

pyromaniac/hoof 176

Linux zero-configuration server

skyeagle/nested_set 175

Rails 3 support! An awesome replacement for acts_as_nested_set and better_nested_set.

pyromaniac/active_data 119

Working with any data in AR style

mongoid/mongoid_orderable 99

Acts as list mongoid implementation

pyromaniac/hotcell 19

Hotcell is sandboxed template language for ruby

pyromaniac/contextuality 17

Contextual global variables

pyromaniac/secure_routes 4

Routing-level ssl support for ruby application

pyromaniac/mongoid_orderable 1

Acts as list mongoid implementation

pyromaniac/operations_cookbook 1

Operations framework implementation experience

PullRequestReviewEvent

issue commentdry-rb/dry-schema

Key map contains duplicates on inheritance

@solnic, @flash-gordon I can even work on the PR fixing this. I just need to know your opinion, folks. Does it look like a bug to you or an intended behavior?

pyromaniac

comment created time in 18 hours

issue openedrubocop/rubocop

Lint/AmbiguousOperatorPrecedence configuration

Is your feature request related to a problem? Please describe.

The new Lint/AmbiguousOperatorPrecedence cop looks way like an overkill. Parenthesis in arithmetic expressions for all the operations create a lot of visual noise and might be not a god option for a lot of developers. I believe, it is going to be disabled by this reason a lot.

But for boolean expressions additional parenthesis could bring a lot of value.

Describe the solution you'd like

I believe we need to split operators into groups. I see two right now: boolean and arithmetic. Would be great to be able enabling them separately.

Describe alternatives you've considered

The only alternative for now is to disable the cop completely.

created time in 4 days

push eventBookingSync/globalize-validations

Arkadiy Zabazhanov

commit sha 215965afa54633c762e391ceb733849da5b1afbb

Replace CI status badge

view details

push time in 12 days

push eventBookingSync/globalize-validations

Arkadiy Zabazhanov

commit sha f9ef04abe99ed4325341f5ba8f8311d378a4913f

Support different versions of AR

view details

push time in 12 days

push eventBookingSync/globalize-validations

Arkadiy Zabazhanov

commit sha 6b4a75246eed00e5ad890650c0a8b4a56633bcbb

Support different versions of AR

view details

push time in 12 days

create barnchBookingSync/globalize-validations

branch : rails-52

created branch time in 12 days

delete branch BookingSync/globalize-validations

delete branch : rails-61-support

delete time in 14 days

push eventBookingSync/globalize-validations

Arkadiy Zabazhanov

commit sha e4fc4ba09291c69ea1c8882d608b48aaa156eb17

Support rails 6.1

view details

Arkadiy Zabazhanov

commit sha baa185b0b89b0abe35ec4815556d8e261d6491eb

Merge pull request #4 from BookingSync/rails-61-support Support rails 6.1

view details

push time in 14 days

PR merged BookingSync/globalize-validations

Support rails 6.1

Fix deprecation warnings

+19 -4

0 comment

4 changed files

pyromaniac

pr closed time in 14 days

PR opened BookingSync/globalize-validations

Support rails 6.1

Fix deprecation warnings

+19 -4

0 comment

4 changed files

pr created time in 14 days

create barnchBookingSync/globalize-validations

branch : rails-61-support

created branch time in 14 days

delete branch BookingSync/globalize-validations

delete branch : github-actions

delete time in 14 days

push eventBookingSync/globalize-validations

Arkadiy Zabazhanov

commit sha fae546c7a4670e53062634087270bfa5ebb4ad58

Introduce GithubActions

view details

Arkadiy Zabazhanov

commit sha 6dd5d40605f2eb101bfb5e9c278bcf76e478be03

Merge pull request #3 from BookingSync/github-actions Introduce GithubActions

view details

push time in 14 days

push eventBookingSync/globalize-validations

Arkadiy Zabazhanov

commit sha fae546c7a4670e53062634087270bfa5ebb4ad58

Introduce GithubActions

view details

push time in 14 days

push eventBookingSync/globalize-validations

Arkadiy Zabazhanov

commit sha 0117dfa83f6df335489262ab20317ae45992a137

Introduce GithubActions

view details

push time in 14 days

push eventBookingSync/globalize-validations

Arkadiy Zabazhanov

commit sha 28c0d6813960a79602d2f690f0b1f55a0bef42a4

Introduce GithubActions

view details

push time in 14 days

create barnchBookingSync/globalize-validations

branch : github-actions

created branch time in 14 days

issue closedBookingSync/globalize-validations

Don't modify given locale arrays

https://github.com/BookingSync/globalize-validations/blob/master/lib/globalize-validations/concern.rb#L35 this modifies the given array, should not modify given params

closed time in 14 days

Mandaryn

issue openedrubocop/rubocop-rails

False-positive in Rails/HttpPositionalArguments

When routes are defined in controller specs, they might use the same method manes as this cop checks. We probably have to determine is we are inside of the Rails.application.routes.draw do or routes do block (the latter one is provided by rspec) and ignore HTTP verb method calls there.


Expected behavior

I expect the cop to ignore HTTP method request helpers invocation to be ignored inside of routes definitions.

Actual behavior

Rails/HttpPositionalArguments catches route definition helpers invocation and raises an offense.

Steps to reproduce the problem

# frozen_string_literal: true

RSpec.describe FooController do
  before do
    routes do
      get :list, on: :collection
    end

    Rails.application.routes.draw do
      get :list, on: :collection
    end
  end

  specify do
    get :list, filter: 42
  end
end

Produces:

rubocop spec/controllers/foo_controller_spec.rb
Inspecting 1 file
C

Offenses:

spec/controllers/foo_controller_spec.rb:6:18: C: [Correctable] Rails/HttpPositionalArguments: Use keyword arguments instead of positional arguments for http call: get.
      get :list, on: :collection
                 ^^^^^^^^^^^^^^^
spec/controllers/foo_controller_spec.rb:10:18: C: [Correctable] Rails/HttpPositionalArguments: Use keyword arguments instead of positional arguments for http call: get.
      get :list, on: :collection
                 ^^^^^^^^^^^^^^^
spec/controllers/foo_controller_spec.rb:15:16: C: [Correctable] Rails/HttpPositionalArguments: Use keyword arguments instead of positional arguments for http call: get.
    get :list, filter: 42
               ^^^^^^^^^^

1 file inspected, 3 offenses detected, 3 offenses auto-correctable

RuboCop version

$ [bundle exec] rubocop -V
1.20.0 (using Parser 3.0.2.0, rubocop-ast 1.11.0, running on ruby 2.7.4 x86_64-darwin20)
  - rubocop-performance 1.11.5
  - rubocop-rails 2.11.3
  - rubocop-rspec 2.4.0

created time in 17 days

issue commentrubocop/rubocop

Style/SafeNavigation for commands

I would not fix it at all. I think the command communicates better with a condition. Consider these examples:

sync_result = payment.sync if payment
# vs
sync_result = payment&.sync

In the first case it clearly reads like a command. And the command result is stored in the variable if it is possible to preform the command. The conditions of the command execution might change later. And it is simple to do this and clear how to do this in the first case.

In the second case it is not clear what's going to happen. What's going to be put in the result.

pyromaniac

comment created time in 19 days

issue openedrubocop/rubocop-rails

False-positive on Rails/LexicallyScopedActionFilter

Hello, found out that Rails/LexicallyScopedActionFilter doesn't consider method aliases.


Expected behavior

I believe that the cop should consider aliased methods as explicitly defined.

Actual behavior

The cop ignored method alias.

Steps to reproduce the problem

class FooController < ApplicationController
  before_action :authorize!, only: %i[index show]
  def index
  end
  alias_method :show, :index
  
  private

  def authorize!
  end
end

This example will produce Rails/LexicallyScopedActionFilter: show is not explicitly defined on the class.

RuboCop version

$ [bundle exec] rubocop -V
1.20.0 (using Parser 3.0.2.0, rubocop-ast 1.11.0, running on ruby 2.7.4 x86_64-darwin20)
  - rubocop-performance 1.11.5
  - rubocop-rails 2.11.3
  - rubocop-rspec 2.4.0

created time in 19 days

issue openedrubocop/rubocop

Style/SafeNavigation for commands

Is your feature request related to a problem? Please describe.

I recently tried to apply Style/SafeNavigation autocorrection to a project and noticed that there are 2 cases when it gets corrected:

foo && foo.bar
foo.bar if foo

Both lines get corrected to foo&.bar. But there is a difference in intentions: in the first case we are having a simple call chain, it is a query. In the second case it is clearly a command and changing it to use the safe navigation operator would obscure the intention.

Describe the solution you'd like

I believe it is possible to introduce an option to ignore postfix conditions for this cop. Maybe it can even be on by default. WDYT about it?

created time in 19 days

issue openeddry-rb/dry-schema

Key map contains duplicates on inheritance

Describe the bug

When one schema is inherited from another one and redefines some fields, those fields got duplicated in the schema's key_map.

To Reproduce

class Foo < Dry::Schema::Params
  define do
    required(:foo).filled(:integer)
  end
end

class Bar < Foo
  define do
    required(:foo).filled(:string)
  end
end

Foo.new.key_map
#=> #<Dry::Schema::KeyMap["foo"]>
Bar.new.key_map
#=> #<Dry::Schema::KeyMap["foo", "foo"]>

Expected behavior

I would expect the exact list of schema keys in the keymap.

created time in 19 days

delete branch BookingSync/bookingsync-api-docs

delete branch : core-4404-better-docs

delete time in a month

push eventBookingSync/bookingsync-api-docs

Arkadiy Zabazhanov

commit sha f3781117c8d2ef92be494d0cf31d514edf02414d

Add base64 important notes

view details

Arkadiy Zabazhanov

commit sha d69610dc51728fb0a6ea34d6b110135f62327ebb

Merge pull request #347 from BookingSync/core-4404-better-docs [CORE-4404] Add base64 important notes

view details

push time in a month