europeana-blacklight 1.1.0 → 1.2.0

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: 2982bfcc30682102ae0f67fb85312a9d6f798fb7
4
- data.tar.gz: 83dc0fdd9682b23c1fe0a68505b2c27010a3c0f5
3
+ metadata.gz: 7442255bc63f0d1b8a6d293d928da2b9ca9f1362
4
+ data.tar.gz: 976ea304b67311d2be0055d659306b0ff61a0f55
5
5
  SHA512:
6
- metadata.gz: 5e73721571a9f0fd837e38d5b31e1aba6ecae2320242063907ed7091b5dc2997ce2c55c35f49bf78ef06ae0e2d4c8efe2270495764c400a77334c7a42f34386e
7
- data.tar.gz: 85ea8bb7005ad46579410ed34074d6fe21c8ccea0a10b2adc93649d1c8902ab7997e9ec91935727fe6ca99d1d6cf4a5058c3e2c6fae6be1724ac1ea217df1d50
6
+ metadata.gz: df035e593c9d9f32f0b1867ee9426a9dd0c8e77fc86bc472af76f5d44736819b9867ed3d3d7b6323dbbfb1f3ff362f4d437dcc165ad35fcad5edd85e4774f97f
7
+ data.tar.gz: 7e2ef1ec830cb661b5cf309b6aab0fbdcc1324a21f52f566070a49c071b88d1535ee28d02df247d6bae026499f5ea4188b1cc6049c71854cc0e22b493f48e15d
data/.codeclimate.yml ADDED
@@ -0,0 +1,3 @@
1
+ plugins:
2
+ rubocop:
3
+ enabled: true
data/.ruby-style.yml CHANGED
@@ -3,7 +3,7 @@ AllCops:
3
3
  - "vendor/**/*"
4
4
  - "db/schema.rb"
5
5
  UseCache: false
6
- TargetRubyVersion: 2.3
6
+ TargetRubyVersion: 2.4
7
7
  Style/CollectionMethods:
8
8
  Description: Preferred collection methods.
9
9
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#map-find-select-reduce-size
@@ -14,7 +14,12 @@ Style/CollectionMethods:
14
14
  find: detect
15
15
  find_all: select
16
16
  reduce: inject
17
- Style/DotPosition:
17
+ Metrics/BlockLength:
18
+ Exclude:
19
+ - 'Rakefile'
20
+ - '**/*.rake'
21
+ - 'spec/**/*.rb'
22
+ Layout/DotPosition:
18
23
  Description: Checks the position of the dot in multi-line method calls.
19
24
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
20
25
  Enabled: true
@@ -22,7 +27,7 @@ Style/DotPosition:
22
27
  SupportedStyles:
23
28
  - leading
24
29
  - trailing
25
- Style/FileName:
30
+ Naming/FileName:
26
31
  Description: Use snake_case for source file names.
27
32
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#snake-case-files
28
33
  Enabled: false
@@ -36,7 +41,6 @@ Style/IfUnlessModifier:
36
41
  Description: Favor modifier if/unless usage when you have a single-line body.
37
42
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
38
43
  Enabled: false
39
- MaxLineLength: 80
40
44
  Style/OptionHash:
41
45
  Description: Don't use option hashes when you can use keyword arguments.
42
46
  Enabled: false
@@ -54,7 +58,7 @@ Style/PercentLiteralDelimiters:
54
58
  "%w": "()"
55
59
  "%W": "()"
56
60
  "%x": "()"
57
- Style/PredicateName:
61
+ Naming/PredicateName:
58
62
  Description: Check the names of predicate methods.
59
63
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark
60
64
  Enabled: true
@@ -120,19 +124,6 @@ Style/TrailingCommaInArguments:
120
124
  StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
121
125
  Enabled: false
122
126
  EnforcedStyleForMultiline: no_comma
123
- SupportedStyles:
124
- - comma
125
- - consistent_comma
126
- - no_comma
127
- Style/TrailingCommaInLiteral:
128
- Description: 'Checks for trailing comma in array and hash literals.'
129
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
130
- Enabled: false
131
- EnforcedStyleForMultiline: no_comma
132
- SupportedStyles:
133
- - comma
134
- - consistent_comma
135
- - no_comma
136
127
  Metrics/AbcSize:
137
128
  Description: A calculated magnitude based on number of assignments, branches, and
138
129
  conditions.
@@ -186,7 +177,7 @@ Lint/AssignmentInCondition:
186
177
  Style/InlineComment:
187
178
  Description: Avoid inline comments.
188
179
  Enabled: false
189
- Style/AccessorMethodName:
180
+ Naming/AccessorMethodName:
190
181
  Description: Check the naming of accessor methods for get_/set_.
191
182
  Enabled: false
192
183
  Style/Alias:
@@ -244,7 +235,7 @@ Lint/HandleExceptions:
244
235
  Description: Don't suppress exception.
245
236
  StyleGuide: https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions
246
237
  Enabled: false
247
- Lint/LiteralInCondition:
238
+ Lint/LiteralAsCondition:
248
239
  Description: Checks of literals used in conditions.
249
240
  Enabled: false
250
241
  Lint/LiteralInInterpolation:
data/.travis.yml CHANGED
@@ -2,8 +2,20 @@ language: ruby
2
2
  rvm:
3
3
  - 2.3
4
4
  - 2.4
5
+ - 2.5
5
6
  notifications:
6
7
  email: false
7
8
  sudo: false
8
9
  cache:
9
10
  bundler: true
