rixml 0.3.0 → 0.4.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/lib/rixml.rb +10 -0
- data/rixml.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37efd679cd29fc043be532a0312daf8e5f66f3b0
|
4
|
+
data.tar.gz: 0f2fbddfcd372e3a99dc0e751f71543c450abe65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27dc6ff446ea35ee81604d1f63205cd73edc31d9c8512411214dd93404f7764875bb698ae3e81b866b461d68c0e519b22a011adf163f8da984621f4438c6145a
|
7
|
+
data.tar.gz: 526d3f67ce9866a749e69343dedd6a848f39bddc19b65c1e084907aae7c76a285376b3978c8e089a6c427099a58f73dee0b42bb94a339f9c2f2386ce108079c3
|
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rixml (0.
|
4
|
+
rixml (0.4.0)
|
5
5
|
activesupport (>= 4.0.0)
|
6
6
|
nokogiri (~> 1.5)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activesupport (5.
|
11
|
+
activesupport (5.1.2)
|
12
12
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
13
|
i18n (~> 0.7)
|
14
14
|
minitest (~> 5.1)
|
@@ -16,11 +16,11 @@ GEM
|
|
16
16
|
ast (2.3.0)
|
17
17
|
byebug (9.0.6)
|
18
18
|
concurrent-ruby (1.0.5)
|
19
|
-
i18n (0.8.
|
20
|
-
mini_portile2 (2.
|
19
|
+
i18n (0.8.6)
|
20
|
+
mini_portile2 (2.2.0)
|
21
21
|
minitest (5.10.1)
|
22
|
-
nokogiri (1.
|
23
|
-
mini_portile2 (~> 2.
|
22
|
+
nokogiri (1.8.0)
|
23
|
+
mini_portile2 (~> 2.2.0)
|
24
24
|
parser (2.4.0.0)
|
25
25
|
ast (~> 2.2)
|
26
26
|
powerpack (0.1.1)
|
@@ -51,4 +51,4 @@ DEPENDENCIES
|
|
51
51
|
rubocop (~> 0.45.0)
|
52
52
|
|
53
53
|
BUNDLED WITH
|
54
|
-
1.
|
54
|
+
1.15.3
|
data/lib/rixml.rb
CHANGED
@@ -4,6 +4,7 @@ require 'date'
|
|
4
4
|
require 'active_support/core_ext/hash/conversions'
|
5
5
|
require 'active_support/inflector/inflections'
|
6
6
|
|
7
|
+
# rubocop:disable Metrics/ClassLength
|
7
8
|
class RIXML
|
8
9
|
class << self
|
9
10
|
def parse_from_file(filename)
|
@@ -67,6 +68,15 @@ class RIXML
|
|
67
68
|
}
|
68
69
|
end
|
69
70
|
|
71
|
+
def asset_classes
|
72
|
+
assets = @attrs.dig('Research', 'Product', 'Source', 'Organization', 'Expertise', 'AssetClasses', 'AssetClass')
|
73
|
+
assets = [assets] unless assets.is_a?(Array)
|
74
|
+
|
75
|
+
assets.collect do |asset|
|
76
|
+
asset&.dig('assetClass')
|
77
|
+
end.compact
|
78
|
+
end
|
79
|
+
|
70
80
|
def context
|
71
81
|
context = @attrs.dig('Research', 'Product', 'Context') || {}
|
72
82
|
{
|
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
|
-
s.date = '2017-07
|
4
|
+
s.version = '0.4.0'
|
5
|
+
s.date = '2017-08-07'
|
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.
|
4
|
+
version: 0.4.0
|
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-07
|
12
|
+
date: 2017-08-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|