Skip to content

PKI OID map - #155

Merged
rickmark merged 1 commit into
mainfrom
cert_oids
Aug 6, 2026
Merged

PKI OID map#155
rickmark merged 1 commit into
mainfrom
cert_oids

Conversation

@rickmark

@rickmark rickmark commented Aug 6, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings August 6, 2026 05:02
@rickmark
rickmark merged commit e63011c into main Aug 6, 2026
12 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 support and tests for the PKI OID map by improving OID entry stringification and making constructed collection hashes support indifferent key access.

Changes:

  • Added RSpec coverage for AppleData::Schemas::PKI#oids and entry #to_s
  • Extended PKI OID entry mapper with name and #to_s
  • Updated collection hash construction to return with_indifferent_access and adjusted RuboCop ABC size limit

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
spec/apple_data/schemas/pki_spec.rb Adds specs asserting OID map presence and entry stringification
_packages/ruby/lib/apple_data/schemas/pki.rb Adds name and #to_s for OID entries; introduces key accessor
_packages/ruby/lib/apple_data/dsl/data_file_definition.rb Attempts to label anonymous collection mappers with a custom name
_packages/ruby/lib/apple_data/data_file.rb Returns HashWithIndifferentAccess from constructed collections
.rubocop.yml Loosens ABC metric threshold

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +12 to +23
def collection(collection_name, mapper = nil, &)
data_collection_name = self.class.name
@collections[collection_name] = AppleData::DSL::CollectionDefinition.new(collection_name, mapper)
if block_given? && @collections[collection_name].mapper.nil?
@collections[collection_name].mapper = Class.new(AppleData::SchemaBase)
@collections[collection_name].mapper.const_set(:DATA_COLLECTION_NAME, data_collection_name)
@collections[collection_name].mapper.const_set(:COLLECTION_NAME, collection_name)
@collections[collection_name].mapper.instance_eval do
def name
"#{self.class.const_get(:DATA_COLLECTION_NAME)}:#{self.class.const_get(:COLLECTION_NAME)}"
end
end
Comment on lines +18 to +20
attr_accessor :key

attribute :name, :string
Comment on lines +29 to +31
define_method :to_s do
[name, title, description, key].reject(&:blank?).first
end
end

result.to_h
result.to_h.with_indifferent_access
Comment on lines +13 to +18
it 'has entries that respond to #to_s' do
aggregate_failures do
expect(instance.oids[:'1.2.840.113635.100.6.1.15'].to_s).to be_a(String)
expect(instance.oids[:'1.2.840.113635.100.6.1.15'].to_s).to eq 'appleImg4Manifest'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants