rixml 0.1.6 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rixml.rb +15 -0
  3. data/rixml.gemspec +2 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7473d394cca80f5af4c169aa24467425b45e99e3
4
- data.tar.gz: 7fa0510561d992a313278661e5e29098a0d51778
3
+ metadata.gz: 173c53a63dbe208ba40d0aea8d017416643d892e
4
+ data.tar.gz: 905a3e72ccad1943b4dcec6e84efc52f150ea14c
5
5
  SHA512:
6
- metadata.gz: 162ac779694ffbbad2bdf0917421b9dd089439f7e2a8a73f445823784aac35d6131f20f3015a6bc1b8e5ffd21d9b40ba0e20246b29a073d2816d956991897afa
7
- data.tar.gz: 9ec96e96a8f4a608eb9b19708b1ab919c1c61e3e244adbe0473dfbce041e974c8aaa9319d3bdfa55a7d1d7733f59491a6931482191fab8bbe99790def123ae83
6
+ metadata.gz: d4cd188218ce2b5b0074380753a9a1aa2c57644b7b7cb405fa75ee98c07d1f0292bf1fee6fdd70f227de2d0d452d64ec640a31121b82f1f480c5ae8442db4c51
7
+ data.tar.gz: 8ab90c7f102575baf7afbb5b7f6c471297d8eeb392f3b9bf2080fa8098836748dfa5fdc4e3d649de15beb76b5d20bc90026903782532bbe14b53b2cbf4816741
@@ -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
@@ -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.6'
5
- s.date = '2017-03-20'
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.1.6
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-03-20 00:00:00.000000000 Z
12
+ date: 2017-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler