europeana-blacklight 0.4.0 → 0.4.1

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: fd2eb749d05d56671137600760ee94c54860076f
4
- data.tar.gz: 3d1fdf6a5191730cea50dc15547f4875217eb395
3
+ metadata.gz: fdc8eda7f1866737f406348228cc88fd59b228ce
4
+ data.tar.gz: 95920756f24cf7dd857f01b1aa3c6b0bb265817c
5
5
  SHA512:
6
- metadata.gz: 28a19de2bda541663185b1905884d9b00b57a0c381af2df47cab66d7f5d05bae9df4339c70e9fd88fa6bd5fc5665ea2b8b36ca339efb131a332adc571240b9b0
7
- data.tar.gz: f0bcbbdb6315dcfe4afc20347c3aba852fe747299eb4871566bdce9537c2dc5f6ef7fabdf864782d9c2b8029c6aa9e98222501e3619d0ee0d71ac72edf752ee8
6
+ metadata.gz: 78009641836391f5b337581d9d49982f9771f5d5c65c1aad42c73ae6a4211699da39b81322da55b7d8402fbfd37c831190bb5b4e110bb5c6de8c81efbd2e4d91
7
+ data.tar.gz: 5c2915e1e65cdd4e55c572426eee17eac8a2ab03639c238820af4d28bc76d5c20d7ffeb26ea030652ebdf245305ac3af25ec6f11c15e3c939c32f08c54658cce
data/QUICKSTART.md CHANGED
@@ -16,7 +16,7 @@ cd culture_vulture
16
16
  ## Bundle europeana-blacklight
17
17
  Add to the Gemfile:
18
18
  ```ruby
19
- gem 'europeana-blacklight', '~> 0.3'
19
+ gem 'europeana-blacklight', '~> 0.3', '< 0.4'
20
20
  ```
21
21
 
22
22
  ## Get a Europeana API key
@@ -26,6 +26,7 @@ From http://labs.europeana.eu/api/
26
26
  ```
27
27
  bundle install
28
28
  bundle exec rails generate blacklight:install --devise
29
+ # This will ask if you want to overwrite some files; just say yes in a new app.
29
30
  bundle exec rails generate europeana:blacklight:install YOUR_API_KEY
30
31
  bundle exec rake db:migrate
31
32
  ```
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.required_ruby_version = '>= 2.0.0'
20
20
 
21
21
  spec.add_dependency 'blacklight', '~> 6.0.0'
22
- spec.add_dependency 'europeana-api', '~> 0.4.1'
22
+ spec.add_dependency 'europeana-api', '~> 0.5.0'
23
23
  spec.add_dependency 'iso-639', '~> 0.2.5'
24
24
  spec.add_dependency 'rails', '>= 4.2.2', '< 5'
25
25
 
@@ -49,6 +49,10 @@ module Europeana
49
49
  @options[:offset] || default_offset
50
50
  end
51
51
 
52
+ # Expected by {Blacklight::Facet#facet_paginator}
53
+ def prefix
54
+ end
55
+
52
56
  def sort
53
57
  # Europeana API does not support facet sorting
54
58
  nil
@@ -8,7 +8,7 @@ module Europeana
8
8
  end
9
9
 
10
10
  def call(mapper, _options = {})
11
- constraints id: %r{[^/]+/[^/]+} do
11
+ mapper.constraints id: %r{[^/]+/[^/]+} do
12
12
  mapper.post 'record/*id/track', action: 'track', as: 'track'
13
13
  mapper.get 'record/*id', action: 'show', as: 'show'
14
14
  end
@@ -1,5 +1,5 @@
1
1
  module Europeana
2
2
  module Blacklight
3
- VERSION = '0.4.0'.freeze
3
+ VERSION = '0.4.1'.freeze
4
4
  end
5
5
  end
@@ -1,4 +1,5 @@
1
1
  require 'blacklight'
2
+ require 'europeana/api'
2
3
  require 'europeana/blacklight/engine'
3
4
 
4
5
  module Europeana
@@ -6,7 +6,8 @@ module Europeana
6
6
  argument :europeana_api_key, type: :string
7
7
  argument :controller_name, type: :string, default: 'catalog'
8
8
 
9
- def disable_rsolr_gem
9
+ def disable_solr_gems
10
+ comment_lines('Gemfile', /gem 'solr_wrapper'/)
10
11
  comment_lines('Gemfile', /gem 'rsolr'/)
11
12
  end
12
13
 
@@ -24,13 +24,13 @@ RSpec.describe Europeana::Blacklight::Repository do
24
24
 
25
25
  it 'should send a record query to the API' do
26
26
  subject.find(record_id)
27
- expect(a_request(:get, "www.europeana.eu/api/v2/record#{record_id}.json").
27
+ expect(a_request(:get, "https://www.europeana.eu/api/v2/record#{record_id}.json").
28
28
  with(query: hash_including({ 'wskey' => api_key }))).to have_been_made
29
29
  end
30
30
 
31
31
  it 'should pass on API query params' do
32
32
  subject.find(record_id, callback: 'showRecord')
33
- expect(a_request(:get, "www.europeana.eu/api/v2/record#{record_id}.json").
33
+ expect(a_request(:get, "https://www.europeana.eu/api/v2/record#{record_id}.json").
34
34
  with(query: hash_including({ 'wskey' => api_key, 'callback' => 'showRecord' }))).to have_been_made
35
35
  end
36
36
 
@@ -44,7 +44,7 @@ RSpec.describe Europeana::Blacklight::Repository do
44
44
 
45
45
  it 'should send a search query to the API' do
46
46
  subject.search('query' => query)
47
- expect(a_request(:get, 'www.europeana.eu/api/v2/search.json').
47
+ expect(a_request(:get, 'https://www.europeana.eu/api/v2/search.json').
48
48
  with(query: hash_including({ 'wskey' => api_key, 'query' => query }))).to have_been_made
49
49
  end
50
50
 
data/spec/spec_helper.rb CHANGED
@@ -25,11 +25,11 @@ RSpec.configure do |config|
25
25
  end
26
26
 
27
27
  config.before(:each) do
28
- stub_request(:get, %r{http://www.europeana.eu/api/v2/record/[^/]+/[^/.]+\.json}).
28
+ stub_request(:get, %r{https://www.europeana.eu/api/v2/record/[^/]+/[^/.]+\.json}).
29
29
  with(query: hash_including(:wskey)).
30
30
  to_return(body: '{"success":true}', headers: { 'content-type' => 'application/json' })
31
31
 
32
- stub_request(:get, 'http://www.europeana.eu/api/v2/search.json').
32
+ stub_request(:get, 'https://www.europeana.eu/api/v2/search.json').
33
33
  with(query: hash_including(:wskey, :query)).
34
34
  to_return(body: '{"success":true}', headers: { 'content-type' => 'application/json' })
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: europeana-blacklight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Doe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-25 00:00:00.000000000 Z
11
+ date: 2016-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blacklight
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.4.1
33
+ version: 0.5.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: 0.4.1
40
+ version: 0.5.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: iso-639
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  version: '0'
257
257
  requirements: []
258
258
  rubyforge_project:
259
- rubygems_version: 2.4.5.1
259
+ rubygems_version: 2.5.1
260
260
  signing_key:
261
261
  specification_version: 4
262
262
  summary: Europeana REST API adapter for Blacklight
@@ -312,3 +312,4 @@ test_files:
312
312
  - spec/models/europeana/blacklight/document_spec.rb
313
313
  - spec/presenters/europeana/blacklight/document_presenter_spec.rb
314
314
  - spec/spec_helper.rb
315
+ has_rdoc: