jpie 0.4.0 → 0.4.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: 815bcf1e307d5c5195cf35302381f44f073638c784e6628f893c1eb9e3cb1762
4
- data.tar.gz: 0dd7be88db93f112400c8b1750814f875b79c383e19610622f983e6d7b911793
3
+ metadata.gz: f0e1d1634f188bca4057e3550479af557bd00ba0d262c919ba221aa99997490e
4
+ data.tar.gz: 89db580da555f310a1b840daad204e2315fcb8b7828278b328271412d3bc321d
5
5
  SHA512:
6
- metadata.gz: 2fdbec7a1d41afda8bfce7eb92f7d27feb4a8b73e32ea28a034dc8e1d8a96a8ba5fa7b9ab4396295f669c9a65df46b8f2334c0d1f9cfc93fddffc0085af250cb
7
- data.tar.gz: 701c7e2a064ceecb89820ffcba6241e9c6daf774b422ced235fe173340403f78229c9385a9560e4a52dae7c2226bf8cad31d54e0068acab1480a787e7dbe12e9
6
+ metadata.gz: d2ced2be2db661db82e08200be2e5df033c072dcbf249565719336d3b08532d2cb01c4bbcec78cfb5e14fbbbadddb0c127292b70a9b970da3ecc20891bc8c8ab
7
+ data.tar.gz: 5d1ac4453eb74ba6a8ea04036f00065e26a54c2ff85a603525dd90106bd4f82a839ed3985083c5ff60d087b6bb1239c7a618a7a024e7e3fa1955c82d863aefa8
@@ -5,6 +5,10 @@
5
5
  - Follow Ruby style guide and RuboCop rules defined in .rubocop.yml
6
6
  - Prefer rubocop autocorrect
7
7
  - Always pass rubocop before committing to git
8
+ - Use `{data:}` rather than `{data: data}`
9
+ - Only use code comments when abasolutely necessary
10
+ - Keep any code comments short and concise
11
+ - Don't update the .rubocop.yml unless it's absolutely necessarry
8
12
 
9
13
  # Documentation requirements
10
14
  - Keep README.md up to date with installation and usage instructions
@@ -22,7 +26,7 @@
22
26
  # Git commit guidelines
23
27
  - Write clear, descriptive commit messages
24
28
  - Keep commits focused and atomic
25
- - Run tests before committing
29
+ - Run and pass tests before committing
26
30
  - Update documentation in the same commit as code changes
27
31
  - Ignore spec/examples.txt and other files listed in .gitignore
28
32
  - Include Ruby/Rails version requirements in relevant commits
@@ -33,6 +37,8 @@
33
37
  - Place tests in spec/jpie/
34
38
  - Use proper namespacing (JPie module)
35
39
  - Follow Ruby gem best practices
40
+ - Do not update the spec/jpie/database.rb unless it's absolutely necessarry
41
+ - Do not update the spec/jpie/resources.rb unless it's absolutely necessarry
36
42
 
37
43
  # Dependency management
38
44
  - Keep dependencies minimal and justified
@@ -56,10 +62,20 @@
56
62
  - Support Rails 8+ integration
57
63
  - Follow JSON:API specification strictly
58
64
 
59
- # Styleguide
60
- - Use `{data:}` rather than `{data: data}`
61
-
62
65
  # When implementing new features or refactoring
63
66
  - Always read the .aiconfig file
64
67
  - Always implement code slowly and methodically
65
- - Always test as you go
68
+ - Always test as you go
69
+ - Always make sure rubocop passes
70
+ - Do not add any functionality for the new feature to existing tests unless absolutely necessarry.
71
+
72
+ # Examples
73
+ - The examples must _only_ include _required_ code
74
+ - The examples must not include any unrelated or supurflous code
75
+ - Examples must be a single markdown file
76
+ - Examples must use the `http` code blocks for its exampels
77
+ - Examples must only include the minium number of examples
78
+ - Examples must never include migrations.
79
+ - Examples must not include a features section or similar
80
+ - Examples must include an introduction to the example
81
+ - Examples live in /examples/*.md
data/.overcommit.yml ADDED
@@ -0,0 +1,35 @@
1
+ # Use this file to configure the Overcommit hooks you wish to use. This will
2
+ # extend the default configuration defined in:
3
+ # https://github.com/sds/overcommit/blob/master/config/default.yml
4
+
5
+ # Global settings
6
+ verify_signatures: false
7
+
8
+ PreCommit:
9
+ ALL:
10
+ problem_on_unmodified_line: ignore
11
+ requires_files: true
12
+ quiet: false
13
+
14
+ # Run RuboCop on Ruby files before commit
15
+ RuboCop:
16
+ enabled: true
17
+ command: ['bundle', 'exec', 'rubocop']
18
+ flags: ['--force-exclusion']
19
+ on_warn: fail
20
+
21
+ # Check for trailing whitespace
22
+ TrailingWhitespace:
23
+ enabled: true
24
+ exclude:
25
+ - '**/*.md'
26
+
27
+ # Check for merge conflicts
28
+ MergeConflicts:
29
+ enabled: true
30
+
31
+ PrePush:
32
+ # Run RSpec tests before push
33
+ RSpec:
34
+ enabled: true
35
+ command: ['bundle', 'exec', 'rspec']
data/CHANGELOG.md CHANGED
@@ -7,6 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.4.2] - 2025-01-25
11
+
12
+ ### Added
13
+ - **Pagination Example**: Comprehensive pagination example demonstrating both simple and JSON:API standard pagination formats
14
+ - Simple pagination parameters (`page`, `per_page`)
15
+ - JSON:API standard pagination format (`page[number]`, `page[size]`)
16
+ - Pagination combined with sorting functionality
17
+ - Edge cases including last page and empty results
18
+ - Complete HTTP request/response examples following project format
19
+
20
+ ### Enhanced
21
+ - **Documentation**: Improved example coverage with detailed pagination use cases
22
+ - **Developer Experience**: Clear examples for implementing pagination in JPie applications
23
+
24
+ ## [0.4.1] - 2025-01-25
25
+
26
+ ### Fixed
27
+ - **Test Suite Stability**: Fixed require statements in spec files that were incorrectly requiring `rails_helper` instead of `spec_helper`
28
+ - Fixed `spec/jpie/automatic_crud_spec.rb`
29
+ - Fixed `spec/jpie/polymorphic_crud_spec.rb`
30
+ - Fixed `spec/jpie/through_associations_crud_spec.rb`
31
+ - **Code Quality**: Addressed RuboCop warnings and improved code style compliance
32
+ - **Error Handling**: Improved error message consistency for unsupported sort fields and include parameters
33
+
34
+ ### Enhanced
35
+ - **Test Coverage**: Maintained high test coverage (93.39%) with improved test reliability
36
+ - **Documentation**: Updated gem publishing workflow and development guidelines
37
+
38
+ ### Technical Details
39
+ - All spec files now correctly use `spec_helper` for consistent test environment setup
40
+ - Improved gem build process with proper dependency management
41
+ - Enhanced RuboCop configuration for better code quality enforcement
42
+
10
43
  ## [0.4.0] - 2025-01-25
11
44
 
12
45
  ### Added