xmi 0.3.0 → 0.3.2

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: 53a45c13f059167ae42d8b8265d30404499f9e5afe482559732bab5f0443f554
4
- data.tar.gz: 995899a3b5c4c8290f56169abd05c56fbbf55eec637614970d395fd81797e0be
3
+ metadata.gz: 7c6421c5801d30d51bcee311ce5adc82413b6e781afb835d7fcab87019ba1cf3
4
+ data.tar.gz: 1d2ccf2eb16855c259ad55c44969dad3733ddff52b8dd7d10fe506f68b57444b
5
5
  SHA512:
6
- metadata.gz: 6bdd6d825f3ca9d4f06a7303225a86d27fecb03c1cdd6032776e8e41f1ff03ce911415487213bc3017f788b54a34636e8301d670d0e705adb6286fc9f3c02a29
7
- data.tar.gz: 17ecdbb653318365d5a9bf628e6cddb740df87b7bbad72e11eb585166817a1dae444912455ceb41d5a9cf07bb1a1d424254e2196e016b62ef73fe0f93f854190
6
+ metadata.gz: 8cb6f1c4c42857bea082ad32a00901cfa5f6537177d06f63a1453a21a5bd65302252ea8d92437f155d7b9d3dc42dbc05e6b5632d88ca7892175c36af04ddc696
7
+ data.tar.gz: 01a168900e038d0cf0d99287a191cb53d6b3b8699b5dda8293806564f867c5a24f4402ebb7d0d03f6c6fd36e08df7bda52c83f025204090fbc132300f9b3337c
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
@@ -317,12 +327,14 @@ module Xmi
317
327
  end
318
328
 
319
329
  class SparxElementAttribute < Shale::Mapper
330
+ attribute :idref, Shale::Type::String
331
+ attribute :name, Shale::Type::String
332
+ attribute :scope, Shale::Type::String
320
333
  attribute :initial, Shale::Type::String
321
- attribute :documentation, Shale::Type::String
334
+ attribute :documentation, SparxElementDocumentation
322
335
  attribute :options, Shale::Type::String
323
336
  attribute :style, Shale::Type::String
324
337
  attribute :tags, Shale::Type::String, collection: true
325
-
326
338
  attribute :model, SparxElementModel
327
339
  attribute :properties, SparxElementProperties
328
340
  attribute :coords, SparxElementCoords
@@ -335,12 +347,15 @@ module Xmi
335
347
  xml do
336
348
  root "attribute"
337
349
 
338
- map_attribute "initial", to: :initial
339
- map_attribute "documentation", to: :documentation
340
- map_attribute "options", to: :options
341
- map_attribute "style", to: :style
342
- map_attribute "tags", to: :tags
350
+ map_attribute "idref", to: :idref, prefix: "xmi", namespace: "http://www.omg.org/spec/XMI/20131001"
351
+ map_attribute "name", to: :name
352
+ map_attribute "scope", to: :scope
343
353
 
354
+ map_element "initial", to: :initial
355
+ map_element "options", to: :options
356
+ map_element "style", to: :style
357
+ map_element "tags", to: :tags
358
+ map_element "documentation", to: :documentation
344
359
  map_element "model", to: :model
345
360
  map_element "properties", to: :properties
346
361
  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
 
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.3.0"
4
+ VERSION = "0.3.2"
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.3.0
4
+ version: 0.3.2
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-24 00:00:00.000000000 Z
11
+ date: 2024-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri