rixml 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rixml_document/content.rb +18 -0
- data/lib/rixml_document/length.rb +14 -0
- data/lib/rixml_document/price.rb +14 -0
- data/lib/rixml_document/product.rb +4 -0
- data/lib/rixml_document/resource.rb +25 -0
- data/lib/rixml_document/status_info.rb +16 -0
- data/rixml.gemspec +2 -2
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c712e2ad6891b208926563f1eb08d300b75e1b2c
|
4
|
+
data.tar.gz: 8956d458ce9b8aadb086e8382429870594f92c0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 378f5dc566186f98d958211d2ad976d9c3a0caa7dc431d2c3b742b2685653ecf4e97d057165c33429c672c1467637e712cec7ed74d31a81ef042f2cbd936e2df
|
7
|
+
data.tar.gz: 3860a2b24951a048432d5bd4435358552082cd60abf026f49c7ea524dfe6933b2823ea0e88ad7780663643a98a6958b39f11f83a310d1538e62d3562347c31ac
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './resource'
|
5
|
+
|
6
|
+
module RixmlDocument
|
7
|
+
class Content < Node
|
8
|
+
include HappyMapper
|
9
|
+
tag 'Content'
|
10
|
+
|
11
|
+
has_many :resources, Resource, tag: 'Resource', xpath: './'
|
12
|
+
|
13
|
+
element :title, String, tag: 'Title'
|
14
|
+
element :sub_title, String, tag: 'SubTitle'
|
15
|
+
element :abstract, String, tag: 'Abstract'
|
16
|
+
element :synopsis, String, tag: 'Synopsis'
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './rixml_type/normalized_string'
|
5
|
+
|
6
|
+
module RixmlDocument
|
7
|
+
class Length < Node
|
8
|
+
include HappyMapper
|
9
|
+
tag 'Length'
|
10
|
+
|
11
|
+
attribute :length_unit, RixmlType::NormalizedString, tag: 'lengthUnit'
|
12
|
+
content :value, String
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './rixml_type/upcase_string'
|
5
|
+
|
6
|
+
module RixmlDocument
|
7
|
+
class Price < Node
|
8
|
+
include HappyMapper
|
9
|
+
tag 'Price'
|
10
|
+
|
11
|
+
attribute :currency, RixmlType::UpcaseString, tag: 'currency'
|
12
|
+
content :value, Float
|
13
|
+
end
|
14
|
+
end
|
@@ -3,6 +3,8 @@ require 'happymapper'
|
|
3
3
|
require_relative './node'
|
4
4
|
require_relative './source'
|
5
5
|
require_relative './context'
|
6
|
+
require_relative './content'
|
7
|
+
require_relative './status_info'
|
6
8
|
require_relative './rixml_type/yes_no_boolean'
|
7
9
|
|
8
10
|
module RixmlDocument
|
@@ -10,8 +12,10 @@ module RixmlDocument
|
|
10
12
|
include HappyMapper
|
11
13
|
tag 'Product'
|
12
14
|
|
15
|
+
has_many :status_infos, StatusInfo, tag: 'StatusInfo', xpath: './'
|
13
16
|
has_one :source, Source, tag: 'Source', xpath: './'
|
14
17
|
has_one :context, Context, tag: 'Context', xpath: './'
|
18
|
+
has_one :content, Content, tag: 'Content', xpath: './'
|
15
19
|
|
16
20
|
attribute :product_id, String, tag: 'productID'
|
17
21
|
attribute :event_indicator, RixmlType::YesNoBoolean, tag: 'eventIndicator'
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './length'
|
5
|
+
require_relative './price'
|
6
|
+
require_relative './rixml_type/normalized_string'
|
7
|
+
require_relative './rixml_type/yes_no_boolean'
|
8
|
+
|
9
|
+
module RixmlDocument
|
10
|
+
class Resource < Node
|
11
|
+
include HappyMapper
|
12
|
+
tag 'Resource'
|
13
|
+
|
14
|
+
has_one :length, Length, tag: 'Length', xpath: './'
|
15
|
+
has_one :price, Price, tag: 'Price', xpath: './'
|
16
|
+
|
17
|
+
attribute :resource_id, RixmlType::NormalizedString, tag: 'resourceID'
|
18
|
+
attribute :language, RixmlType::NormalizedString, tag: 'language'
|
19
|
+
attribute :primary_indicator, RixmlType::YesNoBoolean, tag: 'primaryIndicator'
|
20
|
+
attribute :size_in_bytes, Integer, tag: 'sizeInBytes'
|
21
|
+
|
22
|
+
element :mime_type, String, tag: 'MIMEType'
|
23
|
+
element :name, String, tag: 'Name'
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './rixml_type/normalized_string'
|
5
|
+
require_relative './rixml_type/yes_no_boolean'
|
6
|
+
|
7
|
+
module RixmlDocument
|
8
|
+
class StatusInfo < Node
|
9
|
+
include HappyMapper
|
10
|
+
tag 'StatusInfo'
|
11
|
+
|
12
|
+
attribute :status_type, RixmlType::NormalizedString, tag: 'statusType'
|
13
|
+
attribute :status_date_time, Time, tag: 'statusDateTime'
|
14
|
+
attribute :current_status_indicator, RixmlType::YesNoBoolean, tag: 'currentStatusIndicator'
|
15
|
+
end
|
16
|
+
end
|
data/rixml.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.name = 'rixml'
|
4
|
-
s.version = '0.5.
|
5
|
-
s.date = '2017-10-
|
4
|
+
s.version = '0.5.2'
|
5
|
+
s.date = '2017-10-17'
|
6
6
|
s.summary = 'RIXML Parser'
|
7
7
|
s.description = 'Parse RIXML files'
|
8
8
|
s.homepage = 'https://github.com/AlphaExchange/rixml'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rixml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Correia Santos
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-10-
|
12
|
+
date: 2017-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -157,20 +157,24 @@ files:
|
|
157
157
|
- lib/rixml_document.rb
|
158
158
|
- lib/rixml_document/asset_class.rb
|
159
159
|
- lib/rixml_document/contact.rb
|
160
|
+
- lib/rixml_document/content.rb
|
160
161
|
- lib/rixml_document/context.rb
|
161
162
|
- lib/rixml_document/country.rb
|
162
163
|
- lib/rixml_document/issuer.rb
|
164
|
+
- lib/rixml_document/length.rb
|
163
165
|
- lib/rixml_document/node.rb
|
164
166
|
- lib/rixml_document/organization.rb
|
165
167
|
- lib/rixml_document/organization_id.rb
|
166
168
|
- lib/rixml_document/person.rb
|
167
169
|
- lib/rixml_document/person_group_member.rb
|
168
170
|
- lib/rixml_document/phone.rb
|
171
|
+
- lib/rixml_document/price.rb
|
169
172
|
- lib/rixml_document/product.rb
|
170
173
|
- lib/rixml_document/product_category.rb
|
171
174
|
- lib/rixml_document/product_classifications.rb
|
172
175
|
- lib/rixml_document/product_details.rb
|
173
176
|
- lib/rixml_document/research.rb
|
177
|
+
- lib/rixml_document/resource.rb
|
174
178
|
- lib/rixml_document/rixml_type/normalized_string.rb
|
175
179
|
- lib/rixml_document/rixml_type/upcase_string.rb
|
176
180
|
- lib/rixml_document/rixml_type/yes_no_boolean.rb
|
@@ -178,6 +182,7 @@ files:
|
|
178
182
|
- lib/rixml_document/security_id.rb
|
179
183
|
- lib/rixml_document/security_type.rb
|
180
184
|
- lib/rixml_document/source.rb
|
185
|
+
- lib/rixml_document/status_info.rb
|
181
186
|
- release
|
182
187
|
- rixml.gemspec
|
183
188
|
homepage: https://github.com/AlphaExchange/rixml
|