immosquare-cleaner 0.1.17 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d2226b5c9f6b4820c8dd12daf011c735540a3d9481d52e5365f6cfa068501b78
4
- data.tar.gz: cefed5d385475f1ecaca1462d353ab099241cc7b86b509e1942675853ddedadd
3
+ metadata.gz: a80520d80f0bf1f7605299139f51b2576feb2d761d202fbdec027f606f293491
4
+ data.tar.gz: 3ef878438cc3b1b852db88b3f5528d4176cf50055508cdc9034f8d75034d8af9
5
5
  SHA512:
6
- metadata.gz: 4effe7a10f4a2d85700748102ce5a24698a7437456bca5936456452029be5f480dcd5e59dd1b8a88d0c094cd84cb2642d3accf1b57df7daa0ca7251d39ba0d84
7
- data.tar.gz: befef8ef6babd0e712cf770197415164d599a3ed0233b99508fb6beec2c3469f1a3e1aced3857ba88bf323242585c9f597d012cdb83d1eb812a303c9262352ed
6
+ metadata.gz: d17feebfd6eab1c0d2c5ddbb244d32d8d174b5f98162a002d680c18b445d790af9bebbaae61fff332c52fbf4382ea651830e2494b8906bf0b0454529d7b4744a
7
+ data.tar.gz: d1813d2e467ffe7ffbe828167e4fba2be59a8a2e8c980fafa5865c77fbe30f09976c443337a9ba5384cebdb490222bf7e41bd1609657000a86cc3e9cf5114ce8
@@ -1,3 +1,3 @@
1
1
  module ImmosquareCleaner
2
- VERSION = "0.1.17".freeze
2
+ VERSION = "0.1.19".freeze
3
3
  end
@@ -54,9 +54,23 @@ module ImmosquareCleaner
54
54
 
55
55
  ##============================================================##
56
56
  ## Ruby Files
57
+ ## We create a rubocop config file with the ruby version
58
+ ## if it does not exist...Normally rubocop does it alone
59
+ ## of this based on .ruby-version file but it doesn't work
60
+ ## in our case where rubocop is in a gem which is called
61
+ ## in a project...
57
62
  ##============================================================##
58
63
  if file_path.end_with?(*RUBY_FILES) || File.open(file_path, &:gets)&.include?(SHEBANG)
59
- cmds = ["bundle exec rubocop -c #{gem_root}/linters/rubocop.yml #{file_path} #{ImmosquareCleaner.configuration.rubocop_options || "--autocorrect-all"}"]
64
+ rubocop_config_with_version_path = "#{gem_root}/linters/rubocop-#{RUBY_VERSION}.yml"
65
+
66
+ if !File.exist?(rubocop_config_with_version_path)
67
+ rubocop_config = YAML.load_file("#{gem_root}/linters/rubocop.yml")
68
+ rubocop_config["AllCops"] ||= {}
69
+ rubocop_config["AllCops"]["TargetRubyVersion"] = RUBY_VERSION
70
+ File.write(rubocop_config_with_version_path, rubocop_config.to_yaml)
71
+ end
72
+
73
+ cmds = ["bundle exec rubocop -c #{rubocop_config_with_version_path} #{file_path} #{ImmosquareCleaner.configuration.rubocop_options || "--autocorrect-all"}"]
60
74
  launch_cmds(cmds)
61
75
  normalize_last_line(file_path)
62
76
  return
@@ -0,0 +1,85 @@
1
+ ---
2
+ AllCops:
3
+ NewCops: enable
4
+ EnabledByDefault: false
5
+ UseCache: true
6
+ SuggestExtensions: false
7
+ TargetRubyVersion: 3.2.2
8
+ Metrics:
9
+ Enabled: false
10
+ Lint/UselessAssignment:
11
+ Enabled: false
12
+ Lint/RescueException:
13
+ Enabled: false
14
+ Lint/UnusedMethodArgument:
15
+ Enabled: false
16
+ Naming/VariableNumber:
17
+ Enabled: false
18
+ Naming/FileName:
19
+ Enabled: false
20
+ Layout/LeadingEmptyLines:
21
+ Enabled: false
22
+ Layout/InitialIndentation:
23
+ Enabled: false
24
+ Layout/TrailingEmptyLines:
25
+ Enabled: false
26
+ Layout/ExtraSpacing:
27
+ Enabled: false
28
+ Layout/LineLength:
29
+ Enabled: false
30
+ Layout/TrailingWhitespace:
31
+ Enabled: true
32
+ Layout/EmptyLines:
33
+ Enabled: false
34
+ Layout/SpaceInsideBlockBraces:
35
+ SpaceBeforeBlockParameters: false
36
+ Layout/EmptyLinesAroundClassBody:
37
+ EnforcedStyle: empty_lines
38
+ Layout/FirstHashElementIndentation:
39
+ EnforcedStyle: consistent
40
+ Layout/ArgumentAlignment:
41
+ EnforcedStyle: with_fixed_indentation
42
+ Layout/HashAlignment:
43
+ EnforcedHashRocketStyle: table
44
+ Layout/MultilineAssignmentLayout:
45
+ EnforcedStyle: same_line
46
+ Layout/SpaceInsideHashLiteralBraces:
47
+ EnforcedStyle: no_space
48
+ Layout/MultilineMethodCallIndentation:
49
+ EnforcedStyle: indented
50
+ Style/RedundantBegin:
51
+ Enabled: false
52
+ Style/MultilineTernaryOperator:
53
+ Enabled: false
54
+ Style/NestedTernaryOperator:
55
+ Enabled: false
56
+ Style/MultilineIfModifier:
57
+ Enabled: false
58
+ Style/FrozenStringLiteralComment:
59
+ Enabled: false
60
+ Style/Next:
61
+ Enabled: false
62
+ Style/Documentation:
63
+ Enabled: false
64
+ Style/IfUnlessModifierOfIfUnless:
65
+ Enabled: false
66
+ Style/NegatedIf:
67
+ Enabled: false
68
+ Style/MethodCallWithArgsParentheses:
69
+ Enabled: true
70
+ Style/FormatStringToken:
71
+ EnforcedStyle: template
72
+ Style/NumericPredicate:
73
+ EnforcedStyle: comparison
74
+ Style/StringLiterals:
75
+ EnforcedStyle: double_quotes
76
+ Style/StringLiteralsInInterpolation:
77
+ EnforcedStyle: double_quotes
78
+ Style/HashSyntax:
79
+ EnforcedStyle: hash_rockets
80
+ Style/WordArray:
81
+ EnforcedStyle: brackets
82
+ Style/SymbolArray:
83
+ EnforcedStyle: brackets
84
+ Gemspec/RequireMFA:
85
+ Enabled: false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immosquare-cleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.17
4
+ version: 0.1.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - IMMO SQUARE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-26 00:00:00.000000000 Z
11
+ date: 2023-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erb_lint
@@ -118,6 +118,7 @@ files:
118
118
  - linters/erb-lint.yml
119
119
  - linters/eslintrc.json
120
120
  - linters/prettier.yml
121
+ - linters/rubocop-3.2.2.yml
121
122
  - linters/rubocop.yml
122
123
  - node_modules/.bin/acorn
123
124
  - node_modules/.bin/eslint