rospatent 1.2.0 → 1.3.1

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: f0fd09ca7a6d13e73a4ec4af7f9e06e4e4a5c640607b551c614289898d83a177
4
- data.tar.gz: 76cca6feb25bf64b8c069059470f87e7aef159331f93a0fccb2e7147df69cbab
3
+ metadata.gz: 01cd0ab72ae339b3dab5372eebb311b6aef97fbc17f4fe8c4c00466aee363abe
4
+ data.tar.gz: d279cbbe0944f3f55890b62593b4480359222bae51b2c3c132baaf07d55c0347
5
5
  SHA512:
6
- metadata.gz: 1022920b2f35d2db3558c6df5668db8421df46bbdba2ee13a40d5119a36ca5e3e4a4fb33d8432a10f088fa8dfcb9d1333a7a9b05f4c1ba287ddc8887cf3f32b8
7
- data.tar.gz: 8ce447fae3280ee2d0a4ff83ab481c8a47321bddcb2cbd310c557d01700635ea271079dcda98f4993d312573d3ec29404a02377743396c2b38ac2f60498d5593
6
+ metadata.gz: d9f33a05a5c1b57b87baf0091300c0b46587b0567ba4def4ae1e635449a9ac7ec0d077bb630b32b2445111429ce7e86c9291daceb5ac75182bf44eb1beb5d16c
7
+ data.tar.gz: 950400777375b018839a8a1090db421994c36a28d0e3881b783236e50d6d5dd43ef5d0a65f9c010cd878f54aa31cb55af74b540c8240676dbcf65bc74ea39743
data/CHANGELOG.md CHANGED
@@ -5,6 +5,69 @@ 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.3.1] - 2025-06-06
9
+
10
+ ### Fixed
11
+ - **Include Facets Parameter Handling**: Fixed critical bug in `include_facets` parameter validation and API format conversion
12
+ - Fixed boolean validation logic that incorrectly converted `false` values to `true`
13
+ - Added proper boolean-to-numeric conversion for API compliance (true → 1, false → 0)
14
+ - Enhanced validation to handle various input formats ("true", "false", 0, 1, etc.)
15
+ - Updated documentation with conversion behavior notes
16
+ - **Rails Logger Compatibility**: Fixed TypeError when using `Rails.logger` with `Rospatent::Logger`
17
+ - Added intelligent duck typing to detect existing logger instances vs IO objects
18
+ - `Rails.logger` can now be passed directly without creating wrapper Logger instances
19
+ - Maintains full compatibility with file paths, IO objects, and custom loggers
20
+ - Added comprehensive test coverage for Rails integration scenarios
21
+
22
+ ### Changed
23
+ - Enhanced `Rospatent::Logger` to accept existing logger instances (Rails.logger, custom loggers) in addition to IO objects
24
+ - Improved boolean parameter validation across the gem with better edge case handling
25
+ - Updated README documentation with Rails.logger usage examples and boolean parameter conversion notes
26
+
27
+ ### Added
28
+ - New comprehensive test suite for Logger class covering Rails integration scenarios
29
+ - Test coverage for include_facets boolean-to-numeric conversion with various input types
30
+
31
+ ## [1.3.0] - 2025-01-02
32
+
33
+ ### Added
34
+ - **Complete Filter Parameter Validation System**: Comprehensive overhaul of filter parameter handling with API compliance
35
+ - New `validate_filter()`, `validate_filter_values()`, `validate_filter_range()`, and `validate_filter_date()` methods
36
+ - Field validation for all supported filter fields (authors, patent_holders, country, kind, ids, classification codes, dates)
37
+ - Structure validation requiring `{"values": [...]}` format for list filters and `{"range": {"operator": "YYYYMMDD"}}` for date filters
38
+ - Automatic date format conversion from "YYYY-MM-DD" and Date objects to "YYYYMMDD" API format
39
+ - Comprehensive error messages for invalid filter structures and unsupported fields
40
+ - **Enhanced Highlight Parameter Support**: Complete rewrite according to API specification
41
+ - New `validate_string_or_array()` method for tag validation
42
+ - Support for independent `pre_tag` and `post_tag` parameters (both required together)
43
+ - Support for string or array tag values for multi-color highlighting
44
+ - Advanced `highlight` parameter for profile-based highlighting configuration
45
+ - **Improved Error Message Extraction**: Enhanced error handling for Rospatent API responses
46
+ - Error parsing now checks `"result"` field (Rospatent API format) in addition to standard `"error"` and `"message"` fields
47
+ - Updated `extract_validation_errors()` to check `"details"` field for validation errors
48
+ - Applied improvements to both `handle_response()` and `handle_binary_response()` methods
49
+ - **String Enum Validation**: New `validate_string_enum()` method preserving string types for API compliance
50
+ - **Comprehensive Test Coverage**: Added 49+ new tests covering filter validation, highlight functionality, error handling scenarios
51
+ - **Enhanced Rails Integration**: Improved Rails initializer with proper environment variable priority handling
52
+
53
+ ### Fixed
54
+ - **Group_by Parameter API Compliance**: Fixed to use correct API values `"family:docdb"` and `"family:dwpi"` instead of symbol conversion
55
+ - **Environment Variable Priority Issues**: Fixed Rails initializer to prevent DEBUG logs in production when `ROSPATENT_LOG_LEVEL=debug` is set
56
+ - **Filter Parameter Missing Issue**: Added missing `filter` parameter to `validate_search_params` validation rules
57
+ - **Token Configuration Priority**: Improved token loading priority (Rails credentials → `ROSPATENT_TOKEN` → `ROSPATENT_API_TOKEN`)
58
+ - **Configuration Environment Conflicts**: Fixed `load_environment_config` to only override values not explicitly set by environment variables
59
+
60
+ ### Changed
61
+ - **Input Validation Type System**: Extended to support `:string_enum`, `:string_or_array`, and `:hash` validation types
62
+ - **Search Parameter Validation**: Updated client validation to use correct API-compliant parameter types and values
63
+ - **Test Suite Growth**: Expanded from 170 to 219 tests with 465 assertions, all passing with comprehensive integration testing
64
+ - **Documentation Overhaul**: Major README updates with comprehensive filter examples, environment variable documentation, and Rails integration guides
65
+ - **Configuration Management**: Enhanced environment variable handling with clear priority documentation and troubleshooting guides
66
+
67
+ ### Security
68
+ - **Input Validation Strengthening**: Stricter validation prevents invalid requests from reaching API endpoints
69
+ - **Environment Configuration Hardening**: Improved handling of sensitive configuration in different environments
70
+
8
71
  ## [1.2.0] - 2025-06-04
9
72
 
10
73
  ### Added