wip-ruby 0.2.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 +7 -0
- data/.simplecov +36 -0
- data/CHANGELOG.md +41 -0
- data/LICENSE.txt +21 -0
- data/README.md +846 -0
- data/Rakefile +45 -0
- data/lib/wip/client.rb +84 -0
- data/lib/wip/configuration.rb +89 -0
- data/lib/wip/error.rb +76 -0
- data/lib/wip/http_client.rb +221 -0
- data/lib/wip/models/base.rb +160 -0
- data/lib/wip/models/collection.rb +81 -0
- data/lib/wip/models/comment.rb +28 -0
- data/lib/wip/models/concerns/reactable.rb +25 -0
- data/lib/wip/models/project.rb +48 -0
- data/lib/wip/models/reaction.rb +32 -0
- data/lib/wip/models/todo.rb +57 -0
- data/lib/wip/models/user.rb +51 -0
- data/lib/wip/resources/base.rb +80 -0
- data/lib/wip/resources/comments.rb +93 -0
- data/lib/wip/resources/projects.rb +42 -0
- data/lib/wip/resources/reactions.rb +74 -0
- data/lib/wip/resources/todos.rb +47 -0
- data/lib/wip/resources/uploads.rb +111 -0
- data/lib/wip/resources/users.rb +61 -0
- data/lib/wip/resources/viewer.rb +52 -0
- data/lib/wip/version.rb +5 -0
- data/lib/wip-ruby.rb +1 -0
- data/lib/wip.rb +51 -0
- data/sig/wip/ruby.rbs +6 -0
- data/test_examples.rb +435 -0
- metadata +119 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b0742f65f4cacef1776e2d5c4a7e433955cfee07494c071da9ffc70f77bfe218
|
|
4
|
+
data.tar.gz: fdfd5f281f6495335465afc36286ce417049b8beba47fb46ec28742cd6f5528b
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 974878dc5e5f8ade4f4f91ec37e1e03542fb5e0f5f0a1e27e0d058618e5de0aa27ce9343c2d22011111f3060530a47e9c28bfa9150405aa57440b2599bea8202
|
|
7
|
+
data.tar.gz: 62f2893a429be434a530f7a5731f1291a56c571650edb45a83cb7d7164451aea1ace933d2d1ff9ba26ba2102e725726a5fb7b9d4fbc24fe66dd56a6202476dfe
|
data/.simplecov
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# SimpleCov configuration file (auto-loaded before test suite)
|
|
4
|
+
# This keeps test_helper.rb clean and follows best practices
|
|
5
|
+
|
|
6
|
+
SimpleCov.start do
|
|
7
|
+
# Use SimpleFormatter for terminal-only output (no HTML generation)
|
|
8
|
+
formatter SimpleCov::Formatter::SimpleFormatter
|
|
9
|
+
|
|
10
|
+
# Track coverage for the lib directory (gem source code)
|
|
11
|
+
add_filter "/test/"
|
|
12
|
+
|
|
13
|
+
# Track Ruby files in lib directory
|
|
14
|
+
track_files "lib/**/*.rb"
|
|
15
|
+
|
|
16
|
+
# Enable branch coverage for more detailed metrics
|
|
17
|
+
enable_coverage :branch
|
|
18
|
+
|
|
19
|
+
# Set minimum coverage threshold to prevent coverage regression
|
|
20
|
+
minimum_coverage line: 80, branch: 75
|
|
21
|
+
|
|
22
|
+
# Disambiguate parallel test runs
|
|
23
|
+
command_name "Job #{ENV['TEST_ENV_NUMBER']}" if ENV['TEST_ENV_NUMBER']
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Print coverage summary to terminal after tests complete
|
|
27
|
+
SimpleCov.at_exit do
|
|
28
|
+
SimpleCov.result.format!
|
|
29
|
+
puts "\n" + "=" * 60
|
|
30
|
+
puts "COVERAGE SUMMARY"
|
|
31
|
+
puts "=" * 60
|
|
32
|
+
puts "Line Coverage: #{SimpleCov.result.covered_percent.round(2)}%"
|
|
33
|
+
branch_coverage = SimpleCov.result.coverage_statistics[:branch]&.percent&.round(2) || "N/A"
|
|
34
|
+
puts "Branch Coverage: #{branch_coverage}%"
|
|
35
|
+
puts "=" * 60
|
|
36
|
+
end
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.0] - 2026-02-02
|
|
4
|
+
|
|
5
|
+
Full WIP.co API OpenAPI compliance + gem ecosystem standardization.
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
- **Comments**: Full CRUD - create, update, delete, list for todos
|
|
9
|
+
- **Reactions**: Create and delete reactions (likes) on todos and comments
|
|
10
|
+
- **Uploads**: File upload with pre-signed URLs and dynamic HTTP method
|
|
11
|
+
|
|
12
|
+
### Improvements
|
|
13
|
+
- 100% OpenAPI schema compliance across all models
|
|
14
|
+
- Upgraded to minitest 6+ with minitest-mock gem split
|
|
15
|
+
- Standardized gem ecosystem (Gemfile, .gitignore, CI workflows)
|
|
16
|
+
- Comprehensive test suite: 242 tests, 93% line coverage, 78% branch coverage
|
|
17
|
+
- VCR cassettes for all API endpoints (human-readable UTF-8)
|
|
18
|
+
- GitHub Actions CI for Ruby 3.3, 3.4, 4.0
|
|
19
|
+
|
|
20
|
+
### Fixes
|
|
21
|
+
- Fixed base model falsy value handling (`false` values were being skipped)
|
|
22
|
+
- Fixed upload HTTP method to use dynamic `method` from API response
|
|
23
|
+
- Added strict integer/float coercion with validation
|
|
24
|
+
- Fixed MIME type fallback to `application/octet-stream`
|
|
25
|
+
|
|
26
|
+
## [0.1.0] - 2026-01-26
|
|
27
|
+
|
|
28
|
+
Initial release with core WIP.co API coverage.
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
- Todos: create, find
|
|
32
|
+
- Users: find, list projects, list todos
|
|
33
|
+
- Projects: find, list todos
|
|
34
|
+
- Viewer: authenticated user endpoints
|
|
35
|
+
|
|
36
|
+
### Highlights
|
|
37
|
+
- Cursor-based pagination
|
|
38
|
+
- Flexible date filtering (Time, Date, String, Unix timestamp)
|
|
39
|
+
- Automatic retries with exponential backoff
|
|
40
|
+
- Comprehensive error handling
|
|
41
|
+
- Optional request logging
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Javi R
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|