metaschema 0.1.0 → 0.1.2

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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -0
  3. data/.rubocop_todo.yml +18 -0
  4. data/Rakefile +3 -3
  5. data/exe/metaschema +2 -2
  6. data/lib/metaschema/allowed_value_type.rb +24 -22
  7. data/lib/metaschema/allowed_values_type.rb +21 -19
  8. data/lib/metaschema/anchor_type.rb +19 -17
  9. data/lib/metaschema/any_type.rb +5 -3
  10. data/lib/metaschema/assembly.rb +24 -22
  11. data/lib/metaschema/assembly_model_type.rb +19 -17
  12. data/lib/metaschema/assembly_reference_type.rb +23 -21
  13. data/lib/metaschema/block_quote_type.rb +25 -23
  14. data/lib/metaschema/choice_type.rb +13 -11
  15. data/lib/metaschema/code_type.rb +23 -21
  16. data/lib/metaschema/constraint_let_type.rb +9 -7
  17. data/lib/metaschema/define_assembly_constraints_type.rb +23 -21
  18. data/lib/metaschema/define_field_constraints_type.rb +17 -15
  19. data/lib/metaschema/define_flag_constraints_type.rb +17 -15
  20. data/lib/metaschema/example_type.rb +11 -9
  21. data/lib/metaschema/expect_constraint_type.rb +17 -15
  22. data/lib/metaschema/field.rb +18 -16
  23. data/lib/metaschema/field_reference_type.rb +26 -24
  24. data/lib/metaschema/flag.rb +18 -16
  25. data/lib/metaschema/flag_reference_type.rb +20 -18
  26. data/lib/metaschema/global_assembly_definition_type.rb +33 -31
  27. data/lib/metaschema/global_field_definition_type.rb +37 -33
  28. data/lib/metaschema/global_flag_definition_type.rb +26 -24
  29. data/lib/metaschema/group_as_type.rb +10 -8
  30. data/lib/metaschema/grouped_assembly_reference_type.rb +17 -15
  31. data/lib/metaschema/grouped_choice_type.rb +23 -21
  32. data/lib/metaschema/grouped_field_reference_type.rb +17 -15
  33. data/lib/metaschema/grouped_inline_assembly_definition_type.rb +28 -26
  34. data/lib/metaschema/grouped_inline_field_definition_type.rb +35 -33
  35. data/lib/metaschema/image_type.rb +8 -6
  36. data/lib/metaschema/import.rb +6 -4
  37. data/lib/metaschema/index_has_key_constraint_type.rb +18 -16
  38. data/lib/metaschema/inline_assembly_definition_type.rb +35 -33
  39. data/lib/metaschema/inline_field_definition_type.rb +41 -39
  40. data/lib/metaschema/inline_flag_definition_type.rb +24 -22
  41. data/lib/metaschema/inline_markup_type.rb +19 -17
  42. data/lib/metaschema/insert_type.rb +7 -5
  43. data/lib/metaschema/json_key_type.rb +6 -4
  44. data/lib/metaschema/json_value_key_flag_type.rb +6 -4
  45. data/lib/metaschema/key_field.rb +9 -7
  46. data/lib/metaschema/list_item_type.rb +36 -34
  47. data/lib/metaschema/list_type.rb +7 -5
  48. data/lib/metaschema/markup_line_datatype.rb +22 -20
  49. data/lib/metaschema/matches_constraint_type.rb +17 -15
  50. data/lib/metaschema/metaschema_import_type.rb +6 -4
  51. data/lib/metaschema/metaschemaconstraints.rb +15 -13
  52. data/lib/metaschema/namespace_binding_type.rb +7 -5
  53. data/lib/metaschema/ordered_list_type.rb +7 -5
  54. data/lib/metaschema/preformatted_type.rb +22 -20
  55. data/lib/metaschema/property_type.rb +9 -7
  56. data/lib/metaschema/remarks_type.rb +28 -26
  57. data/lib/metaschema/root.rb +27 -25
  58. data/lib/metaschema/root_name.rb +6 -4
  59. data/lib/metaschema/scope.rb +13 -11
  60. data/lib/metaschema/table_cell_type.rb +24 -22
  61. data/lib/metaschema/table_row_type.rb +8 -6
  62. data/lib/metaschema/table_type.rb +7 -5
  63. data/lib/metaschema/targeted_allowed_values_constraint_type.rb +22 -20
  64. data/lib/metaschema/targeted_expect_constraint_type.rb +18 -16
  65. data/lib/metaschema/targeted_has_cardinality_constraint_type.rb +18 -16
  66. data/lib/metaschema/targeted_index_constraint_type.rb +19 -17
  67. data/lib/metaschema/targeted_index_has_key_constraint_type.rb +19 -17
  68. data/lib/metaschema/targeted_key_constraint_type.rb +18 -16
  69. data/lib/metaschema/targeted_matches_constraint_type.rb +18 -16
  70. data/lib/metaschema/use_name_type.rb +6 -4
  71. data/lib/metaschema/version.rb +1 -1
  72. data/lib/metaschema.rb +4 -4
  73. metadata +8 -6
