pmp 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1859817bdd4a4e10673682a59cd88f8db50f025c
4
- data.tar.gz: f63e8e75ee4a63bb22ed0647cae4fb2ad1fc5e44
3
+ metadata.gz: 4ca69f3e539643b77523e7f339825dade3705136
4
+ data.tar.gz: 6562b98d05e8f039ee79fa04d9cc06cd590ffb77
5
5
  SHA512:
6
- metadata.gz: 4039a640c7f0144681d5d57002e2ede8b296a25aef9e98c04ab6382ebe8eaa79f84cdebc73e608de248863fc4ff1ef41fd7ce0333d10e347278c4398e2949652
7
- data.tar.gz: b5240080294c1f6ca77bb05acf4b6352430ee0b4a74c475bad440f5986edf343d6871ef67ae34af7a1761d22d3568d8f51736ccb4cd0f1eefedeb830db6b2230
6
+ metadata.gz: 6ce6b0dd6ab4f56c0e587e6f736126b40b8c04d349f4be5f518275ce23d0f3c3f289cccda68998270a9fd817a084ee0c798b004013fde9e2757d45a7bf9bbcfb
7
+ data.tar.gz: 91bf97ba769d222e67643d232fe686e1b8d7a235a853bed842921753af91dee3d22284189102e709e4bf18d5b78e8d7809ac5d914e1b027632fd98e286d5579a
@@ -198,7 +198,7 @@ module PMP
198
198
  def self.to_persist_json(body)
199
199
  return body.to_s if body.is_a?(String) || !body.respond_to?(:as_json)
200
200
 
201
- result = body.as_json.select! { |k,v| %w(attributes links).include?(k) }
201
+ result = body.as_json.select { |k,v| %w(version attributes links).include?(k) }
202
202
  result['attributes'].reject! { |k,v| %w(created modified).include?(k) }
203
203
  result['links'].reject! { |k,v| %w(creator query edit auth).include?(k) }
204
204
 
@@ -1,5 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
 
3
3
  module PMP
4
- VERSION = "0.5.1"
4
+ VERSION = "0.5.2"
5
5
  end
@@ -206,7 +206,7 @@ describe PMP::CollectionDocument do
206
206
  doc = PMP::CollectionDocument.new(oauth_token: 'thisisatestvalueonly')
207
207
 
208
208
  stub_request(:put, "https://publish.pmp.io/docs/c144e4df-021b-41e6-9cf3-42ac49bcbd42").
209
- with(:body => "{\"links\":{},\"attributes\":{\"guid\":\"c144e4df-021b-41e6-9cf3-42ac49bcbd42\",\"title\":\"testing\"}}",
209
+ with(:body => "{\"version\":\"1.0\",\"links\":{},\"attributes\":{\"guid\":\"c144e4df-021b-41e6-9cf3-42ac49bcbd42\",\"title\":\"testing\"}}",
210
210
  :headers => {'Accept'=>'application/vnd.collection.doc+json', 'Authorization'=>'Bearer thisisatestvalueonly', 'Content-Type'=>'application/vnd.collection.doc+json'}).
211
211
  to_return(:status => 200, :body => '{"url":"https://api.pmp.io/docs/c144e4df-021b-41e6-9cf3-42ac49bcbd42"}')
212
212
 
@@ -219,7 +219,7 @@ describe PMP::CollectionDocument do
219
219
  doc.href.must_equal "https://api.pmp.io/docs/c144e4df-021b-41e6-9cf3-42ac49bcbd42"
220
220
 
221
221
  stub_request(:put, "https://publish.pmp.io/docs/c144e4df-021b-41e6-9cf3-42ac49bcbd42").
222
- with(:body => "{\"links\":{},\"attributes\":{\"guid\":\"c144e4df-021b-41e6-9cf3-42ac49bcbd42\",\"title\":\"testing an update\"}}",
222
+ with(:body => "{\"version\":\"1.0\",\"links\":{},\"attributes\":{\"guid\":\"c144e4df-021b-41e6-9cf3-42ac49bcbd42\",\"title\":\"testing an update\"}}",
223
223
  :headers => {'Accept'=>'application/vnd.collection.doc+json', 'Authorization'=>'Bearer thisisatestvalueonly', 'Content-Type'=>'application/vnd.collection.doc+json'}).
224
224
  to_return(:status => 200, :body => '{"url":"https://api.pmp.io/docs/c144e4df-021b-41e6-9cf3-42ac49bcbd42"}')
225
225
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kuklewicz