rubocop-config-captive 2.0.0.pre.alpha → 2.0.0.pre.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/config/__private__/rubocop-capybara.yml +1 -2
- data/config/__private__/rubocop-naming.yml +1 -1
- data/config/rubocop-capybara.yml +1 -2
- data/config/rubocop-factory_bot.yml +1 -2
- data/config/rubocop-rails-omakase.yml +2 -2
- data/config/rubocop-rake.yml +1 -2
- data/lib/rubocop/captive/inject.rb +1 -1
- data/lib/rubocop/captive/version.rb +1 -1
- data/lib/rubocop/cop/captive/rails/migration_methods.rb +3 -3
- data/rubocop-config-captive.gemspec +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c99695fc1dc46fea45cd66954df04ddd6e2ea13f28f53a933f961a026bf95df
|
4
|
+
data.tar.gz: da9335228acf9cb78300f709a1b57eb69466cb5ded705e29e8c21be2abee14c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cff9f4fa93b83242395217b1ceede3900fe0c6f961a6b4a7ee9b25da58039d5802674517b384d7c52975ab9c3b53b6b72da20d00228ed66e27f2aced86e04213
|
7
|
+
data.tar.gz: 90243990c19ed762be59170645fcc8b32b7714cac8eef762d2c3093faf46439d3df238768d114edc57ab864e92afa39fcb5d5c5e425f2acdc84382c902b9eeb9
|
data/config/rubocop-capybara.yml
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
- rubocop-capybara
|
1
|
+
plugins: rubocop-capybara
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
- rubocop-factory_bot
|
1
|
+
plugins: rubocop-factory_bot
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
inherit_gem:
|
2
|
+
rubocop-rails-omakase: rubocop.yml
|
data/config/rubocop-rake.yml
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
- rubocop-rake
|
1
|
+
plugins: rubocop-rake
|
@@ -11,7 +11,7 @@ module RuboCop
|
|
11
11
|
path = CONFIG_DEFAULT.to_s
|
12
12
|
hash = ConfigLoader.load_file(path).to_hash
|
13
13
|
config = Config.new(hash, path)
|
14
|
-
|
14
|
+
Rails.logger.debug "configuration from #{path}" if ConfigLoader.debug?
|
15
15
|
config = ConfigLoader.merge_with_default(config, path)
|
16
16
|
ConfigLoader.instance_variable_set(:@default_configuration, config)
|
17
17
|
end
|
@@ -31,7 +31,7 @@ module RuboCop
|
|
31
31
|
MSG = "Avoid using ActiveRecord::Migration methods in `up` and `down` methods. \
|
32
32
|
Use `change` instead."
|
33
33
|
|
34
|
-
BLACKLISTED_METHODS = %i
|
34
|
+
BLACKLISTED_METHODS = %i[
|
35
35
|
add_column
|
36
36
|
add_foreign_key
|
37
37
|
add_index
|
@@ -50,14 +50,14 @@ module RuboCop
|
|
50
50
|
rename_column
|
51
51
|
rename_index
|
52
52
|
rename_table
|
53
|
-
|
53
|
+
].freeze
|
54
54
|
|
55
55
|
def_node_search :migration_method?, <<~PATTERN
|
56
56
|
(send nil? {#{BLACKLISTED_METHODS.map(&:inspect).join(" ")}} ...)
|
57
57
|
PATTERN
|
58
58
|
|
59
59
|
def on_def(node)
|
60
|
-
return unless %i
|
60
|
+
return unless %i[up down].include?(node.method_name)
|
61
61
|
return unless migration_method?(node)
|
62
62
|
|
63
63
|
add_offense(node, message: MSG)
|
@@ -8,8 +8,8 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = RuboCop::Captive::VERSION
|
9
9
|
gem.summary = "Shared rubocop configurations"
|
10
10
|
gem.description = "Shared rubocop configuration for Captive projects"
|
11
|
-
gem.authors = ["Captive", "Julien Polo", "Clément Prod'homme"]
|
12
|
-
gem.email = ["julien.polo@captive.fr"]
|
11
|
+
gem.authors = [ "Captive", "Julien Polo", "Clément Prod'homme" ]
|
12
|
+
gem.email = [ "julien.polo@captive.fr" ]
|
13
13
|
gem.homepage = "https://github.com/Captive-Studio/rubocop-config"
|
14
14
|
gem.license = "MIT"
|
15
15
|
gem.required_ruby_version = ">= 2.6"
|
@@ -21,6 +21,8 @@ Gem::Specification.new do |gem|
|
|
21
21
|
"Gemfile",
|
22
22
|
]
|
23
23
|
|
24
|
+
# Pour mettre à jour les dépendances, vous pouvez utiliser le script :
|
25
|
+
# ruby script/update_dependencies.rb
|
24
26
|
gem.add_dependency("rubocop", "~> 1.77.0")
|
25
27
|
gem.add_dependency("rubocop-performance", "~> 1.25.0")
|
26
28
|
gem.add_dependency("rubocop-rake", "~> 0.7.1")
|