Conversation
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Adds a way to expose a merged “all IMG4 schema data” hash, backed by a new DSL capability to attach custom instance methods to generated schema classes.
Changes:
- Introduces
define_methodsupport in the schema/data-file DSL and applies it to IMG4. - Adds
AppleData::Schemas::IMG4#allto merge multiple IMG4 collections into one hash (indifferent access). - Adjusts Ruby package Rake task versioning to use
mainfor repo height.
Reviewed changes
Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| spec/apple_data/schemas/img4_spec.rb | Adds a basic spec to exercise the new #all API. |
| _packages/ruby/lib/apple_data/schemas/img4.rb | Defines #all to merge IMG4 collections into a single hash with indifferent access. |
| _packages/ruby/lib/apple_data/dsl/data_file_definition.rb | Extends the DSL to register and install custom methods on generated schema classes. |
| _packages/ruby/Rakefile | Changes version task to count commits from main instead of HEAD. |
Files not reviewed (2)
- .idea/apple-knowledge.iml: Generated file
- .idea/runConfigurations/AppleData_Specs.xml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| desc 'set the version patch to the git main height' | ||
| task :version do | ||
| repo_height = `git rev-list --count HEAD` | ||
| repo_height = `git rev-list --count main` |
Comment on lines
+20
to
+23
| define_method :all do | ||
| [img4_tags, manifest_properties, objects, lpol_properties, core, types, | ||
| cryptex_properties].reduce(&:merge).with_indifferent_access | ||
| end |
Comment on lines
+48
to
+53
| it 'has #all' do | ||
| aggregate_failures do | ||
| expect(instance.all).to be_a(Hash) | ||
| expect(instance.all).not_to be_empty | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.