pmp 0.3.2 → 0.4.0

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.
data/spec/link_spec.rb CHANGED
@@ -60,15 +60,15 @@ describe PMP::Link do
60
60
  link_doc = json_file(:collection_query)
61
61
 
62
62
  stub_request(:get, "https://api-sandbox.pmp.io/docs?limit=10&tag=test").
63
- with(:headers => {'Accept'=>'application/vnd.pmp.collection.doc+json', 'Content-Type'=>'application/vnd.pmp.collection.doc+json', 'Host'=>'api-sandbox.pmp.io:443'}).
63
+ with(:headers => {'Accept'=>'application/vnd.collection.doc+json', 'Content-Type'=>'application/vnd.collection.doc+json', 'Host'=>'api-sandbox.pmp.io:443'}).
64
64
  to_return(:status => 200, :body => link_doc, :headers => {})
65
65
 
66
66
  @link = PMP::Link.new(query_document_info, @parent)
67
67
  docs = @link.where(limit: 10, tag: 'test')
68
68
  docs.must_be_instance_of PMP::Link
69
69
  guids = docs.items.collect(&:guid).sort
70
- guids.first.must_equal "03796e02-48f4-40aa-b457-2ffeba3d8d39"
71
- guids.last.must_equal "e30690e1-3f20-408a-9dba-94172caf49c7"
70
+ guids.first.must_equal "0c9eeb61-dba5-431a-be8e-ad74c64aad2b"
71
+ guids.last.must_equal "e77aa925-53e0-4cfd-8f16-db6146faef3e"
72
72
  end
73
73
 
74
74
  def query_document_info
@@ -96,7 +96,7 @@ describe PMP::Link do
96
96
  "text" => "https://github.com/publicmediaplatform/pmpdocs/wiki/Content-Retrieval"
97
97
  },
98
98
  "rels" => [
99
- "urn:pmp:query:docs"
99
+ "urn:collectiondoc:query:docs"
100
100
  ],
101
101
  "title" => "Query for documents"
102
102
  }
data/spec/parser_spec.rb CHANGED
@@ -15,8 +15,8 @@ class TestParser < OpenStruct
15
15
  @links ||= PMP::Links.new(self)
16
16
  end
17
17
 
18
- def attributes
19
- marshal_dump.delete_if{|k,v| links.keys.include?(k)}
18
+ def attributes_map
19
+ marshal_dump
20
20
  end
21
21
 
22
22
  end
@@ -54,7 +54,7 @@ describe PMP::Parser do
54
54
  tc = TestParser.new
55
55
  tc.parse(json_fixture(:collection_root))
56
56
  tc.query.must_be_instance_of HashWithIndifferentAccess
57
- tc.query.keys.sort.must_equal ["urn:pmp:hreftpl:docs", "urn:pmp:hreftpl:profiles", "urn:pmp:hreftpl:schemas", "urn:pmp:query:docs", "urn:pmp:query:groups", "urn:pmp:query:guids", "urn:pmp:query:users"]
57
+ tc.query.keys.sort.must_equal ["urn:collectiondoc:hreftpl:docs", "urn:collectiondoc:hreftpl:profiles", "urn:collectiondoc:hreftpl:schemas", "urn:collectiondoc:query:docs", "urn:collectiondoc:query:groups", "urn:collectiondoc:query:guids", "urn:collectiondoc:query:profiles", "urn:collectiondoc:query:schemas", "urn:collectiondoc:query:users"]
58
58
  end
59
59
 
60
60
  it "will unparse links" do
@@ -63,7 +63,7 @@ describe PMP::Parser do
63
63
  tc.links['test1'] = PMP::Link.new(href: 'https://api-sandbox.pmp.io/test1')
64
64
  tc.links['test2'] = [PMP::Link.new(href: 'https://api-sandbox.pmp.io/test2a'), PMP::Link.new(href: 'https://api-sandbox.pmp.io/test2b')]
65
65
  hash = tc.as_json
66
- hash['links'].keys.sort.must_equal ["creator", "edit", "navigation", "query", "test1", "test2"]
66
+ hash['links'].keys.sort.must_equal ["auth", "bookmark", "creator", "edit", "item", "navigation", "query", "test1", "test2"]
67
67
  end
68
68
 
69
69
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kuklewicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-28 00:00:00.000000000 Z
11
+ date: 2014-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler