immosquare-cleaner 0.1.16 → 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: dbab0fbd9c15e196a397f8a862f721d3c6b595d894cdc149f8f6c425fbf2ddea
4
- data.tar.gz: 9e2c7823d09d2ee42409f39c699a715e1bd1b6a605982c3070df76ad136c6edc
3
+ metadata.gz: 6b2156d92e5a84a04d51921eddd6f7a5064f90cdb73d9bb6ebf30ac8ea0613f2
4
+ data.tar.gz: 89df7a2670096d0b3b3247dae66ec90715e4a03698dd4307676663a4a61906b3
5
5
  SHA512:
6
- metadata.gz: 3bf9bf6de6e5ebee0a03e05df315b51fc5eab41c1a9ac095a9f1dc56a8ee85f1cd02bc2a55897eeb3c6aebd27d28a5fc56f1bf5c5ec462cb27ddd2280b476c1a
7
- data.tar.gz: 8bc0b942b086b6fe3ed9c48e7caad3f76200c1aeae4aa16854cc84fffdb1f03ca585c7837d70e6660cb058fee3cf65e6f239a33fa6635fd61d0e1ec9f152399f
6
+ metadata.gz: ee0041dd8cf9c544568721bea210ad47746e4b74fb752c03f9e27f13a9db1521166e8ec6a2dbcb255e7b60b666695f7ed30b6fb098f822eb06cbec9b73f73882
7
+ data.tar.gz: 589966b8aa6f1d1f2cab314429498d80d5d06e7b123b0dbf0631fda972ca1de2032851117f4e318e22b9f3bc7f919bb07fc8eb2032b941e464602569c4fde989
@@ -1,3 +1,3 @@
1
1
  module ImmosquareCleaner
2
- VERSION = "0.1.16".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,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.16
4
+ version: 0.1.18
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-10-13 00:00:00.000000000 Z
11
+ date: 2023-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erb_lint
@@ -85,6 +85,9 @@ dependencies:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
87
  version: '1'
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 1.57.2
88
91
  type: :runtime
89
92
  prerelease: false
90
93
  version_requirements: !ruby/object:Gem::Requirement
@@ -92,6 +95,9 @@ dependencies:
92
95
  - - "~>"
93
96
  - !ruby/object:Gem::Version
94
97
  version: '1'
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: 1.57.2
95
101
  description: Immosquare-cleaner streamlines Rails applications by running tools like
96
102
  RuboCop, ERBLint, Stylelint and more. It ensures code quality, readability, and
97
103
  consistency across the application.
@@ -112,6 +118,7 @@ files:
112
118
  - linters/erb-lint.yml
113
119
  - linters/eslintrc.json
114
120
  - linters/prettier.yml
121
+ - linters/rubocop-3.2.2.yml
115
122
  - linters/rubocop.yml
116
123
  - node_modules/.bin/acorn
117
124
  - node_modules/.bin/eslint