rails-quality-assurance 1.3.3 → 1.4.0

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: fb90801ffefa028ae7b9173e04f759fa64e59bf88db9d92131c263a8844ff144
4
- data.tar.gz: 149747d49baeeaf03ddb88407d29cd90df3c9fb1032bea8168faa542d9862d04
3
+ metadata.gz: 1fcf911cee6d30d85ec3b99396996aeb1a1d3192ae1a1d85e07c0d5232a9b280
4
+ data.tar.gz: 1c8436b501b9cd4f7861befcd96900050a02295f481041507ba436049c749cb8
5
5
  SHA512:
6
- metadata.gz: b2b7465cd190e164e9979b8a8e770c38ad1eb77fbf97a11dfeafb53d5311a301c1c8b2dfda141d2583e554883c5a6ae6919b58412b9d73b9e1dd028d53e62506
7
- data.tar.gz: 116c20f50206b7552e99926897c41583036b163ce5b9768dea97a2f127e96adfaa2bee56eca389807fbed7efa1f6fb0a8f774e2fa63bf1e9e4ba0fe7bf8d3330
6
+ metadata.gz: dd463e5d322299dc1991d91bda054973a8ca22dc04e507d7dc9e8bf4678dd109efdc38b43e412f978bf21af51f85dfcd831e78a4476f5525131a461dcde79272
7
+ data.tar.gz: 578bffb5e87ef384c881d485746da5c1ae48e1c25e642cec0ef2956d68b7572a1091ed41e1ca23c94bc015e5efca3e8dadc5ff0b448140963e5689fe4c433779
data/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.4.0] - 2026-09-15
9
+
10
+ ### Added
11
+
12
+ - `qa:audit:gems` and `qa:audit:importmap` tasks. `qa:audit` runs the gem
13
+ audit, `qa:audit:importmap` audits pinned importmap packages when the app
14
+ has `config/importmap.rb` (skipped otherwise), and `qa:lint` runs both.
15
+ - `RailsQualityAssurance.importmap_audit_command` resolves the importmap audit
16
+ command: the app `bin/importmap` binstub when present, otherwise a
17
+ dependency-light `importmap-rails` invocation that does not boot Rails.
18
+
8
19
  ## [1.2.0] - 2026-09-14
9
20
 
10
21
  ### Added
data/README.md CHANGED
@@ -18,6 +18,10 @@ Opinionated quality assurance kit for Ruby on Rails applications.
18
18
 
19
19
  - **Brakeman**: Static analysis security vulnerability scanner.
20
20
  - **Bundler Audit**: Vulnerability scanner for gem dependencies.
21
+ - **Importmap Audit**: Vulnerability scanner for pinned importmap packages. Runs
22
+ only when the app has `config/importmap.rb`, using the app `bin/importmap`
23
+ binstub when present and a dependency-light `importmap-rails` invocation
24
+ otherwise.
21
25
 
22
26
  ### 3. Testing & Coverage
23
27
 
@@ -127,9 +131,11 @@ bin/run bin/ci
127
131
  The gem also provides tasks if you prefer `rake`:
128
132
 
129
133
  ```bash
130
- bin/rails qa:lint # Runs RuboCop, Reek, Flay, Brakeman, bundler-audit
131
- bin/rails qa:frontend # Runs Biome and Stylelint
132
- bin/rails spec:parallel # Runs RSpec in parallel with system specs isolated
134
+ bin/rails qa:lint # Runs RuboCop, Reek, Flay, Brakeman, bundler-audit, importmap-audit
135
+ bin/rails qa:audit # Runs bundler-audit
136
+ bin/rails qa:audit:importmap # Runs the importmap audit when config/importmap.rb exists
137
+ bin/rails qa:frontend # Runs Biome and Stylelint
138
+ bin/rails spec:parallel # Runs RSpec in parallel with system specs isolated
133
139
  ```
134
140
 
135
141
  ---
@@ -11,6 +11,7 @@ CI.run do
11
11
  step 'Style: Flay', 'bin/rails qa:flay'
12
12
 
13
13
  step 'Security: Gem audit', 'bin/rails qa:audit'
14
+ step 'Security: Importmap audit', 'bin/rails qa:audit:importmap' if File.exist?('config/importmap.rb')
14
15
  step 'Security: Brakeman', 'bin/rails qa:brakeman'
15
16
 
16
17
  step 'Frontend: Biome', 'bin/rails qa:lint:biome' if File.exist?('biome.json')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsQualityAssurance
4
- VERSION = '1.3.3'
4
+ VERSION = '1.4.0'
5
5
  end
@@ -25,6 +25,14 @@ module RailsQualityAssurance
25
25
  def self.stylelint_config_path
26
26
  File.join(root, 'config/stylelint-default.json')
27
27
  end
28
+
29
+ def self.importmap_audit_command
30
+ return nil unless File.exist?('config/importmap.rb')
31
+ return 'bin/importmap audit' if File.exist?('bin/importmap')
32
+
33
+ 'bundle exec ruby -e \'require "importmap-rails"; require "importmap/map"; ' \
34
+ 'ARGV.replace(["audit"]); require "importmap/commands"\''
35
+ end
28
36
  end
29
37
 
30
38
  require 'rails_quality_assurance/railtie'
@@ -13,8 +13,8 @@ rescue JSON::ParserError
13
13
  end
14
14
 
15
15
  namespace :qa do
16
- desc 'Run all quality assurance checks (RuboCop, Reek, Flay, Brakeman, bundler-audit)'
17
- task lint: %w[qa:rubocop qa:reek qa:flay qa:brakeman qa:audit]
16
+ desc 'Run all quality assurance checks (RuboCop, Reek, Flay, Brakeman, bundler-audit, importmap-audit)'
17
+ task lint: %w[qa:rubocop qa:reek qa:flay qa:brakeman qa:audit qa:audit:importmap]
18
18
 
19
19
  desc 'Run RuboCop'
20
20
  task :rubocop do
@@ -40,11 +40,22 @@ namespace :qa do
40
40
  sh 'bundle exec brakeman --quiet --no-pager --exit-on-warn --exit-on-error'
41
41
  end
42
42
 
43
- desc 'Run Bundler Audit for vulnerable gems'
44
- task :audit do
45
- sh 'bundle exec bundle audit check --update'
43
+ namespace :audit do
44
+ desc 'Run Bundler Audit for vulnerable gems'
45
+ task :gems do
46
+ sh 'bundle exec bundle audit check --update'
47
+ end
48
+
49
+ desc 'Run Importmap Audit for vulnerable npm packages'
50
+ task :importmap do
51
+ command = RailsQualityAssurance.importmap_audit_command
52
+ sh command if command
53
+ end
46
54
  end
47
55
 
56
+ desc 'Run Bundler Audit for vulnerable gems'
57
+ task audit: 'qa:audit:gems'
58
+
48
59
  namespace :lint do
49
60
  desc 'Run BiomeJS on JS/TS/JSON'
50
61
  task :biome do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-quality-assurance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauricio Zaffari