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 +4 -4
- data/.github/workflows/test.yml +17 -0
- data/.rspec +1 -0
- data/CHANGELOG.md +6 -0
- data/lib/rubocop-chromebrew.rb +1 -1
- data/rubocop-chromebrew.gemspec +1 -1
- data/spec/rubocop/cop/chromebrew/compatibility_all_spec.rb +40 -0
- data/spec/spec_helper.rb +14 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3d431011e66045f1bd16d7c3e92ddb7f3a9b8008ba59ee9e784c7d768e24f39
|
4
|
+
data.tar.gz: 7cc26b424245fb3d123443ffed2e1180255b0795d59e5d7c418df1b6d5364679
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/rubocop-chromebrew.rb
CHANGED
data/rubocop-chromebrew.gemspec
CHANGED
@@ -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.
|
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
|
data/spec/spec_helper.rb
ADDED
@@ -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.
|
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-
|
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
|