pure_iterator 0.1.0 → 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/CHANGELOG.md +4 -0
- data/README.md +4 -0
- data/lib/pure_iterator/base.rb +6 -2
- data/lib/pure_iterator/version.rb +1 -1
- data/pure_iterator.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fe2f2e2fb6cad002a0a49106f7bac79793c91a1de46e4c098469855f4f108c6
|
4
|
+
data.tar.gz: 1700c47e1e5eed9ee8e75b75f2ddc21f9b5d5956890364015018c7fdfd687287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d31c5c1106ed20b5200b0fd573c114eade7028653886eee966aa0eb7d6acc5415e2a47e1933191c79636747b5791eb0b8c4529267157f07be90066b69fb7fa8
|
7
|
+
data.tar.gz: 13beb8b6b2a9852836d12603c88f7ac8f96d25ec5a7548ba6ca5147fde261d1643ab2feb524a331448a0bb9bbad6f28a572a063d4cdf555ebd6d5efe9939fe51
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## 0.2.0 - 2019-12-18
|
6
|
+
### Added
|
7
|
+
- Handle missing values in config.
|
8
|
+
|
5
9
|
## 0.1.0 - 2019-10-25
|
6
10
|
### Added
|
7
11
|
- Initial product.
|
data/README.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
A flexible way to process records in the Pure Research Information System.
|
4
4
|
|
5
|
+
## Status
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/pure_iterator.svg)](https://badge.fury.io/rb/pure_iterator)
|
7
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/3dc9b9bd06dd42350843/maintainability)](https://codeclimate.com/github/lulibrary/pure_iterator/maintainability)
|
8
|
+
|
5
9
|
## Installation
|
6
10
|
|
7
11
|
Add this line to your application's Gemfile:
|
data/lib/pure_iterator/base.rb
CHANGED
@@ -10,12 +10,16 @@ module PureIterator
|
|
10
10
|
# @option config [String] :api_key API key of the Pure host account
|
11
11
|
# @option config [Integer] :api_version Pure API version
|
12
12
|
def initialize(config)
|
13
|
+
required = [:host, :username, :password, :api_key, :api_version]
|
14
|
+
required.each do |r|
|
15
|
+
raise ArgumentError, "Pure #{r} not set" unless config[r] && !config[r].to_s.empty?
|
16
|
+
end
|
13
17
|
http_client = HTTP::Client.new
|
14
18
|
http_client = http_client.headers({ 'api-key' => config[:api_key] })
|
15
19
|
http_client = http_client.basic_auth({user: config[:username], pass: config[:password]})
|
16
20
|
@http_client = http_client
|
17
21
|
@host = config[:host]
|
18
|
-
@api_version = config[:api_version]
|
22
|
+
@api_version = config[:api_version].to_s
|
19
23
|
accept :xml
|
20
24
|
end
|
21
25
|
|
@@ -64,7 +68,7 @@ module PureIterator
|
|
64
68
|
private
|
65
69
|
|
66
70
|
def url
|
67
|
-
File.join 'https://', @host, 'ws', 'api', @api_version
|
71
|
+
File.join 'https://', @host, 'ws', 'api', @api_version, post_endpoint
|
68
72
|
end
|
69
73
|
|
70
74
|
def count_from_xml(xml)
|
data/pure_iterator.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pure_iterator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Albin-Clark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest-reporters
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '4.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '4.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,7 +73,7 @@ licenses:
|
|
73
73
|
- MIT
|
74
74
|
metadata:
|
75
75
|
source_code_uri: https://github.com/lulibrary/pure_iterator
|
76
|
-
documentation_uri: https://www.rubydoc.info/gems/pure_iterator/0.
|
76
|
+
documentation_uri: https://www.rubydoc.info/gems/pure_iterator/0.2.0
|
77
77
|
post_install_message:
|
78
78
|
rdoc_options: []
|
79
79
|
require_paths:
|