11
+ before_install:
12
+ - gem update --system
13
+ - gem install bundler
14
+ before_script:
15
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
16
+ - chmod +x ./cc-test-reporter
17
+ - ./cc-test-reporter before-build
18
+ script:
19
+ - bundle exec rspec
20
+ after_script:
21
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
data/Gemfile CHANGED
@@ -6,9 +6,9 @@ gemspec
6
6
  gem 'europeana-api', github: 'europeana/europeana-api-client-ruby', branch: 'develop'
7
7
 
8
8
  group :test do
9
- gem 'coveralls', require: false
9
+ gem 'simplecov', require: false
10
10
  end
11
11
 
12
12
  group :test, :development do
13
- gem 'rubocop', '0.39.0', require: false # only update when Hound does
13
+ gem 'rubocop', '~> 0.53', require: false
14
14
  end
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Europeana::Blacklight
2
2
 
3
- [![Build Status](https://travis-ci.org/europeana/europeana-blacklight.svg?branch=master)](https://travis-ci.org/europeana/europeana-blacklight) [![Coverage Status](https://coveralls.io/repos/europeana/europeana-blacklight/badge.svg?branch=master&service=github)](https://coveralls.io/github/europeana/europeana-blacklight?branch=master) [![security](https://hakiri.io/github/europeana/europeana-blacklight/master.svg)](https://hakiri.io/github/europeana/europeana-blacklight/master) [![Dependency Status](https://gemnasium.com/europeana/europeana-blacklight.svg)](https://gemnasium.com/europeana/europeana-blacklight)
3
+ [![Build Status](https://travis-ci.org/europeana/europeana-blacklight.svg?branch=master)](https://travis-ci.org/europeana/europeana-blacklight) [![Security](https://hakiri.io/github/europeana/europeana-blacklight/master.svg)](https://hakiri.io/github/europeana/europeana-blacklight/master) [![Dependency Status](https://gemnasium.com/europeana/europeana-blacklight.svg)](https://gemnasium.com/europeana/europeana-blacklight) [![Maintainability](https://api.codeclimate.com/v1/badges/9ca73f2805dce1de01b6/maintainability)](https://codeclimate.com/github/europeana/europeana-blacklight/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/9ca73f2805dce1de01b6/test_coverage)](https://codeclimate.com/github/europeana/europeana-blacklight/test_coverage)
4
4
 
5
5
  Ruby gem providing an adapter to use the
6
6
  [Europeana REST API](http://labs.europeana.eu/api/introduction/) as a data
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  spec.name = 'europeana-blacklight'
7
7
  spec.version = Europeana::Blacklight::VERSION
8
8
  spec.authors = ['Richard Doe']
9
- spec.email = ['richard.doe@rwdit.net']
9
+ spec.email = ['richard.doe@europeana.eu']
10
10
 
11
11
  spec.summary = 'Europeana REST API adapter for Blacklight'
12
12
  spec.homepage = 'https://github.com/europeana/europeana-blacklight'
@@ -21,6 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency 'blacklight', '~> 6.0.0'
22
22
  spec.add_dependency 'europeana-api', '~> 1.0.0'
23
23
  spec.add_dependency 'iso-639', '~> 0.2.5'
24
+ spec.add_dependency 'kaminari', '>= 1.0.0', '< 2'
24
25
  spec.add_dependency 'rails', '>= 4.2.2', '< 5'
25
26
 
26
27
  spec.add_development_dependency 'bundler', '~> 1.8'
@@ -29,8 +29,14 @@ module Europeana
29
29
  docs.first.model_name
30
30
  end
31
31
 
32
- def max_pages
33
- (defined?(@_max_pages) && @_max_pages) || (1000 / limit_value)
32
+ def max_pages(val = :none)
33
+ if val == :none
34
+ # getter
35
+ (defined?(@_max_pages) && @_max_pages) || (1000 / limit_value)
36
+ else
37
+ # setter
38
+ @_max_pages = val
39
+ end
34
40
  end
35
41
 
36
42
  def total_pages
@@ -1,5 +1,5 @@
1
1
  module Europeana
2
2
  module Blacklight
3
- VERSION = '1.1.0'.freeze
3
+ VERSION = '1.2.0'.freeze
4
4
  end
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  ENV['RAILS_ENV'] ||= 'test'
2
2
 
3
- require 'coveralls'
4
- Coveralls.wear! unless Coveralls.will_run?.nil?
3
+ # Generate Simplecov report
4
+ require 'simplecov'
5
+ SimpleCov.start
5
6
 
6
7
  require File.expand_path('../dummy/config/environment.rb', __FILE__)
7
8
  require 'rspec/rails'
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: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Doe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-09 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blacklight
@@ -52,6 +52,26 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.2.5
55
+ - !ruby/object:Gem::Dependency
56
+ name: kaminari
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.0
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '2'
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: 1.0.0
72
+ - - "<"
73
+ - !ruby/object:Gem::Version
74
+ version: '2'
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: rails
57
77
  requirement: !ruby/object:Gem::Requirement
@@ -144,13 +164,13 @@ dependencies:
144
164
  version: '1.21'
145
165
  description:
146
166
  email:
147
- - richard.doe@rwdit.net
167
+ - richard.doe@europeana.eu
148
168
  executables: []
149
169
  extensions: []
150
170
  extra_rdoc_files: []
151
171
  files:
172
+ - ".codeclimate.yml"
152
173
  - ".gitignore"
153
- - ".hound.yml"
154
174
  - ".rspec"
155
175
  - ".rubocop.yml"
156
176
  - ".ruby-style.yml"
data/.hound.yml DELETED
@@ -1,10 +0,0 @@
1
- coffeescript:
2
- enabled: false
3
- haml:
4
- enabled: false
5
- javascript:
6
- enabled: false
7
- scss:
8
- enabled: false
9
- ruby:
10
- config_file: .ruby-style.yml