rubocop-trailblazer 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85fbb1fb3d447692cb65d0522b9c4d7fd105d458663e2deeb611832c936a66c1
4
- data.tar.gz: 11b69050e2ea426275fe025855cc80867a8065282261b15048960024c45831c8
3
+ metadata.gz: e1b68e3a03fa2569ab795512045cc6d73eb2419dee1767584a97967bcfa38bf3
4
+ data.tar.gz: aa7704167b8b0e06feb88578446ee78484a8ed6ad3ebfbad35b02cfffb01069b
5
5
  SHA512:
6
- metadata.gz: d16475a14bd2a1f767a4ce016b1edb7d00645e501a4135e064830db9c601124b2b39f4cae820ab8d9904cf894f7e70b363ab29b0948fc4b70241b6fc6221ec0b
7
- data.tar.gz: dd6e38b75945a5148e75e1993191e970279dd67984bd77291b83d2b6f2c4dad6af291b2ab5a9923dd9850c8f4c056e114321db958a35300e1a041753c27a6313
6
+ metadata.gz: ec7601a2f252a674407c64779da7e6b30e2856b12dd751f662238651a64f2a25257e2f88f978a92a13e388ad592789a52df0a97fc0d95f221fb60d5d9d2eb51d
7
+ data.tar.gz: 3f0e81ce3fb3d99b78dc032e9e3be7205e337b707b714021d6153b1fdf7eb00d699378859abf71e49673cac7b1551f5295ea04748824e07a0a98c5e92c1df621
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Abdelkader Boudih
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,52 @@
1
+ # Rubocop::Trailblazer
2
+
3
+ `Rubocop::Trailblazer` is a Ruby gem that provides additional RuboCop rules that are specifically useful for enforcing best practices and coding styles within projects using the [Trailblazer](http://trailblazer.to/) architecture.
4
+
5
+ ## Installation
6
+
7
+ Install `rubocop-trailblazer` gem via the following command:
8
+
9
+ ```sh
10
+ $ gem install rubocop-trailblazer
11
+ ```
12
+
13
+ If you are using this gem within a project, add the following line in your `Gemfile` or `gems.rb` under the development and test groups:
14
+ ```ruby
15
+ group :development, :test do
16
+ gem 'rubocop-trailblazer', require: false
17
+ end
18
+ ```
19
+ Then run `bundle install` to install the gem.
20
+
21
+ ## Usage
22
+
23
+ Instruct RuboCop to load the `Rubocop::Trailblazer` extension. Specify this in your `.rubocop.yml`:
24
+ ```yaml
25
+ require:
26
+ rubocop-other-extension
27
+ rubocop-trailblazer
28
+ ```
29
+
30
+ Alternatively, you can specify this in the command line:
31
+ ```sh
32
+ $ rubocop --require rubocop-trailblazer
33
+ ```
34
+
35
+ Or in a Rake task:
36
+ ```ruby
37
+ require 'rubocop/rake_task'
38
+
39
+ RuboCop::RakeTask.new do |task|
40
+ task.requires << 'rubocop-trailblazer'
41
+ end
42
+ ```
43
+
44
+ ## Contributing
45
+
46
+ We welcome contributions! For bug reports, feature requests, and pull requests, please feel free to visit our GitHub at https://github.com/seuros/rubocop-trailblazer.
47
+
48
+ When submitting a pull request, please ensure your changes are on a separate branch specific to the feature or issue. All updates should include tests.
49
+
50
+ ## License
51
+
52
+ This gem is open-source, available under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -3,8 +3,8 @@
3
3
  module RuboCop
4
4
  module Cop
5
5
  module Minitest
6
- # Checks for `assert_equal` method calls where the actual
7
- # argument is a variable and the expected argument is a literal.
6
+ # Checks for `assert_equal` method calls where the first argument is a actual variable,
7
+ # and the second argument is an expected literal.
8
8
  #
9
9
  # @example
10
10
  # # bad
@@ -14,7 +14,9 @@ module RuboCop
14
14
  # assert_equal my_var, 3
15
15
  class VariableAsActualArgument < LiteralAsActualArgument
16
16
  MSG = 'Replace the literal with the second argument.'
17
-
17
+ def self.autocorrect_incompatible_with
18
+ [LiteralAsActualArgument]
19
+ end
18
20
  def on_send(node)
19
21
  return unless node.method?(:assert_equal)
20
22
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Trailblazer
5
- VERSION = '0.1.1'
5
+ VERSION = '0.1.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-trailblazer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-09 00:00:00.000000000 Z
11
+ date: 2024-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -57,6 +57,8 @@ executables: []
57
57
  extensions: []
58
58
  extra_rdoc_files: []
59
59
  files:
60
+ - LICENSE.txt
61
+ - README.md
60
62
  - config/default.yml
61
63
  - lib/rubocop-trailblazer.rb
62
64
  - lib/rubocop/cop/minitest/variable_as_actual_argument.rb