rails_accessibility_testing 1.5.6 → 1.5.7

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: 8d34d5660b977262210b74a73348efd1d44742645bd5025032727d116ff3fae2
4
- data.tar.gz: d8fc5768263b21a5f2b4521b9b8f898bc90ed50c9477640ca4d2597a88b39010
3
+ metadata.gz: 8fee81eff828caeb719396eaf7a2e63d282b71b5490ffe192ec6600715fee9a1
4
+ data.tar.gz: 418f0068868d27e49c6916ff81da722bda53e6cad97504f43a36f3b98b64ba21
5
5
  SHA512:
6
- metadata.gz: cd65e152bec83806b8c1205b03b51b85ebcc9befddc8d7d3f97c0e4c77aff50ab8969a8abe21d32f4e59967e17f751e731ebd2484e49125bc05bd2079a7c2598
7
- data.tar.gz: 9cca616fa74d3d9eb79ce5930fc5b46c37774f7a99cd1bc76caa2f35a9e5e65084e30a748d72d21ce024437cfd07c6ba69af6f00978eb0c068b1133671a9e03d
6
+ metadata.gz: 16dd572d50a671dc94d0cfaf62b0cc6988dd009d929e9e9f98ad38df482b1653d99c3d3d80b1bf3fc956a24d94ce6bb64853d184d130f1eb18181bc031a4df2a
7
+ data.tar.gz: 6cbd86e0ea02ba00c5d297ffe44c941366f17592cc81b3b02e24ca65660bde2c784eb0f024411da9bbfd3d9598d168de141ae0df19dbe225f14de83766f94c7c
data/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ 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.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.5.7] - 2024-12-01
9
+
10
+ ### Fixed
11
+ - **Configuration loading**: Improved robustness of `should_auto_run_checks?` method with better error handling and documentation
12
+ - **RSpec integration**: Enhanced configuration priority logic to ensure YAML config is properly respected
13
+
14
+ ### Improved
15
+ - **Code documentation**: Added clearer comments explaining configuration priority and behavior
16
+ - **Error handling**: Better handling of edge cases in configuration loading
17
+
8
18
  ## [1.5.6] - 2024-12-01
9
19
 
10
20
  ### Changed
@@ -17,6 +17,10 @@ module RailsAccessibilityTesting
17
17
 
18
18
  # Determine if checks should run automatically
19
19
  # Checks YAML config first, then falls back to initializer config
20
+ #
21
+ # Priority:
22
+ # 1. YAML config: system_specs.auto_run (if explicitly set)
23
+ # 2. Initializer config: config.auto_run_checks (fallback)
20
24
  def should_auto_run_checks?
21
25
  # Try to load from YAML config
22
26
  begin
@@ -25,14 +29,18 @@ module RailsAccessibilityTesting
25
29
  yaml_config = Config::YamlLoader.load(profile: profile)
26
30
 
27
31
  # Check if system_specs.auto_run is explicitly set in YAML
32
+ # Use key? to distinguish between nil/not-set vs explicitly false
28
33
  if yaml_config['system_specs'] && yaml_config['system_specs'].key?('auto_run')
29
- return yaml_config['system_specs']['auto_run']
34
+ auto_run_value = yaml_config['system_specs']['auto_run']
35
+ # Return the value (true or false) - explicitly set in YAML
36
+ return auto_run_value
30
37
  end
31
- rescue StandardError
38
+ rescue StandardError => e
32
39
  # If YAML loading fails, fall through to initializer config
40
+ # Could log error here if needed for debugging
33
41
  end
34
42
 
35
- # Fall back to initializer configuration
43
+ # Fall back to initializer configuration (default: true)
36
44
  RailsAccessibilityTesting.config.auto_run_checks
37
45
  end
38
46
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAccessibilityTesting
4
- VERSION = "1.5.6"
4
+ VERSION = "1.5.7"
5
5
  end
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_accessibility_testing
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Regan Maharjan