@@ -1,14 +1,16 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "key_field"
4
- require_relative "markup_line_datatype"
5
- require_relative "property_type"
6
- require_relative "remarks_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'key_field'
6
+ require_relative 'markup_line_datatype'
7
+ require_relative 'property_type'
8
+ require_relative 'remarks_type'
7
9
 
8
10
  module Metaschema
9
11
  class TargetedIndexHasKeyConstraintType < Lutaml::Model::Serializable
10
12
  attribute :id, :string
11
- attribute :level, :string, default: -> { "ERROR" }
13
+ attribute :level, :string, default: -> { 'ERROR' }
12
14
  attribute :name, :string
13
15
  attribute :target, :string
14
16
  attribute :formal_name, :string
@@ -18,18 +20,18 @@ module Metaschema
18
20
  attribute :remarks, RemarksType
19
21
 
20
22
  xml do
21
- root "TargetedIndexHasKeyConstraintType"
22
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
23
+ root 'TargetedIndexHasKeyConstraintType'
24
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
23
25
 
24
- map_attribute "id", to: :id
25
- map_attribute "level", to: :level
26
- map_attribute "name", to: :name
27
- map_attribute "target", to: :target
28
- map_element "formal-name", to: :formal_name
29
- map_element "description", to: :description
30
- map_element "prop", to: :prop
31
- map_element "key-field", to: :key_field
32
- map_element "remarks", to: :remarks
26
+ map_attribute 'id', to: :id
27
+ map_attribute 'level', to: :level
28
+ map_attribute 'name', to: :name
29
+ map_attribute 'target', to: :target
30
+ map_element 'formal-name', to: :formal_name
31
+ map_element 'description', to: :description
32
+ map_element 'prop', to: :prop
33
+ map_element 'key-field', to: :key_field
34
+ map_element 'remarks', to: :remarks
33
35
  end
34
36
  end
35
37
  end
@@ -1,14 +1,16 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "key_field"
4
- require_relative "markup_line_datatype"
5
- require_relative "property_type"
6
- require_relative "remarks_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'key_field'
6
+ require_relative 'markup_line_datatype'
7
+ require_relative 'property_type'
8
+ require_relative 'remarks_type'
7
9
 
8
10
  module Metaschema
9
11
  class TargetedKeyConstraintType < Lutaml::Model::Serializable
10
12
  attribute :id, :string
11
- attribute :level, :string, default: -> { "ERROR" }
13
+ attribute :level, :string, default: -> { 'ERROR' }
12
14
  attribute :target, :string
13
15
  attribute :formal_name, :string
14
16
  attribute :description, MarkupLineDatatype
@@ -17,17 +19,17 @@ module Metaschema
17
19
  attribute :remarks, RemarksType
18
20
 
19
21
  xml do
20
- root "TargetedKeyConstraintType"
21
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
22
+ root 'TargetedKeyConstraintType'
23
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
22
24
 
23
- map_attribute "id", to: :id
24
- map_attribute "level", to: :level
25
- map_attribute "target", to: :target
26
- map_element "formal-name", to: :formal_name
27
- map_element "description", to: :description
28
- map_element "prop", to: :prop
29
- map_element "key-field", to: :key_field
30
- map_element "remarks", to: :remarks
25
+ map_attribute 'id', to: :id
26
+ map_attribute 'level', to: :level
27
+ map_attribute 'target', to: :target
28
+ map_element 'formal-name', to: :formal_name
29
+ map_element 'description', to: :description
30
+ map_element 'prop', to: :prop
31
+ map_element 'key-field', to: :key_field
32
+ map_element 'remarks', to: :remarks
31
33
  end
32
34
  end
33
35
  end
@@ -1,13 +1,15 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
2
 
3
- require_relative "markup_line_datatype"
4
- require_relative "property_type"
5
- require_relative "remarks_type"
3
+ require 'lutaml/model'
4
+
5
+ require_relative 'markup_line_datatype'
6
+ require_relative 'property_type'
7
+ require_relative 'remarks_type'
6
8
 
