gds-api-adapters 0.0.47 → 0.0.48

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,6 +21,10 @@ class GdsApi::Panopticon < GdsApi::Base
21
21
  put_json("#{base_url}/#{id_or_slug}.json", artefact)
22
22
  end
23
23
 
24
+ def curated_lists
25
+ get_json("#{@endpoint}/curated_lists.json").to_hash
26
+ end
27
+
24
28
  private
25
29
  def base_url
26
30
  "#{endpoint}/artefacts"
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = '0.0.47'
2
+ VERSION = '0.0.48'
3
3
  end
@@ -126,4 +126,10 @@ class PanopticonApiTest < MiniTest::Unit::TestCase
126
126
  r.register(record)
127
127
  end
128
128
 
129
+ def test_should_be_able_to_fetch_curated_lists
130
+ stub_request(:get, "#{PANOPTICON_ENDPOINT}/curated_lists.json").
131
+ with(:headers => GdsApi::JsonClient::REQUEST_HEADERS).
132
+ to_return(:status => 200, :body => '{ "crume": ["pinishment", "prosin"]}', :headers => {})
133
+ assert_equal({ "crume" => ["pinishment", "prosin"]}, api.curated_lists)
134
+ end
129
135
  end
@@ -105,5 +105,4 @@ class GdsApi::PublisherTest < MiniTest::Unit::TestCase
105
105
  to_return(:status => 200, :body => '{"snac": "12345"}', :headers => {})
106
106
  assert_equal '12345', api.council_for_slug('fake-transaction', [12345])
107
107
  end
108
-
109
108
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.47
5
+ version: 0.0.48
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Stewart
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-05-11 00:00:00 Z
13
+ date: 2012-06-01 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: plek
@@ -185,7 +185,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
185
  requirements:
186
186
  - - ">="
187
187
  - !ruby/object:Gem::Version
188
- hash: -4087201614772257686
188
+ hash: -837449254207213503
189
189
  segments:
190
190
  - 0
191
191
  version: "0"
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  requirements:
195
195
  - - ">="
196
196
  - !ruby/object:Gem::Version
197
- hash: -4087201614772257686
197
+ hash: -837449254207213503
198
198
  segments:
199
199
  - 0
200
200
  version: "0"