Commit graph

9 commits

Author SHA1 Message Date
gfyoung
d598e4fd93 Enable more frozen string in lib/**/*.rb
Enables frozen for the following:

* lib/*.rb
* lib/banzai/**/*.rb
* lib/bitbucket/**/*.rb
* lib/constraints/**/*.rb
* lib/container_registry/**/*.rb
* lib/declarative_policy/**/*.rb

Partially addresses #47424.
2018-10-06 17:02:50 -07:00
Semyon Pupkov
2d0839e542 Fix UnneededRequireStatement cop 2018-09-21 12:37:57 +05:00
Jan Provaznik
fdfc8d04d2 [Rails5] Permit concurrent loads
Rails 5 introduced a new (and safer) autoload mechanism which
uses locking when loading missing constants. Under some circumstances
it's possible that a deadlock occurs in multi-threaded environment
(especially when running capybara tests)

To avoid these deadlocks, concurrent load is enabled when loading
policies - we ere hitting timeout in this case:
https://gitlab.com/gitlab-org/gitlab-ce/issues/48263

Note that autoloading is enabled only in development or test envs
(not in production).
2018-07-10 12:52:57 +02:00
Gabriel Mazetto
5c7a738105 [CE] Add Naming/FileName rule checking expected class/module per filename 2018-03-08 12:56:54 +00:00
Jacopo
181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
http://jneen.net/
4dfda5f266 declarative_policy rubocop fix 2017-08-03 09:07:18 -07:00
http://jneen.net/
c2dd4239c9 short-circuit if there is no policy, and add :read_project check 2017-08-03 09:07:18 -07:00
http://jneen.net/
e515aa548c cache DeclarativePolicy.class_for at the class level 2017-07-17 14:38:48 -07:00
http://jneen.net/
80d6e5bbd4 add a new DeclarativePolicy framework 2017-06-27 12:41:54 -07:00