rixml 0.1.3 → 0.1.5
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 +4 -4
- data/lib/rixml.rb +8 -2
- 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: 359ba658516e9dea4907922d9d6f5298e79248e3
|
|
4
|
+
data.tar.gz: 2a93a37ef8d500378b307c85f10368b940d6c1c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7b3bd756e49d433df80f667d42e7cab07be1e712ca19c36381def79a6639a1cdf7ed78a248b202740e3d0c10c554f1da29113743094e29b97522c453b044637
|
|
7
|
+
data.tar.gz: e9bd78e4f11f083c6a5c07f86ec46fcbefc235ec5433e6e081751d65551eee2cd78139614d698986276c6a011d3770d140a23fa3862ebf13bc100ec3e655061f
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rixml (0.1.
|
|
4
|
+
rixml (0.1.4)
|
|
5
5
|
activesupport (>= 4.0.0)
|
|
6
6
|
nokogiri (~> 1.5)
|
|
7
7
|
|
|
@@ -15,11 +15,11 @@ GEM
|
|
|
15
15
|
tzinfo (~> 1.1)
|
|
16
16
|
ast (2.3.0)
|
|
17
17
|
byebug (9.0.6)
|
|
18
|
-
concurrent-ruby (1.0.
|
|
19
|
-
i18n (0.
|
|
18
|
+
concurrent-ruby (1.0.4)
|
|
19
|
+
i18n (0.8.0)
|
|
20
20
|
mini_portile2 (2.1.0)
|
|
21
21
|
minitest (5.9.1)
|
|
22
|
-
nokogiri (1.
|
|
22
|
+
nokogiri (1.7.0.1)
|
|
23
23
|
mini_portile2 (~> 2.1.0)
|
|
24
24
|
parser (2.3.1.4)
|
|
25
25
|
ast (~> 2.2)
|
data/lib/rixml.rb
CHANGED
|
@@ -22,11 +22,11 @@ class RIXML
|
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
def status
|
|
25
|
-
|
|
25
|
+
current_status_info&.dig('statusType')&.downcase&.to_sym || :published
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
def publication_date
|
|
29
|
-
time_str =
|
|
29
|
+
time_str = current_status_info&.dig('statusDateTime') || DateTime.now.to_s
|
|
30
30
|
DateTime.strptime(time_str)
|
|
31
31
|
end
|
|
32
32
|
|
|
@@ -67,6 +67,12 @@ class RIXML
|
|
|
67
67
|
|
|
68
68
|
private
|
|
69
69
|
|
|
70
|
+
def current_status_info
|
|
71
|
+
info = @attrs.dig('Research', 'Product', 'StatusInfo')
|
|
72
|
+
info = [info] unless info.is_a? Array
|
|
73
|
+
info.find { |status| status&.dig('currentStatusIndicator')&.downcase == 'yes' } || info.first
|
|
74
|
+
end
|
|
75
|
+
|
|
70
76
|
def parse_info_from_author(author)
|
|
71
77
|
person = author&.dig('Person')
|
|
72
78
|
{
|
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.1.
|
|
5
|
-
s.date = '
|
|
4
|
+
s.version = '0.1.5'
|
|
5
|
+
s.date = '2017-02-24'
|
|
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.1.
|
|
4
|
+
version: 0.1.5
|
|
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:
|
|
12
|
+
date: 2017-02-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|