7
9
  module Metaschema
8
10
  class TargetedMatchesConstraintType < Lutaml::Model::Serializable
9
11
  attribute :id, :string
10
- attribute :level, :string, default: -> { "ERROR" }
12
+ attribute :level, :string, default: -> { 'ERROR' }
11
13
  attribute :regex, :string
12
14
  attribute :datatype, :string
13
15
  attribute :target, :string
@@ -17,18 +19,18 @@ module Metaschema
17
19
  attribute :remarks, RemarksType
18
20
 
19
21
  xml do
20
- root "TargetedMatchesConstraintType"
21
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
22
+ root 'TargetedMatchesConstraintType'
23
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
22
24
 
23
- map_attribute "id", to: :id
24
- map_attribute "level", to: :level
25
- map_attribute "regex", to: :regex
26
- map_attribute "datatype", to: :datatype
27
- map_attribute "target", to: :target
28
- map_element "formal-name", to: :formal_name
29
- map_element "description", to: :description
30
- map_element "prop", to: :prop
31
- map_element "remarks", to: :remarks
25
+ map_attribute 'id', to: :id
26
+ map_attribute 'level', to: :level
27
+ map_attribute 'regex', to: :regex
28
+ map_attribute 'datatype', to: :datatype
29
+ map_attribute 'target', to: :target
30
+ map_element 'formal-name', to: :formal_name
31
+ map_element 'description', to: :description
32
+ map_element 'prop', to: :prop
33
+ map_element 'remarks', to: :remarks
32
34
  end
33
35
  end
34
36
  end
@@ -1,4 +1,6 @@
1
- require "lutaml/model"
1
+ # frozen_string_literal: true
2
+
3
+ require 'lutaml/model'
2
4
 
3
5
  module Metaschema
4
6
  class UseNameType < Lutaml::Model::Serializable
@@ -6,11 +8,11 @@ module Metaschema
6
8
  attribute :index, :integer
7
9
 
8
10
  xml do
9
- root "UseNameType"
10
- namespace "http://csrc.nist.gov/ns/oscal/metaschema/1.0"
11
+ root 'UseNameType'
12
+ namespace 'http://csrc.nist.gov/ns/oscal/metaschema/1.0'
11
13
 
12
14
  map_content to: :content
13
- map_attribute "index", to: :index
15
+ map_attribute 'index', to: :index
14
16
  end
15
17
  end
16
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Metaschema
4
- VERSION = "0.1.0"
4
+ VERSION = '0.1.2'
5
5
  end
data/lib/metaschema.rb CHANGED
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "lutaml/model"
3
+ require 'lutaml/model'
4
4
 
5
5
  Lutaml::Model::Config.configure do |config|
6
- require "lutaml/model/xml_adapter/nokogiri_adapter"
6
+ require 'lutaml/model/xml_adapter/nokogiri_adapter'
7
7
  config.xml_adapter = Lutaml::Model::XmlAdapter::NokogiriAdapter
8
8
  end
9
9
 
10
- require_relative "metaschema/version"
11
- require_relative "metaschema/root"
10
+ require_relative 'metaschema/version'
11
+ require_relative 'metaschema/root'
12
12
 
13
13
  module Metaschema
14
14
  class Error < StandardError; end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metaschema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-10-19 00:00:00.000000000 Z
11
+ date: 2025-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model
@@ -144,6 +144,8 @@ executables:
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
+ - ".rubocop.yml"
148
+ - ".rubocop_todo.yml"
147
149
  - README.adoc
148
150
  - Rakefile
149
151
  - exe/metaschema
@@ -221,7 +223,7 @@ metadata:
221
223
  homepage_uri: https://github.com/lutaml/metaschema
222
224
  source_code_uri: https://github.com/lutaml/metaschema
223
225
  changelog_uri: https://github.com/lutaml/metaschema/releases
224
- post_install_message:
226
+ post_install_message:
225
227
  rdoc_options: []
226
228
  require_paths:
227
229
  - lib
@@ -236,8 +238,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
236
238
  - !ruby/object:Gem::Version
237
239
  version: '0'
238
240
  requirements: []
239
- rubygems_version: 3.5.11
240
- signing_key:
241
+ rubygems_version: 3.3.27
242
+ signing_key:
241
243
  specification_version: 4
242
244
  summary: Parser and generator for NIST Metaschema
243
245
  test_files: []