rixml 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37efd679cd29fc043be532a0312daf8e5f66f3b0
4
- data.tar.gz: 0f2fbddfcd372e3a99dc0e751f71543c450abe65
3
+ metadata.gz: 01b0a98a0c93dab7c2eaa47432c98bb160a44896
4
+ data.tar.gz: 903854559b3987f6cbb58b44053a382ca229eb8f
5
5
  SHA512:
6
- metadata.gz: 27dc6ff446ea35ee81604d1f63205cd73edc31d9c8512411214dd93404f7764875bb698ae3e81b866b461d68c0e519b22a011adf163f8da984621f4438c6145a
7
- data.tar.gz: 526d3f67ce9866a749e69343dedd6a848f39bddc19b65c1e084907aae7c76a285376b3978c8e089a6c427099a58f73dee0b42bb94a339f9c2f2386ce108079c3
6
+ metadata.gz: b32f2955e47addc1aaf62110acd15ce8a774a7664777e180d894d39b1f5d360d12a6e6b5df2af6a032fb408a35829a860dd89f255c9ba35e6025bed33c3be7e3
7
+ data.tar.gz: 539d89ac5cba5e50b2f5322059e3cdc3ae2285ac93124b4c91955e17112d8aa6ea7a6b2e763c5e4c0e4d06a0b7995fcc770d70783422eb05d6bb96d09b19d655
data/.gitignore CHANGED
@@ -1,3 +1,3 @@
1
1
  .byebug_history
2
2
  *.gem
3
-
3
+ *.bak
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rixml (0.4.0)
4
+ rixml (0.0.0)
5
5
  activesupport (>= 4.0.0)
6
6
  nokogiri (~> 1.5)
7
7
 
data/circle.yml ADDED
@@ -0,0 +1,8 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.3.3
4
+ test:
5
+ override:
6
+ - bundle exec rake
7
+ post:
8
+ - bundle exec rubocop
data/lib/rixml.rb CHANGED
@@ -64,7 +64,7 @@ class RIXML
64
64
  abstract: content['Abstract'],
65
65
  synopsis: content['Synopsis'],
66
66
  file_name: content['Resource']&.dig('Name'),
67
- pages: content['Resource']&.dig('Length').to_i
67
+ length: resource_length(content['Resource'])
68
68
  }
69
69
  end
70
70
 
@@ -98,6 +98,11 @@ class RIXML
98
98
  info.find { |status| status&.dig('currentStatusIndicator')&.downcase == 'yes' } || info.first
99
99
  end
100
100
 
101
+ def resource_length(resource)
102
+ length = resource&.dig('Length')
103
+ return length.to_i if length.respond_to?(:to_i)
104
+ end
105
+
101
106
  def parse_info_from_author(author)
102
107
  person = author&.dig('Person')
103
108
  {
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.4.0'
5
- s.date = '2017-08-07'
4
+ s.version = '0.4.1'
5
+ s.date = '2017-08-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.4.0
4
+ version: 0.4.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-08-07 00:00:00.000000000 Z
12
+ date: 2017-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -119,11 +119,11 @@ extra_rdoc_files: []
119
119
  files:
120
120
  - ".gitignore"
121
121
  - ".rubocop.yml"
122
- - ".travis.yml"
123
122
  - Gemfile
124
123
  - Gemfile.lock
125
124
  - README.md
126
125
  - Rakefile
126
+ - circle.yml
127
127
  - lib/rixml.rb
128
128
  - rixml.gemspec
129
129
  homepage: https://github.com/AlphaExchange/rixml
data/.travis.yml DELETED
@@ -1,8 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.3.1
5
- before_install: gem install bundler
6
- script:
7
- - bundle exec rake
8
- - bundle exec rubocop