rubocop-chromebrew 0.0.1 → 0.0.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: ecb3bc18dd4abfd786ff273b8f1f8bf364d6abe2ca2d90290fa6f9e4a937d960
4
- data.tar.gz: 56893f21d3a6c790a957e59f8944472c056edb4ffefc93443ac2943da630b461
3
+ metadata.gz: c3d431011e66045f1bd16d7c3e92ddb7f3a9b8008ba59ee9e784c7d768e24f39
4
+ data.tar.gz: 7cc26b424245fb3d123443ffed2e1180255b0795d59e5d7c418df1b6d5364679
5
5
  SHA512:
6
- metadata.gz: b1b3d2016c459a8031ad691e1a8b182d90f03ef59b42f4a079f3689ef29dbbd4bd7c13d3161b42dd568b226e9b2e1a55db477387558b46dc12a072c693922be6
7
- data.tar.gz: e0da3533e92e926102351accd60b0c6019a3809dde85b1b2086b33c7ab2d8770f1e868b95ecb23f9222c4aa9bbbb0c84da0ac566280e4d3f164f86eb5d88ee35
6
+ metadata.gz: 24d466bd63143724e77fc4530bb070c16de17f2f703f24420ce458b84023b9d02dc168d77e4fea127a30e70c1edbca7538cacd313c7ad23e2eb0bf67d693cab1
7
+ data.tar.gz: 890d6b1d53b9034f0ad4b7eee71231f97a5d956c9d8f930ca84c8d75a9ba357e7de8580c9e19436db31b19c45deb5d88e48e0bc665346e21e14ff10ca8046f31
@@ -0,0 +1,17 @@
1
+ name: Test
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - name: Download source
8
+ uses: actions/checkout@v4
9
+ - name: Install Ruby
10
+ uses: ruby/setup-ruby@v1
11
+ with:
12
+ ruby-version: '3.4.1'
13
+ # TODO: Convert this to a Gemfile when we have multiple/versioned dependencies.
14
+ - name: Install dependencies
15
+ run: gem install rspec rubocop
16
+ - name: Run spec
17
+ run: rspec
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.0.2 (2025-02-02)
2
+
3
+ ### Bug fixes
4
+
5
+ * Fix cop loading ([@zopolis4][])
6
+
1
7
  ## 0.0.1 (2024-06-18)
2
8
 
3
9
  ### New features
@@ -5,4 +5,4 @@ require_relative 'rubocop/chromebrew/inject'
5
5
 
6
6
  RuboCop::Chromebrew::Inject.defaults!
7
7
 
8
- require_relative 'rubocop/chromebrew/chromebrew_cops'
8
+ require_relative 'rubocop/cop/chromebrew_cops'
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'rubocop-chromebrew'
3
3
  spec.summary = 'A RuboCop extension for Chromebrew-specific practices.'
4
- spec.version = '0.0.1'
4
+ spec.version = '0.0.2'
5
5
  spec.license = 'GPL-3.0-or-later'
6
6
  spec.author = 'Zopolis4'
7
7
  spec.email = 'creatorsmithmdt@gmail.com'
@@ -0,0 +1,40 @@
1
+ RSpec.describe RuboCop::Cop::Chromebrew::CompatibilityAll, :config do
2
+ it 'registers an offense when all four architectures are listed' do
3
+ expect_offense(<<~'RUBY')
4
+ compatibility 'aarch64 armv7l i686 x86_64'
5
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Compatibility properties which match all architectures should be replaced with 'all'
6
+ RUBY
7
+
8
+ expect_correction(<<~'RUBY')
9
+ compatibility 'all'
10
+ RUBY
11
+ end
12
+
13
+ it 'registers an offense when all four architectures are listed with commas' do
14
+ expect_offense(<<~'RUBY')
15
+ compatibility 'aarch64, armv7l, i686, x86_64'
16
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Compatibility properties which match all architectures should be replaced with 'all'
17
+ RUBY
18
+
19
+ expect_correction(<<~'RUBY')
20
+ compatibility 'all'
21
+ RUBY
22
+ end
23
+
24
+ it 'registers an offense when all four architectures are listed in a different order' do
25
+ expect_offense(<<~'RUBY')
26
+ compatibility 'i686 armv7l x86_64 aarch64'
27
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Compatibility properties which match all architectures should be replaced with 'all'
28
+ RUBY
29
+
30
+ expect_correction(<<~'RUBY')
31
+ compatibility 'all'
32
+ RUBY
33
+ end
34
+
35
+ it 'does not register an offense when only some architectures are listed' do
36
+ expect_no_offenses(<<~'RUBY')
37
+ compatibility 'i686 x86_64'
38
+ RUBY
39
+ end
40
+ end
@@ -0,0 +1,14 @@
1
+ require 'rubocop-chromebrew'
2
+ require 'rubocop/rspec/support'
3
+
4
+ RSpec.configure do |config|
5
+ config.include RuboCop::RSpec::ExpectOffense
6
+
7
+ config.disable_monkey_patching!
8
+ config.raise_errors_for_deprecations!
9
+ config.raise_on_warning = true
10
+ config.fail_if_no_examples = true
11
+
12
+ config.order = :random
13
+ Kernel.srand config.seed
14
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-chromebrew
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zopolis4
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-16 00:00:00.000000000 Z
10
+ date: 2025-02-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rubocop
@@ -28,7 +28,9 @@ executables: []
28
28
  extensions: []
29
29
  extra_rdoc_files: []
30
30
  files:
31
+ - ".github/workflows/test.yml"
31
32
  - ".gitignore"
33
+ - ".rspec"
32
34
  - CHANGELOG.md
33
35
  - LICENSE
34
36
  - README.md
@@ -39,6 +41,8 @@ files:
39
41
  - lib/rubocop/cop/chromebrew/compatibility_all.rb
40
42
  - lib/rubocop/cop/chromebrew_cops.rb
41
43
  - rubocop-chromebrew.gemspec
44
+ - spec/rubocop/cop/chromebrew/compatibility_all_spec.rb
45
+ - spec/spec_helper.rb
42
46
  homepage: https://github.com/Zopolis4/rubocop-chromebrew
43
47
  licenses:
44
48
  - GPL-3.0-or-later