immosquare-cleaner 0.1.17 → 0.1.18

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: 6b2156d92e5a84a04d51921eddd6f7a5064f90cdb73d9bb6ebf30ac8ea0613f2
4
+ data.tar.gz: 89df7a2670096d0b3b3247dae66ec90715e4a03698dd4307676663a4a61906b3
5
5
  SHA512:
6
- metadata.gz: 4effe7a10f4a2d85700748102ce5a24698a7437456bca5936456452029be5f480dcd5e59dd1b8a88d0c094cd84cb2642d3accf1b57df7daa0ca7251d39ba0d84
7
- data.tar.gz: befef8ef6babd0e712cf770197415164d599a3ed0233b99508fb6beec2c3469f1a3e1aced3857ba88bf323242585c9f597d012cdb83d1eb812a303c9262352ed
6
+ metadata.gz: ee0041dd8cf9c544568721bea210ad47746e4b74fb752c03f9e27f13a9db1521166e8ec6a2dbcb255e7b60b666695f7ed30b6fb098f822eb06cbec9b73f73882
7
+ data.tar.gz: 589966b8aa6f1d1f2cab314429498d80d5d06e7b123b0dbf0631fda972ca1de2032851117f4e318e22b9f3bc7f919bb07fc8eb2032b941e464602569c4fde989
@@ -1,3 +1,3 @@
1
1
  module ImmosquareCleaner
2
- VERSION = "0.1.17".freeze
2
+ VERSION = "0.1.18".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,7 +1,7 @@
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.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - IMMO SQUARE
@@ -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