xmi 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6e11e8807b6e645ac8d6a3316ad055e34214aaa747925ee134ed6b5fd3a1cae
4
- data.tar.gz: 0515d55369b0d206204e957d0cf0f835784d527fb8d658cdb06a1a43b66c2f8f
3
+ metadata.gz: 6f858b7f7899b3a77fcbfa224a4043fd0463363b131e1082c61823a486e93d86
4
+ data.tar.gz: dc48a58d7c87ba6cfff01ff7a99999a2930bde41a88aba8fc3941fbbafce2ed4
5
5
  SHA512:
6
- metadata.gz: 5aa1d6b95aecb8e28587b8072268ad3b058bb3db819ec5fd3fe9d1d05a74affe81ddd1dfe7be9314a5e275f4e21db7006a2980c1687284a437ccaaf9d3e1c62a
7
- data.tar.gz: d423ab53b4a06d9de7728a4c301d4861b218c1c512ab6745b51a2e3ecc0f18ac0335f8ee4ad157412576d28245188d69c1c87e590b47317de8207b54023a2602
6
+ metadata.gz: 79eeb960d5e1a0dac1bbade19ccafc583b4ddd39963c56bb8da9da4cf058d9b16876f671b18bd36819c7f0959717942997ca868664ce0c8e3a3b9881dbb2d5f2
7
+ data.tar.gz: 36028514c14d0da5f3d33e419845299aa89a0c97c514c936508bca8630b17b1c1411e98bf4b759a0c0015ad64ab252450e44c62f14a02a1c975f4d2b3520e898
data/lib/xmi/sparx.rb CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  module Xmi
4
4
  module Sparx
5
+ class SparxElementDocumentation < Shale::Mapper
6
+ attribute :value, Shale::Type::String
7
+
8
+ xml do
9
+ root "documentation"
10
+
11
+ map_attribute "value", to: :value
12
+ end
13
+ end
14
+
5
15
  class SparxElementModel < Shale::Mapper
6
16
  attribute :package, Shale::Type::String
7
17
  attribute :package2, Shale::Type::String
@@ -318,7 +328,7 @@ module Xmi
318
328
 
319
329
  class SparxElementAttribute < Shale::Mapper
320
330
  attribute :initial, Shale::Type::String
321
- attribute :documentation, Shale::Type::String
331
+ attribute :documentation, SparxElementDocumentation
322
332
  attribute :options, Shale::Type::String
323
333
  attribute :style, Shale::Type::String
324
334
  attribute :tags, Shale::Type::String, collection: true
@@ -336,11 +346,11 @@ module Xmi
336
346
  root "attribute"
337
347
 
338
348
  map_attribute "initial", to: :initial
339
- map_attribute "documentation", to: :documentation
340
349
  map_attribute "options", to: :options
341
350
  map_attribute "style", to: :style
342
351
  map_attribute "tags", to: :tags
343
352
 
353
+ map_element "documentation", to: :documentation
344
354
  map_element "model", to: :model
345
355
  map_element "properties", to: :properties
346
356
  map_element "coords", to: :coords
data/lib/xmi/uml.rb CHANGED
@@ -339,12 +339,13 @@ module Xmi
339
339
  end
340
340
 
341
341
  module PackagedElementAttributes
342
- def self.included(klass)
342
+ def self.included(klass) # rubocop:disable Metrics/MethodLength
343
343
  klass.class_eval do
344
344
  attribute :type, Shale::Type::String
345
345
  attribute :id, Shale::Type::String
346
346
  attribute :name, Shale::Type::String
347
- attribute :member_end, MemberEnd
347
+ attribute :member_end, Shale::Type::String
348
+ attribute :member_ends, MemberEnd, collection: true
348
349
  attribute :owned_literal, OwnedLiteral, collection: true
349
350
  attribute :owned_operation, OwnedOperation, collection: true
350
351
 
@@ -382,6 +383,7 @@ module Xmi
382
383
  map_element "ownedAttribute", to: :owned_attribute
383
384
  map_element "ownedOperation", to: :owned_operation
384
385
  map_element "packagedElement", to: :packaged_element
386
+ map_element "memberEnd", to: :member_ends
385
387
  end
386
388
  end
387
389
 
@@ -412,6 +414,7 @@ module Xmi
412
414
  map_element "ownedAttribute", to: :owned_attribute
413
415
  map_element "ownedOperation", to: :owned_operation
414
416
  map_element "packagedElement", to: :packaged_element
417
+ map_element "memberEnd", to: :member_ends
415
418
  end
416
419
  end
417
420
 
@@ -605,8 +608,8 @@ module Xmi
605
608
 
606
609
  class UmlModel < Shale::Mapper
607
610
  include UmlModelAttributes
608
- attribute :packaged_element, PackagedElement, collection: true
609
- attribute :package_import, PackageImport, collection: true
611
+ attribute :packaged_element, PackagedElement2013, collection: true
612
+ attribute :package_import, PackageImport2013, collection: true
610
613
  attribute :diagram, Diagram
611
614
 
612
615
  xml do
data/lib/xmi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Xmi
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-19 00:00:00.000000000 Z
11
+ date: 2024-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri