-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
77 changed files
with
1,378 additions
and
1,107 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
example_id | status | run_time | | ||
----------------------------------- | ------ | --------------- | | ||
./spec/metaschema_spec.rb[1:1:1:1] | passed | 0.00694 seconds | | ||
./spec/metaschema_spec.rb[1:1:1:2] | passed | 0.00481 seconds | | ||
./spec/metaschema_spec.rb[1:1:2:1] | passed | 0.00441 seconds | | ||
./spec/metaschema_spec.rb[1:1:2:2] | passed | 0.00358 seconds | | ||
./spec/metaschema_spec.rb[1:1:3:1] | passed | 0.0022 seconds | | ||
./spec/metaschema_spec.rb[1:1:3:2] | passed | 0.00179 seconds | | ||
./spec/metaschema_spec.rb[1:1:4:1] | passed | 0.00314 seconds | | ||
./spec/metaschema_spec.rb[1:1:4:2] | passed | 0.00219 seconds | | ||
./spec/metaschema_spec.rb[1:1:5:1] | passed | 0.00289 seconds | | ||
./spec/metaschema_spec.rb[1:1:5:2] | passed | 0.002 seconds | | ||
./spec/metaschema_spec.rb[1:1:6:1] | passed | 0.0042 seconds | | ||
./spec/metaschema_spec.rb[1:1:6:2] | passed | 0.00309 seconds | | ||
./spec/metaschema_spec.rb[1:1:7:1] | passed | 0.00576 seconds | | ||
./spec/metaschema_spec.rb[1:1:7:2] | passed | 0.00391 seconds | | ||
./spec/metaschema_spec.rb[1:1:8:1] | passed | 0.00269 seconds | | ||
./spec/metaschema_spec.rb[1:1:8:2] | passed | 0.00189 seconds | | ||
./spec/metaschema_spec.rb[1:1:9:1] | passed | 0.00346 seconds | | ||
./spec/metaschema_spec.rb[1:1:9:2] | passed | 0.00259 seconds | | ||
./spec/metaschema_spec.rb[1:1:10:1] | passed | 0.00244 seconds | | ||
./spec/metaschema_spec.rb[1:1:10:2] | passed | 0.00228 seconds | | ||
./spec/metaschema_spec.rb[1:1:11:1] | passed | 0.00318 seconds | | ||
./spec/metaschema_spec.rb[1:1:11:2] | passed | 0.00254 seconds | | ||
./spec/metaschema_spec.rb[1:1:12:1] | passed | 0.00298 seconds | | ||
./spec/metaschema_spec.rb[1:1:12:2] | passed | 0.00275 seconds | | ||
./spec/metaschema_spec.rb[1:1:13:1] | passed | 0.00334 seconds | | ||
./spec/metaschema_spec.rb[1:1:13:2] | passed | 0.00253 seconds | | ||
./spec/metaschema_spec.rb[1:1:14:1] | passed | 0.0035 seconds | | ||
./spec/metaschema_spec.rb[1:1:14:2] | passed | 0.00255 seconds | | ||
./spec/metaschema_spec.rb[1:1:15:1] | passed | 0.00547 seconds | | ||
./spec/metaschema_spec.rb[1:1:15:2] | passed | 0.00424 seconds | | ||
./spec/metaschema_spec.rb[1:1:16:1] | passed | 0.00248 seconds | | ||
./spec/metaschema_spec.rb[1:1:16:2] | passed | 0.00201 seconds | | ||
./spec/metaschema_spec.rb[1:1:17:1] | passed | 0.00249 seconds | | ||
./spec/metaschema_spec.rb[1:1:17:2] | passed | 0.00185 seconds | | ||
./spec/metaschema_spec.rb[1:1:18:1] | passed | 0.00229 seconds | | ||
./spec/metaschema_spec.rb[1:1:18:2] | passed | 0.00182 seconds | | ||
./spec/metaschema_spec.rb[1:1:19:1] | passed | 0.00252 seconds | | ||
./spec/metaschema_spec.rb[1:1:19:2] | passed | 0.00183 seconds | | ||
./spec/metaschema_spec.rb[1:1:20:1] | passed | 0.00284 seconds | | ||
./spec/metaschema_spec.rb[1:1:20:2] | passed | 0.00204 seconds | | ||
./spec/metaschema_spec.rb[1:1:21:1] | passed | 0.00755 seconds | | ||
./spec/metaschema_spec.rb[1:1:21:2] | passed | 0.00568 seconds | | ||
./spec/metaschema_spec.rb[1:1:22:1] | passed | 0.00272 seconds | | ||
./spec/metaschema_spec.rb[1:1:22:2] | passed | 0.0018 seconds | | ||
./spec/metaschema_spec.rb[1:1:23:1] | passed | 0.0024 seconds | | ||
./spec/metaschema_spec.rb[1:1:23:2] | passed | 0.00169 seconds | | ||
./spec/metaschema_spec.rb[1:1:24:1] | passed | 0.0039 seconds | | ||
./spec/metaschema_spec.rb[1:1:24:2] | passed | 0.0032 seconds | | ||
./spec/metaschema_spec.rb[1:1:25:1] | passed | 0.00356 seconds | | ||
./spec/metaschema_spec.rb[1:1:25:2] | passed | 0.0026 seconds | | ||
./spec/metaschema_spec.rb[1:1:26:1] | passed | 0.00482 seconds | | ||
./spec/metaschema_spec.rb[1:1:26:2] | passed | 0.00368 seconds | | ||
./spec/metaschema_spec.rb[1:1:27:1] | passed | 0.00508 seconds | | ||
./spec/metaschema_spec.rb[1:1:27:2] | passed | 0.00346 seconds | | ||
./spec/metaschema_spec.rb[1:1:28:1] | passed | 0.00368 seconds | | ||
./spec/metaschema_spec.rb[1:1:28:2] | passed | 0.00311 seconds | | ||
./spec/metaschema_spec.rb[1:1:29:1] | passed | 0.0038 seconds | | ||
./spec/metaschema_spec.rb[1:1:29:2] | passed | 0.00259 seconds | | ||
./spec/metaschema_spec.rb[1:1:30:1] | passed | 0.00279 seconds | | ||
./spec/metaschema_spec.rb[1:1:30:2] | passed | 0.002 seconds | | ||
./spec/metaschema_spec.rb[1:1:31:1] | passed | 0.02414 seconds | | ||
./spec/metaschema_spec.rb[1:1:31:2] | passed | 0.01733 seconds | |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
inherit_from: .rubocop_todo.yml |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2024-10-28 08:35:06 UTC using RuboCop version 1.67.0. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: leading, trailing | ||
Layout/DotPosition: | ||
Exclude: | ||
- 'spec/metaschema_spec.rb' | ||
|
||
# Offense count: 65 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
Layout/EmptyLineAfterMagicComment: | ||
Enabled: false | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, IndentationWidth. | ||
# SupportedStyles: aligned, indented, indented_relative_to_receiver | ||
Layout/MultilineMethodCallIndentation: | ||
Exclude: | ||
- 'spec/metaschema_spec.rb' | ||
|
||
# Offense count: 3 | ||
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. | ||
# AllowedMethods: refine | ||
Metrics/BlockLength: | ||
Max: 44 | ||
|
||
# Offense count: 66 | ||
# Configuration parameters: AllowedConstants. | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
# Offense count: 65 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: always, always_true, never | ||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
# Offense count: 2 | ||
# This cop supports unsafe autocorrection (--autocorrect-all). | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: literals, strict | ||
Style/MutableConstant: | ||
Exclude: | ||
- 'split_files.rb' | ||
|
||
# Offense count: 1 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: PreferredDelimiters. | ||
Style/PercentLiteralDelimiters: | ||
Exclude: | ||
- 'spec/metaschema_spec.rb' | ||
|
||
# Offense count: 1120 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. | ||
# SupportedStyles: single_quotes, double_quotes | ||
Style/StringLiterals: | ||
Enabled: false | ||
|
||
# Offense count: 2 | ||
# This cop supports safe autocorrection (--autocorrect). | ||
# Configuration parameters: EnforcedStyleForMultiline. | ||
# SupportedStylesForMultiline: comma, consistent_comma, no_comma | ||
Style/TrailingCommaInArguments: | ||
Exclude: | ||
- 'spec/metaschema_spec.rb' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in metaschema.gemspec | ||
gemspec | ||
|
||
gem "rake", "~> 13.0" | ||
gem 'rake', '~> 13.0' | ||
|
||
gem "rspec", "~> 3.0" | ||
gem 'rspec', '~> 3.0' | ||
|
||
gem "rubocop", "~> 1.21" | ||
gem 'rubocop', '~> 1.21' |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require "bundler/setup" | ||
require "metaschema" | ||
require 'bundler/setup' | ||
require 'metaschema' | ||
|
||
# You can add fixtures and/or initialization code here to make experimenting | ||
# with your gem easier. You can also use a different console, if you like. | ||
|
||
require "irb" | ||
require 'irb' | ||
IRB.start(__FILE__) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
require_relative "../lib/metaschema" | ||
require_relative "../lib/metaschema/cli" | ||
require_relative '../lib/metaschema' | ||
require_relative '../lib/metaschema/cli' | ||
|
||
Metaschema::Cli::Commands.start(ARGV) |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,37 @@ | ||
require "lutaml/model" | ||
# frozen_string_literal: true | ||
|
||
require_relative "allowed_value_type" | ||
require_relative "markup_line_datatype" | ||
require_relative "property_type" | ||
require_relative "remarks_type" | ||
require 'lutaml/model' | ||
|
||
require_relative 'allowed_value_type' | ||
require_relative 'markup_line_datatype' | ||
require_relative 'property_type' | ||
require_relative 'remarks_type' | ||
|
||
module Metaschema | ||
class AllowedValuesType < Lutaml::Model::Serializable | ||
attribute :id, :string | ||
attribute :level, :string, default: -> { "ERROR" } | ||
attribute :allow_other, :string, default: -> { "no" } | ||
attribute :extensible, :string, default: -> { "external" } | ||
attribute :level, :string, default: -> { 'ERROR' } | ||
attribute :allow_other, :string, default: -> { 'no' } | ||
attribute :extensible, :string, default: -> { 'external' } | ||
attribute :formal_name, :string | ||
attribute :description, MarkupLineDatatype | ||
attribute :prop, PropertyType, collection: true | ||
attribute :enum, AllowedValueType, collection: true | ||
attribute :remarks, RemarksType | ||
|
||
xml do | ||
root "AllowedValuesType" | ||
namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0" | ||
root 'AllowedValuesType' | ||
namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0' | ||
|
||
map_attribute "id", to: :id | ||
map_attribute "level", to: :level | ||
map_attribute "allow-other", to: :allow_other | ||
map_attribute "extensible", to: :extensible | ||
map_element "formal-name", to: :formal_name | ||
map_element "description", to: :description | ||
map_element "prop", to: :prop | ||
map_element "enum", to: :enum | ||
map_element "remarks", to: :remarks | ||
map_attribute 'id', to: :id | ||
map_attribute 'level', to: :level | ||
map_attribute 'allow-other', to: :allow_other | ||
map_attribute 'extensible', to: :extensible | ||
map_element 'formal-name', to: :formal_name | ||
map_element 'description', to: :description | ||
map_element 'prop', to: :prop | ||
map_element 'enum', to: :enum | ||
map_element 'remarks', to: :remarks | ||
end | ||
end | ||
end |
This file contains 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
Oops, something went wrong.