rixml 0.1.6 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rixml.rb +15 -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: 173c53a63dbe208ba40d0aea8d017416643d892e
|
4
|
+
data.tar.gz: 905a3e72ccad1943b4dcec6e84efc52f150ea14c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4cd188218ce2b5b0074380753a9a1aa2c57644b7b7cb405fa75ee98c07d1f0292bf1fee6fdd70f227de2d0d452d64ec640a31121b82f1f480c5ae8442db4c51
|
7
|
+
data.tar.gz: 8ab90c7f102575baf7afbb5b7f6c471297d8eeb392f3b9bf2080fa8098836748dfa5fdc4e3d649de15beb76b5d20bc90026903782532bbe14b53b2cbf4816741
|
data/lib/rixml.rb
CHANGED
@@ -21,10 +21,25 @@ class RIXML
|
|
21
21
|
@attrs.dig('Research', 'Product', 'productID')
|
22
22
|
end
|
23
23
|
|
24
|
+
def research_id
|
25
|
+
@attrs.dig('Research', 'researchID')
|
26
|
+
end
|
27
|
+
|
28
|
+
# @deprecated Please use {#status_info} instead
|
24
29
|
def status
|
25
30
|
current_status_info&.dig('statusType')&.downcase&.to_sym || :published
|
26
31
|
end
|
27
32
|
|
33
|
+
def status_info
|
34
|
+
time_str = current_status_info&.dig('statusDateTime') || DateTime.now.to_s
|
35
|
+
status = current_status_info&.dig('statusType')&.downcase&.to_sym || :published
|
36
|
+
{
|
37
|
+
status: status,
|
38
|
+
date: Time.parse(time_str).to_datetime.to_s
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# @deprecated Please use {#status_info} instead
|
28
43
|
def publication_date
|
29
44
|
time_str = current_status_info&.dig('statusDateTime') || DateTime.now.to_s
|
30
45
|
Time.parse(time_str).to_datetime.to_s
|
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-
|
4
|
+
s.version = '0.2.0'
|
5
|
+
s.date = '2017-04-28'
|
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.2.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-
|
12
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|