Icarus-Mod-Tools 2.2.1 → 2.5.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: e65ad8b4c6c5bd0cd903b9f2d9b8d0e09fb1382a776c7177a3aae0e74c60cfaa
4
- data.tar.gz: aa19523d4e5cd01aa6439e4cf83e020728a870c439c75552927940314979ddf6
3
+ metadata.gz: 4de5e1f299177ea6e8681ae6d92fd808086ed601aa0c61346b9dc5552925bb82
4
+ data.tar.gz: e76f59e4cf4774e737240e310015a5870b99338b7c16f85599d7881f836f090f
5
5
  SHA512:
6
- metadata.gz: dbf4a04fcd7c8035f22c6833f2beac93ded7a24ea9c73668ac29bdbc6aa41b0798376621b0a2965671fe715712d9f88f91c9270aec90267fe53293137ed0052c
7
- data.tar.gz: 95602d38541559babf423d486bd85a3a803e46eb131363391ec8d8904a326f1d84ebde775735c6783cc1ddf05b820e60696d3670541792ca611b4425c37224de
6
+ metadata.gz: d1e1f69dbf0a7ccb9558e9eac6b4ae802cd14cf78aeac3a18b54cb9c533008d98eaed562347cdf65712429173ddf614e018cf69d3366271753ba27c93c3fb80e
7
+ data.tar.gz: a95184b4d2be164e626390012630d86bdf94359e2e832396496f30dfd74911cee9d01dc03f605357e408ee912dd4dbf850cbaf8886206babd9cfbb08231facb8
@@ -0,0 +1,178 @@
1
+ # Claude Code Session Context - 2026-01-11
2
+
3
+ ## Status: COMPLETE - PR Open for Review
4
+
5
+ **Date:** 2026-01-11
6
+ **Pull Request:** #13 - https://github.com/DonovanMods/icarus-mod-tools/pull/13
7
+ **Branch:** feature/remove-mods-tools
8
+ **Issues Resolved:** #12, #5
9
+
10
+ ---
11
+
12
+ ## What Was Implemented
13
+
14
+ Added three new removal commands to the CLI:
15
+
16
+ 1. **`imt remove mod <MOD_ID>`** - Removes entries from the `mods` collection
17
+ 2. **`imt remove tool <TOOL_ID>`** - Removes entries from the `tools` collection
18
+ 3. **Enhanced `imt remove repos`** - Added cascade delete functionality (enabled by default via `--cascade` flag)
19
+
20
+ ### Cascade Delete Feature
21
+
22
+ When removing a repository with `--cascade` (default: true):
23
+ - Removes the repository from `meta/repos/list`
24
+ - Finds and removes all associated modinfo URLs from `meta/modinfo/list`
25
+ - Finds and removes all associated toolinfo URLs from `meta/toolinfo/list`
26
+ - Fetches each modinfo/toolinfo JSON and removes associated mods/tools from collections
27
+ - Gracefully handles fetch errors with warnings
28
+
29
+ Users can disable cascade with `--no-cascade` to only remove the repository entry.
30
+
31
+ ---
32
+
33
+ ## Files Modified
34
+
35
+ 1. **lib/icarus/mod/cli/remove.rb** (+151 lines)
36
+ - Added `mod(mod_id)` method
37
+ - Added `tool(tool_id)` method
38
+ - Enhanced `repos(repo)` with cascade logic
39
+ - Added private methods: `remove_entity`, `cascade_delete_repo`, `delete_entities_from_url`
40
+ - Includes `Tools::Sync::Helpers` for `retrieve_from_url` functionality
41
+
42
+ 2. **spec/icarus/mod/cli/remove_spec.rb** (+192 lines)
43
+ - Comprehensive test coverage for all new commands
44
+ - Tests for cascade delete functionality
45
+ - Tests for `--dry-run` compatibility
46
+ - Tests for error handling when URL fetch fails
47
+
48
+ 3. **lib/icarus/mod/version.rb**
49
+ - Bumped from 2.3.0 → 2.4.0
50
+
51
+ 4. **CHANGELOG.md**
52
+ - Added v2.4.0 entry documenting all changes
53
+
54
+ 5. **README.md**
55
+ - Updated `imt remove` command documentation
56
+ - Added `--cascade` and `--dry-run` options
57
+
58
+ 6. **Gemfile.lock**
59
+ - Updated version reference
60
+
61
+ ---
62
+
63
+ ## Test Results
64
+
65
+ ✅ All 290 tests passing
66
+ - 16 tests for remove command (including new mod/tool/cascade tests)
67
+ - Full test suite verified
68
+
69
+ ---
70
+
71
+ ## Key Implementation Details
72
+
73
+ ### Finding Entities by ID
74
+ Both `mod` and `tool` commands find entities by their Firestore document ID:
75
+ ```ruby
76
+ entity = collection.find { |e| e.id == entity_id }
77
+ ```
78
+
79
+ ### Cascade Delete Logic
80
+ 1. Filters modinfo/toolinfo URLs by repository name
81
+ 2. Deletes each URL from meta collections
82
+ 3. Fetches the JSON from each URL to get entity names
83
+ 4. Finds and deletes matching entities from mods/tools collections by name+author
84
+ 5. Finally removes the repository
85
+
86
+ ### Error Handling
87
+ - Warnings (not failures) when URLs can't be fetched during cascade
88
+ - Proper exit codes for not found scenarios
89
+ - Dry-run support for all operations
90
+
91
+ ---
92
+
93
+ ## PR Details
94
+
95
+ **Title:** feat: add remove commands for mods and tools collections (#12)
96
+ **URL:** https://github.com/DonovanMods/icarus-mod-tools/pull/13
97
+ **Status:** Open, mergeable
98
+ **Reviewer:** GitHub Copilot (auto-requested)
99
+ **Changes:** +349 lines, -19 lines across 6 files
100
+
101
+ **PR Body:**
102
+ ```markdown
103
+ ## Summary
104
+
105
+ Resolves #12
106
+ Resolves #5
107
+
108
+ Adds direct removal commands for the `mods` and `tools` collections, along with cascade delete functionality for repository removal.
109
+
110
+ ## Changes
111
+
112
+ - Add `imt remove mod <MOD_ID>` to delete entries from mods collection
113
+ - Add `imt remove tool <TOOL_ID>` to delete entries from tools collection
114
+ - Enhance `imt remove repos` with `--cascade` flag (enabled by default) to automatically remove associated modinfo, toolinfo, mods, and tools
115
+ - Include comprehensive test coverage for all new functionality
116
+ - Update documentation (README, CHANGELOG) for new commands
117
+ - Bump version to 2.4.0
118
+
119
+ ## Test Plan
120
+
121
+ - [x] All 290 tests passing
122
+ - [x] Added comprehensive test coverage for new commands
123
+ - [x] Tested cascade delete functionality
124
+ - [x] Tested --dry-run flag compatibility
125
+ - [x] Updated documentation
126
+ ```
127
+
128
+ ---
129
+
130
+ ## Git State
131
+
132
+ **Current Branch:** main (reset to match origin/main after creating PR)
133
+ **Main HEAD:** de2146d - "Add comprehensive test coverage and fix sync 404 errors (#9)"
134
+
135
+ **Feature Branch:** feature/remove-mods-tools
136
+ **Feature HEAD:** 5109a1a - "feat: add remove commands for mods and tools collections (#12)"
137
+ **Pushed to:** origin/feature/remove-mods-tools
138
+
139
+ ---
140
+
141
+ ## Next Steps
142
+
143
+ 1. ✅ PR created and open for review
144
+ 2. ⏳ Wait for PR review/approval
145
+ 3. ⏳ Merge PR when approved
146
+ 4. ⏳ Issues #12 and #5 will auto-close on merge
147
+ 5. ⏳ Consider tagging v2.4.0 release after merge
148
+
149
+ ---
150
+
151
+ ## How to Resume
152
+
153
+ When you move the repository and restart Claude Code:
154
+
155
+ 1. The PR is already created: https://github.com/DonovanMods/icarus-mod-tools/pull/13
156
+ 2. All code is committed to `feature/remove-mods-tools` branch
157
+ 3. The main branch is clean
158
+ 4. If you need to make changes to the PR, checkout the feature branch:
159
+ ```bash
160
+ git checkout feature/remove-mods-tools
161
+ # make changes
162
+ git add -A && git commit -m "update: ..."
163
+ git push
164
+ ```
165
+
166
+ 5. To merge the PR (when ready):
167
+ ```bash
168
+ gh pr merge 13 --squash # or --merge or --rebase
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Related Issues
174
+
175
+ - **#12** - "Add remove commands for mods and tools collections" (main issue)
176
+ - **#5** - "When a repo is deleted, the associated entry is not removed from the modinfo db" (cascade delete)
177
+
178
+ Both issues are linked in the PR and will auto-close when merged.
data/CHANGELOG.md CHANGED
@@ -4,6 +4,39 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  ## History (reverse chronological order)
6
6
 
7
+ ### v2.5.0 - 2026-01-12
8
+
9
+ - Add automatic conversion of GitHub URLs to `raw.githubusercontent.com` format during sync
10
+ - Converts both `/blob/` and `/raw/` URLs from `github.com` domain
11
+ - Applies to all file URLs in modinfo and toolinfo files
12
+ - Also applies to imageURL and readmeURL fields
13
+ - Warnings added to alert users to update source files
14
+ - Ensures compatibility with GitHub's current raw file hosting on `raw.githubusercontent.com`
15
+
16
+ ### v2.4.1 - 2026-01-12
17
+
18
+ - Fix JSON parsing error messages during sync to show concise error instead of full stack trace
19
+ - Include URL in JSON parsing error messages to identify which repository has invalid JSON
20
+
21
+ ### v2.4.0 - 2026-01-11
22
+
23
+ - Add `imt remove mod` command to remove entries from `mods` collection
24
+ - Add `imt remove tool` command to remove entries from `tools` collection
25
+ - Add cascade delete to `imt remove repos` (enabled by default via `--cascade` flag)
26
+ - When removing a repository, also removes associated modinfo, toolinfo, mods, and tools entries
27
+ - Improvements to cascade delete functionality:
28
+ - Fix URL matching to prevent false matches (e.g., "owner/repo" no longer matches "owner/repo-fork")
29
+ - Handle multiple entities with same name and author (deletes all matches)
30
+ - Improve error handling with specific exception types and comprehensive reporting
31
+ - Track and report both fetch failures and delete failures with detailed summaries
32
+ - Enhanced dry-run output showing all entities that would be deleted
33
+ - Add Firestore cache invalidation for mod/tool deletions
34
+
35
+ ### v2.3.0 - 2025-12-18
36
+
37
+ - Add comprehensive test coverage
38
+ - Fix sync 404 errors
39
+
7
40
  ### v2.1 - 2023-02-11
8
41
 
9
42
  - Remove support for `fileType` and `fileURL` in `modinfo.json` files
data/CLAUDE.md ADDED
@@ -0,0 +1,152 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Project Overview
6
+
7
+ Icarus Mod Tools (`imt`) is a Ruby CLI gem that manages a bidirectional sync between GitHub repositories and Google Firestore for the Icarus game mods database. The tool discovers `modinfo.json` and `toolinfo.json` files across repositories and maintains a centralized Firestore database.
8
+
9
+ ## Development Commands
10
+
11
+ ### Setup & Installation
12
+
13
+ ```bash
14
+ bin/setup # Install dependencies
15
+ bundle install # Install gems
16
+ bundle exec rake install # Install gem locally
17
+ ```
18
+
19
+ ### Testing
20
+
21
+ ```bash
22
+ bundle exec rake # Run tests (default task)
23
+ bundle exec rspec # Run tests only (with Fuubar formatter)
24
+ bundle exec rspec spec/path/to/file_spec.rb # Run single test file
25
+ bundle exec rspec spec/path/to/file_spec.rb:42 # Run single test at line 42
26
+ guard # Auto-run tests on file changes
27
+ ```
28
+
29
+ ### Console & Debugging
30
+
31
+ ```bash
32
+ bin/console # Interactive IRB console with project loaded
33
+ ```
34
+
35
+ ### Running the CLI
36
+
37
+ ```bash
38
+ bundle exec exe/imt [command] # Run CLI during development
39
+ imt [command] # Run installed gem
40
+ ```
41
+
42
+ ## Architecture
43
+
44
+ ### Data Flow Pipeline
45
+
46
+ The tool implements a two-stage sync pipeline:
47
+
48
+ 1. **GitHub → Meta Collections**: Scan repositories for metadata files and sync to `meta/modinfo`, `meta/toolinfo`, `meta/repos`
49
+ 2. **Meta → Entity Collections**: Process meta lists to populate/update `mods` and `tools` collections
50
+
51
+ All operations support `--dry-run` for safe testing.
52
+
53
+ ### Core Components
54
+
55
+ **CLI Layer** (`lib/icarus/mod/cli/`)
56
+
57
+ - `Command`: Main entry point, defines subcommands (sync, list, add, remove, validate)
58
+ - `Base`: Inherited by all commands, provides `--config` and `--version` options
59
+ - `SubcommandBase`: Base for subcommands, adds `--verbose` option
60
+ - Subcommands: `Sync`, `List`, `Add`, `Remove`, `Validate` (all Thor-based)
61
+
62
+ **Data Models** (`lib/icarus/mod/tools/`)
63
+
64
+ - `Baseinfo`: Shared validation/transformation logic for mod and tool data
65
+ - `Modinfo`: Validates and processes mod metadata
66
+ - `Toolinfo`: Validates and processes tool metadata
67
+ - `Validator`: Standalone validation utilities
68
+
69
+ **Sync Operations** (`lib/icarus/mod/tools/sync/`)
70
+
71
+ - `ModinfoList`: GitHub → meta/modinfo sync
72
+ - `ToolinfoList`: GitHub → meta/toolinfo sync
73
+ - `Mods`: meta/modinfo → mods sync
74
+ - `Tools`: meta/toolinfo → tools sync
75
+ - `Helpers`: HTTP utilities with custom SSL verification for Ruby 3.4+ CRL issues
76
+
77
+ **External Services** (`lib/icarus/mod/`)
78
+
79
+ - `Firestore`: Google Cloud Firestore client with collection management
80
+ - `Github`: Octokit wrapper with recursive file discovery
81
+ - `Config`: JSON config reader for `.imtconfig.json`
82
+
83
+ ### Global State
84
+
85
+ The CLI uses a global `$firestore` variable in sync commands to share the Firestore instance across operations. This is set in `CLI::Sync` and used by sync modules.
86
+
87
+ ### Configuration
88
+
89
+ The tool reads from `~/.imtconfig.json` (configurable via `--config`):
90
+
91
+ - Firebase credentials (full JSON object, not path)
92
+ - GitHub OAuth token
93
+ - Collection paths (configurable)
94
+
95
+ See README.md for configuration structure.
96
+
97
+ ## Development Patterns
98
+
99
+ ### CLI Command Structure
100
+
101
+ All commands inherit from `CLI::Base` or `CLI::SubcommandBase`:
102
+
103
+ ```ruby
104
+ class MyCommand < CLI::SubcommandBase
105
+ desc "mycommand ARGS", "Description"
106
+ method_option :my_option, aliases: "-m", type: :string, desc: "Option description"
107
+ def mycommand(args)
108
+ # Config is already loaded by CLI::Command#initialize
109
+ # Access via Icarus::Mod::Config.config
110
+ end
111
+ end
112
+ ```
113
+
114
+ ### Error Handling
115
+
116
+ Domain errors use `Icarus::Mod::Tools::Error`. Validation errors/warnings are stored in `@errors` and `@warnings` arrays on data model instances.
117
+
118
+ ```ruby
119
+ rescue Icarus::Mod::Tools::Error => e
120
+ warn "Error: #{e.message}"
121
+ exit 1
122
+ end
123
+ ```
124
+
125
+ ### Validation Rules
126
+
127
+ All mod/tool data inherits from `Baseinfo`:
128
+
129
+ - Required fields: `name`, `author`, `description`
130
+ - URL validation for `imageURL`, `readmeURL`, file URLs
131
+ - File types must match `/\.(zip|pak|exmodz?)/i`
132
+ - Version strings should match `/^\d+[.\d+]*/`
133
+
134
+ ### SSL Certificate Handling
135
+
136
+ Ruby 3.4+ with newer OpenSSL may fail CRL checking. The codebase handles this in `Sync::Helpers#retrieve_from_url` with a custom `verify_callback` that allows `V_ERR_UNABLE_TO_GET_CRL` errors.
137
+
138
+ ### Testing Patterns
139
+
140
+ - Fixtures in `spec/fixtures/`
141
+ - Tests run in random order (`config.order = :random`)
142
+ - Use `:focus` metadata to run specific tests
143
+ - Fuubar formatter provides progress bar display
144
+
145
+ ## Key Gotchas
146
+
147
+ - **Firestore credentials**: Must be the full JSON object in config, not a file path
148
+ - **GitHub repo format**: `owner/repo` format (URL prefixes are stripped automatically)
149
+ - **Ruby version**: 3.1+ required for pattern matching and modern features
150
+ - **Platform**: WSL2/Linux recommended; not tested on Windows
151
+ - **Require paths**: The gemspec sets `require_paths` to both `lib` and `lib/icarus/mod`, so files use relative requires like `require "cli/base"` instead of `require_relative`
152
+ - **Verbosity**: `-v` and `-vv` flags control output detail in subcommands
data/Gemfile CHANGED
@@ -15,5 +15,4 @@ group :develop do
15
15
  gem "rspec", "~> 3.12"
16
16
  gem "rubocop", "~> 1.41"
17
17
  gem "rubocop-rspec", "~> 2.16", require: false
18
- gem "standard", ">= 1.35.1"
19
18
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- Icarus-Mod-Tools (2.2.1)
4
+ Icarus-Mod-Tools (2.5.0)
5
5
  google-cloud-firestore (~> 2.7)
6
6
  octokit (~> 6.0)
7
7
  paint (~> 2.3)
@@ -10,13 +10,13 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- addressable (2.8.7)
14
- public_suffix (>= 2.0.2, < 7.0)
13
+ addressable (2.8.8)
14
+ public_suffix (>= 2.0.2, < 8.0)
15
15
  ast (2.4.3)
16
16
  base64 (0.3.0)
17
17
  bigdecimal (3.3.1)
18
18
  coderay (1.1.3)
19
- concurrent-ruby (1.3.5)
19
+ concurrent-ruby (1.3.6)
20
20
  diff-lcs (1.6.2)
21
21
  faraday (2.14.0)
22
22
  faraday-net_http (>= 2.0, < 3.5)
@@ -24,20 +24,20 @@ GEM
24
24
  logger
25
25
  faraday-net_http (3.4.2)
26
26
  net-http (~> 0.5)
27
- faraday-retry (2.3.2)
27
+ faraday-retry (2.4.0)
28
28
  faraday (~> 2.0)
29
- ffi (1.17.2)
30
- ffi (1.17.2-aarch64-linux-gnu)
31
- ffi (1.17.2-aarch64-linux-musl)
32
- ffi (1.17.2-arm-linux-gnu)
33
- ffi (1.17.2-arm-linux-musl)
34
- ffi (1.17.2-arm64-darwin)
35
- ffi (1.17.2-x86-linux-gnu)
36
- ffi (1.17.2-x86-linux-musl)
37
- ffi (1.17.2-x86_64-darwin)
38
- ffi (1.17.2-x86_64-linux-gnu)
39
- ffi (1.17.2-x86_64-linux-musl)
40
- formatador (1.2.2)
29
+ ffi (1.17.3)
30
+ ffi (1.17.3-aarch64-linux-gnu)
31
+ ffi (1.17.3-aarch64-linux-musl)
32
+ ffi (1.17.3-arm-linux-gnu)
33
+ ffi (1.17.3-arm-linux-musl)
34
+ ffi (1.17.3-arm64-darwin)
35
+ ffi (1.17.3-x86-linux-gnu)
36
+ ffi (1.17.3-x86-linux-musl)
37
+ ffi (1.17.3-x86_64-darwin)
38
+ ffi (1.17.3-x86_64-linux-gnu)
39
+ ffi (1.17.3-x86_64-linux-musl)
40
+ formatador (1.2.3)
41
41
  reline
42
42
  fuubar (2.5.1)
43
43
  rspec-core (~> 3.0)
@@ -73,31 +73,31 @@ GEM
73
73
  gapic-common (~> 1.2)
74
74
  google-cloud-errors (~> 1.0)
75
75
  google-logging-utils (0.2.0)
76
- google-protobuf (4.33.0)
76
+ google-protobuf (4.33.2)
77
77
  bigdecimal
78
78
  rake (>= 13)
79
- google-protobuf (4.33.0-aarch64-linux-gnu)
79
+ google-protobuf (4.33.2-aarch64-linux-gnu)
80
80
  bigdecimal
81
81
  rake (>= 13)
82
- google-protobuf (4.33.0-aarch64-linux-musl)
82
+ google-protobuf (4.33.2-aarch64-linux-musl)
83
83
  bigdecimal
84
84
  rake (>= 13)
85
- google-protobuf (4.33.0-arm64-darwin)
85
+ google-protobuf (4.33.2-arm64-darwin)
86
86
  bigdecimal
87
87
  rake (>= 13)
88
- google-protobuf (4.33.0-x86-linux-gnu)
88
+ google-protobuf (4.33.2-x86-linux-gnu)
89
89
  bigdecimal
90
90
  rake (>= 13)
91
- google-protobuf (4.33.0-x86-linux-musl)
91
+ google-protobuf (4.33.2-x86-linux-musl)
92
92
  bigdecimal
93
93
  rake (>= 13)
94
- google-protobuf (4.33.0-x86_64-darwin)
94
+ google-protobuf (4.33.2-x86_64-darwin)
95
95
  bigdecimal
96
96
  rake (>= 13)
97
- google-protobuf (4.33.0-x86_64-linux-gnu)
97
+ google-protobuf (4.33.2-x86_64-linux-gnu)
98
98
  bigdecimal
99
99
  rake (>= 13)
100
- google-protobuf (4.33.0-x86_64-linux-musl)
100
+ google-protobuf (4.33.2-x86_64-linux-musl)
101
101
  bigdecimal
102
102
  rake (>= 13)
103
103
  googleapis-common-protos (1.9.0)
@@ -106,7 +106,7 @@ GEM
106
106
  grpc (~> 1.41)
107
107
  googleapis-common-protos-types (1.22.0)
108
108
  google-protobuf (~> 4.26)
109
- googleauth (1.15.1)
109
+ googleauth (1.16.0)
110
110
  faraday (>= 1.0, < 3.a)
111
111
  google-cloud-env (~> 2.2)
112
112
  google-logging-utils (~> 0.1)
@@ -157,8 +157,8 @@ GEM
157
157
  guard (~> 2.1)
158
158
  guard-compat (~> 1.1)
159
159
  rspec (>= 2.99.0, < 4.0)
160
- io-console (0.8.1)
161
- json (2.16.0)
160
+ io-console (0.8.2)
161
+ json (2.18.0)
162
162
  jwt (3.1.2)
163
163
  base64
164
164
  language_server-protocol (3.17.0.5)
@@ -169,10 +169,10 @@ GEM
169
169
  logger (1.7.0)
170
170
  lumberjack (1.4.2)
171
171
  method_source (1.1.0)
172
- multi_json (1.17.0)
172
+ multi_json (1.19.1)
173
173
  nenv (0.3.0)
174
- net-http (0.7.0)
175
- uri
174
+ net-http (0.9.1)
175
+ uri (>= 0.11.1)
176
176
  notiffany (0.1.3)
177
177
  nenv (~> 0.1)
178
178
  shellany (~> 0.0)
@@ -186,11 +186,11 @@ GEM
186
186
  parser (3.3.10.0)
187
187
  ast (~> 2.4.1)
188
188
  racc
189
- prism (1.6.0)
189
+ prism (1.7.0)
190
190
  pry (0.14.2)
191
191
  coderay (~> 1.1)
192
192
  method_source (~> 1.0)
193
- public_suffix (6.0.2)
193
+ public_suffix (7.0.2)
194
194
  racc (1.8.1)
195
195
  rainbow (3.1.1)
196
196
  rake (13.3.1)
@@ -199,7 +199,7 @@ GEM
199
199
  ffi (~> 1.0)
200
200
  rbtree (0.4.6)
201
201
  regexp_parser (2.11.3)
202
- reline (0.6.2)
202
+ reline (0.6.3)
203
203
  io-console (~> 0.5)
204
204
  rspec (3.13.2)
205
205
  rspec-core (~> 3.13.0)
@@ -214,7 +214,7 @@ GEM
214
214
  diff-lcs (>= 1.2.0, < 2.0)
215
215
  rspec-support (~> 3.13.0)
216
216
  rspec-support (3.13.6)
217
- rubocop (1.80.2)
217
+ rubocop (1.82.1)
218
218
  json (~> 2.3)
219
219
  language_server-protocol (~> 3.17.0.2)
220
220
  lint_roller (~> 1.1.0)
@@ -222,22 +222,18 @@ GEM
222
222
  parser (>= 3.3.0.2)
223
223
  rainbow (>= 2.2.2, < 4.0)
224
224
  regexp_parser (>= 2.9.3, < 3.0)
225
- rubocop-ast (>= 1.46.0, < 2.0)
225
+ rubocop-ast (>= 1.48.0, < 2.0)
226
226
  ruby-progressbar (~> 1.7)
227
227
  unicode-display_width (>= 2.4.0, < 4.0)
228
- rubocop-ast (1.48.0)
228
+ rubocop-ast (1.49.0)
229
229
  parser (>= 3.3.7.2)
230
- prism (~> 1.4)
230
+ prism (~> 1.7)
231
231
  rubocop-capybara (2.22.1)
232
232
  lint_roller (~> 1.1)
233
233
  rubocop (~> 1.72, >= 1.72.1)
234
- rubocop-factory_bot (2.27.1)
234
+ rubocop-factory_bot (2.28.0)
235
235
  lint_roller (~> 1.1)
236
236
  rubocop (~> 1.72, >= 1.72.1)
237
- rubocop-performance (1.25.0)
238
- lint_roller (~> 1.1)
239
- rubocop (>= 1.75.0, < 2.0)
240
- rubocop-ast (>= 1.38.0, < 2.0)
241
237
  rubocop-rspec (2.31.0)
242
238
  rubocop (~> 1.40)
243
239
  rubocop-capybara (~> 2.17)
@@ -255,22 +251,10 @@ GEM
255
251
  faraday (>= 0.17.5, < 3.a)
256
252
  jwt (>= 1.5, < 4.0)
257
253
  multi_json (~> 1.10)
258
- standard (1.51.1)
259
- language_server-protocol (~> 3.17.0.2)
260
- lint_roller (~> 1.0)
261
- rubocop (~> 1.80.2)
262
- standard-custom (~> 1.0.0)
263
- standard-performance (~> 1.8)
264
- standard-custom (1.0.2)
265
- lint_roller (~> 1.0)
266
- rubocop (~> 1.50)
267
- standard-performance (1.8.0)
268
- lint_roller (~> 1.1)
269
- rubocop-performance (~> 1.25.0)
270
254
  thor (1.4.0)
271
255
  unicode-display_width (3.2.0)
272
256
  unicode-emoji (~> 4.1)
273
- unicode-emoji (4.1.0)
257
+ unicode-emoji (4.2.0)
274
258
  uri (1.1.1)
275
259
 
276
260
  PLATFORMS
@@ -283,6 +267,7 @@ PLATFORMS
283
267
  x86-linux-gnu
284
268
  x86-linux-musl
285
269
  x86_64-darwin
270
+ x86_64-linux
286
271
  x86_64-linux-gnu
287
272
  x86_64-linux-musl
288
273
 
@@ -296,7 +281,6 @@ DEPENDENCIES
296
281
  rspec (~> 3.12)
297
282
  rubocop (~> 1.41)
298
283
  rubocop-rspec (~> 2.16)
299
- standard (>= 1.35.1)
300
284
 
301
285
  BUNDLED WITH
302
286
  2.6.9
data/README.md CHANGED
@@ -58,6 +58,7 @@ Commands:
58
58
  imt add # Adds entries to the databases
59
59
  imt help [COMMAND] # Describe available commands or one specific command
60
60
  imt list # Lists the databases
61
+ imt remove # Removes entries from the databases
61
62
  imt sync # Syncs the databases
62
63
  imt validate # Validates various entries
63
64
 
@@ -104,6 +105,28 @@ Options:
104
105
  # Default: [true]
105
106
  ```
106
107
 
108
+ #### `imt remove`
109
+
110
+ ```sh
111
+ Commands:
112
+ imt remove help [COMMAND] # Describe subcommands or one specific subcommand
113
+ imt remove mod MOD_ID # Removes a mod from the 'mods' collection
114
+ imt remove modinfo ITEM # Removes an entry from 'meta/modinfo/list'
115
+ imt remove repos REPO # Removes an entry from 'meta/repos/list' and cascades to associated mods/tools
116
+ imt remove tool TOOL_ID # Removes a tool from the 'tools' collection
117
+ imt remove toolinfo ITEM # Removes an entry from 'meta/toolinfo/list'
118
+
119
+ Options:
120
+ -C, [--config=CONFIG] # Path to the config file
121
+ # Default: /Users/dyoung/.imtconfig.json
122
+ -V, [--version], [--no-version] # Print the version and exit
123
+ -v, [--verbose], [--no-verbose] # Increase verbosity. May be repeated for even more verbosity.
124
+ # Default: [true]
125
+ [--dry-run], [--no-dry-run] # Dry run (no changes will be made)
126
+ [--cascade], [--no-cascade] # Also remove associated modinfo, toolinfo, mods, and tools entries (for repos only)
127
+ # Default: true
128
+ ```
129
+
107
130
  #### `imt sync`
108
131
 
109
132
  ```sh
@@ -124,6 +147,8 @@ Options:
124
147
  [--dry-run], [--no-dry-run] # Dry run (no changes will be made)
125
148
  ```
126
149
 
150
+ **Note**: Sync operations automatically convert GitHub URLs to the correct `raw.githubusercontent.com` format for direct downloads. If you're using GitHub URLs in `modinfo.json` or `toolinfo.json` files, you can use either `/blob/` or `/raw/` formats and they will be automatically converted. Warnings will be displayed when URLs are auto-fixed so you can update your source files.
151
+
127
152
  ## Development
128
153
 
129
154
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -132,4 +157,4 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
132
157
 
133
158
  ## Contributing
134
159
 
135
- Bug reports and pull requests are welcome on GitHub at https://github.com/DonovanMods/icarus-mod-tools.
160
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/DonovanMods/icarus-mod-tools>.
data/Rakefile CHANGED
@@ -3,10 +3,9 @@
3
3
  require "bundler/gem_tasks"
4
4
  require "rake/testtask"
5
5
  require "rspec/core/rake_task"
6
- require "standard/rake"
7
6
 
8
7
  RSpec::Core::RakeTask.new(:spec) do |task|
9
8
  task.rspec_opts = ["--color", "--format", "Fuubar"]
10
9
  end
11
10
 
12
- task default: %i[spec standard]
11
+ task default: %i[spec]