puree 0.17.0 → 0.17.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: 1a632a407b779c5a615440921a4f68b102720cf4
4
- data.tar.gz: f5c253baddaf154171a1e48b8bfed12f8164faf1
3
+ metadata.gz: 2057afc22f318c041a9ae6e2f38f45d6bf178896
4
+ data.tar.gz: dbd57196335d0291d3a3e8afcae5ce3185a56a9b
5
5
  SHA512:
6
- metadata.gz: 77cb22c6d59964e383dea0f8aea621c7d11cbd62929a91c4a34636c21a8d17cbce45907d6b9d637c7390a3002e65b6b78be27ffce46ee1e251ed7e8f7c66cbfb
7
- data.tar.gz: 0adf28ac11d47aae6767f7e36c92eda2736d92391b6bfe7b9730c86a96d015dffce02d1e533cbab52c664792070dc67c9302c72e1e89a697d47f5ff4abf54dbf
6
+ metadata.gz: b6d2f693ac2abefbb753d43f183e25d1d89cc6dd44f5bab659002c2b7f9e6aeb5499ad9dc668e19a2891854a2c095c5f0fe1bbcaf4d6b55dcce43668740aa6b3
7
+ data.tar.gz: 969daf19da9bfd0eafb5cb20bc73bbe6930f145d565b5f57c76a9559d144486f854acffe27bbc1a4eb9c89a9c2f91879fef82ded23df08c6f05d5a2e36145841
data/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
7
7
  - Factory to make resource objects?
8
8
  - Make ALL dates ISO 8601 YYYY-MM-DD, rather than mirror varying formats from Pure?
9
9
 
10
+ ## 0.17.1 - 2016-09-08
11
+ ### Fixed
12
+ - Dataset - available extraction.
13
+
10
14
  ## 0.17.0 - 2016-09-02
11
15
  ### Added
12
16
  - Resource subclasses - uuid, created, modified as methods.
data/lib/puree/dataset.rb CHANGED
@@ -172,7 +172,7 @@ module Puree
172
172
  end
173
173
 
174
174
  def extract_available
175
- temporal_start_date 'dateMadeAvailable'
175
+ temporal_start_date '/dateMadeAvailable'
176
176
  end
177
177
 
178
178
  def extract_description
@@ -6,7 +6,7 @@ module Puree
6
6
 
7
7
  attr_reader :response
8
8
 
9
- # @param api [String]
9
+ # @param api [Symbol]
10
10
  # @param base_url [String]
11
11
  # @param username [String]
12
12
  # @param password [String]
data/lib/puree/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Puree
2
2
  # Semantic version number
3
3
  #
4
- VERSION = "0.17.0"
4
+ VERSION = "0.17.1"
5
5
  end
data/puree.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["a.albin-clark@lancaster.ac.uk"]
11
11
  spec.summary = %q{A client for the Pure Research Information System API.}
12
12
  spec.description = %q{Consumes the Pure Research Information System API and puts the metadata into simple data structures.}
13
- spec.homepage = "https://rubygems.org/gems/puree/"
13
+ spec.homepage = "https://aalbinclark.gitbooks.io/puree"
14
14
  spec.license = "MIT"
15
15
  spec.files = `git ls-files -z`.split("\x0")
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
data/spec/collection.rb CHANGED
@@ -2,36 +2,49 @@ require 'spec_helper'
2
2
 
3
3
  describe 'Collection' do
4
4
 
5
- it '#new' do
5
+ def new
6
6
  base_url = ENV['PURE_BASE_URL']
7
7
  username = ENV['PURE_USERNAME']
8
8
  password = ENV['PURE_PASSWORD']
9
- p = Puree::Collection.new(resource: :dataset,
9
+ @p = Puree::Collection.new(resource: :dataset,
10
10
  base_url: base_url,
11
11
  username: username,
12
12
  password: password,
13
- basic_auth: true
14
- )
15
- expect(p).to be_an_instance_of Puree::Collection
13
+ basic_auth: true)
14
+ end
15
+
16
+ it '#new' do
17
+ new
18
+ expect(@p).to be_an_instance_of(Puree::Collection)
16
19
  end
17
20
 
18
21
  describe 'data retrieval' do
19
22
  before(:all) do
20
- base_url = ENV['PURE_BASE_URL']
21
- username = ENV['PURE_USERNAME']
22
- password = ENV['PURE_PASSWORD']
23
- @p = Puree::Collection.new(resource: :dataset,
24
- base_url: base_url,
25
- username: username,
26
- password: password,
27
- basic_auth: true)
23
+ new
28
24
  @metadata = @p.find limit: 5
29
25
  end
30
26
 
31
- it '@metadata' do
27
+ it 'collection' do
28
+ expect(@metadata).to be_an_instance_of(Array)
29
+ end
30
+
31
+ end
32
+
33
+ describe 'data retrieval instance' do
34
+ before(:all) do
35
+ new
36
+ @metadata = @p.find limit: 5,
37
+ instance: true
38
+ end
39
+
40
+ it 'collection' do
32
41
  expect(@metadata).to be_an_instance_of(Array)
33
42
  end
34
43
 
44
+ it 'collection item' do
45
+ expect(@metadata[0]).to be_an_instance_of(Puree::Dataset)
46
+ end
47
+
35
48
  end
36
49
 
37
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
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: 2016-09-02 00:00:00.000000000 Z
11
+ date: 2016-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -82,7 +82,7 @@ files:
82
82
  - spec/publisher.rb
83
83
  - spec/server.rb
84
84
  - spec/spec_helper.rb
85
- homepage: https://rubygems.org/gems/puree/
85
+ homepage: https://aalbinclark.gitbooks.io/puree
86
86
  licenses:
87
87
  - MIT
88
88
  metadata: {}