rixml 0.5.0 → 0.5.1
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/contact.rb +17 -0
- data/lib/rixml_document/context.rb +4 -0
- data/lib/rixml_document/country.rb +15 -0
- data/lib/rixml_document/organization.rb +31 -0
- data/lib/rixml_document/organization_id.rb +13 -0
- data/lib/rixml_document/person.rb +21 -0
- data/lib/rixml_document/person_group_member.rb +18 -0
- data/lib/rixml_document/phone.rb +21 -0
- data/lib/rixml_document/product.rb +2 -0
- data/lib/rixml_document/product_category.rb +14 -0
- data/lib/rixml_document/product_classifications.rb +15 -0
- data/lib/rixml_document/product_details.rb +17 -0
- data/lib/rixml_document/source.rb +13 -0
- data/rixml.gemspec +2 -2
- metadata +13 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1da25921dac5b181aad46028b7e4889fe1d311e7
|
4
|
+
data.tar.gz: 4775dba159ca311065893820f5ec52217ff28ccc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4381e273cb84d0e736d23d839049f7b9cd96cd26bf3fb74d1ab40bf4df31b289c4eeafa5b0038febf5e9fcf3e55309cdaa39c7b3572f15dd317a2a5e5e5dff62
|
7
|
+
data.tar.gz: c76604c75f55c8ff5c6a3fb6590c1587d6cf337729221e2e1b66a3e508ab3982f845577dd2172deb6163ef1dc076a75b6e7c2857c2293c8b24ae77dc7edb6f7f
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './phone'
|
5
|
+
require_relative './rixml_type/normalized_string'
|
6
|
+
|
7
|
+
module RixmlDocument
|
8
|
+
class Contact < Node
|
9
|
+
include HappyMapper
|
10
|
+
tag 'ContactInfo'
|
11
|
+
|
12
|
+
attribute :nature, RixmlType::NormalizedString, tag: 'nature'
|
13
|
+
|
14
|
+
has_many :emails, String, tag: 'Email'
|
15
|
+
has_many :phones, Phone, tag: 'Phone'
|
16
|
+
end
|
17
|
+
end
|
@@ -2,6 +2,8 @@
|
|
2
2
|
require 'happymapper'
|
3
3
|
require_relative './node'
|
4
4
|
require_relative './issuer'
|
5
|
+
require_relative './product_details'
|
6
|
+
require_relative './product_classifications'
|
5
7
|
require_relative './rixml_type/yes_no_boolean'
|
6
8
|
|
7
9
|
module RixmlDocument
|
@@ -16,6 +18,8 @@ module RixmlDocument
|
|
16
18
|
tag 'Context'
|
17
19
|
|
18
20
|
has_one :issuer_details, IssuerDetails, xpath: './'
|
21
|
+
has_one :product_details, ProductDetails, xpath: './'
|
22
|
+
has_one :product_classifications, ProductClassifications, xpath: './'
|
19
23
|
|
20
24
|
attribute :external, RixmlType::YesNoBoolean
|
21
25
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './rixml_type/upcase_string'
|
5
|
+
require_relative './rixml_type/yes_no_boolean'
|
6
|
+
|
7
|
+
module RixmlDocument
|
8
|
+
class Country < Node
|
9
|
+
include HappyMapper
|
10
|
+
tag 'Country'
|
11
|
+
|
12
|
+
attribute :primary_indicator, RixmlType::YesNoBoolean, tag: 'primaryIndicator'
|
13
|
+
attribute :code, RixmlType::UpcaseString, tag: 'code'
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './organization_id'
|
5
|
+
require_relative './person_group_member'
|
6
|
+
require_relative './rixml_type/yes_no_boolean'
|
7
|
+
|
8
|
+
module RixmlDocument
|
9
|
+
class PersonGroup < Node
|
10
|
+
include HappyMapper
|
11
|
+
tag 'PersonGroup'
|
12
|
+
has_many :person_group_members, PersonGroupMember, tag: 'PersonGroupMember', xpath: './'
|
13
|
+
|
14
|
+
def persons
|
15
|
+
person_group_members.map(&:person)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class Organization < Node
|
20
|
+
include HappyMapper
|
21
|
+
tag 'Organization'
|
22
|
+
|
23
|
+
has_many :organization_ids, OrganizationId, tag: 'OrganizationID', xpath: './'
|
24
|
+
has_many :person_groups, PersonGroup, tag: 'PersonGroup', xpath: './'
|
25
|
+
|
26
|
+
attribute :primary_indicator, RixmlType::YesNoBoolean, tag: 'primaryIndicator'
|
27
|
+
attribute :type, String, tag: 'type'
|
28
|
+
|
29
|
+
element :organization_name, String, tag: 'OrganizationName'
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,13 @@
|
|
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 OrganizationId < Node
|
8
|
+
include HappyMapper
|
9
|
+
tag 'OrganizationId'
|
10
|
+
|
11
|
+
attribute :id_type, RixmlType::NormalizedString, tag: 'idType'
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './contact'
|
5
|
+
|
6
|
+
module RixmlDocument
|
7
|
+
class Person < Node
|
8
|
+
include HappyMapper
|
9
|
+
tag 'Person'
|
10
|
+
|
11
|
+
has_many :contacts, Contact, tag: 'ContactInfo', xpath: './'
|
12
|
+
|
13
|
+
attribute :person_id, String, tag: 'personID'
|
14
|
+
|
15
|
+
element :family_name, String, tag: 'FamilyName'
|
16
|
+
element :given_name, String, tag: 'GivenName'
|
17
|
+
element :middle_name, String, tag: 'MiddleName'
|
18
|
+
element :display_name, String, tag: 'DisplayName'
|
19
|
+
element :job_title, String, tag: 'JobTitle'
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './person'
|
5
|
+
require_relative './rixml_type/normalized_string'
|
6
|
+
require_relative './rixml_type/yes_no_boolean'
|
7
|
+
|
8
|
+
module RixmlDocument
|
9
|
+
class PersonGroupMember < Node
|
10
|
+
include HappyMapper
|
11
|
+
tag 'PersonGroupMember'
|
12
|
+
|
13
|
+
has_one :person, Person, tag: 'Person', xpath: './'
|
14
|
+
|
15
|
+
attribute :role, RixmlType::NormalizedString, tag: 'role'
|
16
|
+
attribute :primary_indicator, RixmlType::YesNoBoolean, tag: 'primaryIndicator'
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,21 @@
|
|
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 Phone < Node
|
8
|
+
include HappyMapper
|
9
|
+
tag 'Phone'
|
10
|
+
|
11
|
+
attribute :type, RixmlType::NormalizedString, tag: 'type'
|
12
|
+
attribute :location, RixmlType::NormalizedString, tag: 'location'
|
13
|
+
|
14
|
+
element :country_code, String, tag: 'CountryCode'
|
15
|
+
element :number, String, tag: 'Number'
|
16
|
+
|
17
|
+
def phone_number
|
18
|
+
[country_code, number].join(' ')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require 'happymapper'
|
3
3
|
require_relative './node'
|
4
|
+
require_relative './source'
|
4
5
|
require_relative './context'
|
5
6
|
require_relative './rixml_type/yes_no_boolean'
|
6
7
|
|
@@ -9,6 +10,7 @@ module RixmlDocument
|
|
9
10
|
include HappyMapper
|
10
11
|
tag 'Product'
|
11
12
|
|
13
|
+
has_one :source, Source, tag: 'Source', xpath: './'
|
12
14
|
has_one :context, Context, tag: 'Context', xpath: './'
|
13
15
|
|
14
16
|
attribute :product_id, String, tag: 'productID'
|
@@ -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 ProductCategory < Node
|
8
|
+
include HappyMapper
|
9
|
+
tag 'ProductCategory'
|
10
|
+
|
11
|
+
attribute :product_category, RixmlType::NormalizedString, tag: 'productCategory'
|
12
|
+
attribute :publisher_defined_value, String, tag: 'publisherDefinedValue'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './asset_class'
|
5
|
+
require_relative './country'
|
6
|
+
|
7
|
+
module RixmlDocument
|
8
|
+
class ProductClassifications < Node
|
9
|
+
include HappyMapper
|
10
|
+
tag 'ProductClassifications'
|
11
|
+
|
12
|
+
has_many :asset_classes, AssetClass, tag: 'AssetClass', xpath: './'
|
13
|
+
has_many :countries, Country, tag: 'Country', xpath: './'
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './product_category'
|
5
|
+
require_relative './rixml_type/yes_no_boolean'
|
6
|
+
|
7
|
+
module RixmlDocument
|
8
|
+
class ProductDetails < Node
|
9
|
+
include HappyMapper
|
10
|
+
tag 'ProductDetails'
|
11
|
+
|
12
|
+
has_one :product_category, ProductCategory, xpath: './'
|
13
|
+
|
14
|
+
attribute :publication_date_time, Time, tag: 'publicationDateTime'
|
15
|
+
attribute :periodical_indicator, RixmlType::YesNoBoolean, tag: 'periodicalIndicator'
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'happymapper'
|
3
|
+
require_relative './node'
|
4
|
+
require_relative './organization'
|
5
|
+
|
6
|
+
module RixmlDocument
|
7
|
+
class Source < Node
|
8
|
+
include HappyMapper
|
9
|
+
tag 'Source'
|
10
|
+
|
11
|
+
has_many :organizations, Organization, tag: 'Organization', xpath: './'
|
12
|
+
end
|
13
|
+
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.1'
|
5
|
+
s.date = '2017-10-10'
|
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.1
|
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-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -156,10 +156,20 @@ files:
|
|
156
156
|
- lib/rixml.rb
|
157
157
|
- lib/rixml_document.rb
|
158
158
|
- lib/rixml_document/asset_class.rb
|
159
|
+
- lib/rixml_document/contact.rb
|
159
160
|
- lib/rixml_document/context.rb
|
161
|
+
- lib/rixml_document/country.rb
|
160
162
|
- lib/rixml_document/issuer.rb
|
161
163
|
- lib/rixml_document/node.rb
|
164
|
+
- lib/rixml_document/organization.rb
|
165
|
+
- lib/rixml_document/organization_id.rb
|
166
|
+
- lib/rixml_document/person.rb
|
167
|
+
- lib/rixml_document/person_group_member.rb
|
168
|
+
- lib/rixml_document/phone.rb
|
162
169
|
- lib/rixml_document/product.rb
|
170
|
+
- lib/rixml_document/product_category.rb
|
171
|
+
- lib/rixml_document/product_classifications.rb
|
172
|
+
- lib/rixml_document/product_details.rb
|
163
173
|
- lib/rixml_document/research.rb
|
164
174
|
- lib/rixml_document/rixml_type/normalized_string.rb
|
165
175
|
- lib/rixml_document/rixml_type/upcase_string.rb
|
@@ -167,6 +177,7 @@ files:
|
|
167
177
|
- lib/rixml_document/security.rb
|
168
178
|
- lib/rixml_document/security_id.rb
|
169
179
|
- lib/rixml_document/security_type.rb
|
180
|
+
- lib/rixml_document/source.rb
|
170
181
|
- release
|
171
182
|
- rixml.gemspec
|
172
183
|
homepage: https://github.com/AlphaExchange/rixml
|