Skip to content

Commit

Permalink
Merge pull request #7 from projectblacklight/v4.1
Browse files Browse the repository at this point in the history
v4.1 with support for Blacklight 4 and Rails 4
  • Loading branch information
Carla Galarza authored Dec 4, 2017
2 parents f603f8c + cfc79a6 commit be5708f
Show file tree
Hide file tree
Showing 73 changed files with 6,145 additions and 742 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/.bundle/
/.yardoc
/Gemfile.lock
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
*.gem
.ruby-version
.ruby-gemset
.byebug_history

# rspec failure tracking
.rspec_status

.internal_test_app
39 changes: 39 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
require: rubocop-rspec

inherit_from:
- .rubocop_todo.yml

AllCops:
DisplayCopNames: true
Exclude:
- "blacklight_oai_provider.gemspec"

Rails:
Enabled: true

Metrics/BlockLength:
Exclude:
- 'spec/**/*'
- "lib/railties/blacklight_oai_provider.rake"

Metrics/LineLength:
Max: 200

Style/StringLiterals:
Enabled: false

Layout/IndentationConsistency:
EnforcedStyle: normal

Rails/OutputSafety:
Enabled: false

# engine_cart block includes conditional, not duplication
Bundler/DuplicatedGem:
Exclude:
- 'Gemfile'

# engine_cart block is following default Rails order
Bundler/OrderedGems:
Exclude:
- 'Gemfile'
130 changes: 130 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2017-10-26 15:19:14 -0400 using RuboCop version 0.50.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: empty_lines, no_empty_lines
Layout/EmptyLinesAroundBlockBody:
Exclude:
- 'spec/requests/list_metadata_formats_spec.rb'

# Offense count: 4
Metrics/AbcSize:
Max: 25

# Offense count: 2
# Configuration parameters: CountComments.
Metrics/MethodLength:
Max: 39

# Offense count: 2
RSpec/BeforeAfterAll:
Exclude:
- 'spec/spec_helper.rb'
- 'spec/rails_helper.rb'
- 'spec/support/**/*.rb'
- 'spec/requests/list_identifiers_spec.rb'

# Offense count: 6
RSpec/DescribeClass:
Exclude:
- 'spec/features/html_rendering_spec.rb'
- 'spec/requests/get_record_spec.rb'
- 'spec/requests/identify_spec.rb'
- 'spec/requests/list_identifiers_spec.rb'
- 'spec/requests/list_metadata_formats_spec.rb'
- 'spec/requests/list_records_spec.rb'

# Offense count: 1
# Configuration parameters: CustomIncludeMethods.
RSpec/EmptyExampleGroup:
Exclude:
- 'spec/requests/list_records_spec.rb'

# Offense count: 1
# Configuration parameters: Max.
RSpec/ExampleLength:
Exclude:
- 'spec/controllers/catalog_controller_spec.rb'

# Offense count: 6
RSpec/MultipleExpectations:
Max: 2

# Offense count: 2
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: strict, flexible
Rails/TimeZone:
Exclude:
- 'spec/requests/identify_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
Exclude:
- 'spec/models/solr_document_spec.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: braces, no_braces, context_dependent
Style/BracesAroundHashParameters:
Exclude:
- 'lib/blacklight_oai_provider/solr_document_wrapper.rb'
- 'spec/models/solr_document_spec.rb'

# Offense count: 12
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'app/controllers/concerns/blacklight_oai_provider/controller.rb'
- 'app/models/concerns/blacklight_oai_provider/solr_document.rb'
- 'lib/blacklight_oai_provider.rb'
- 'lib/blacklight_oai_provider/engine.rb'
- 'lib/blacklight_oai_provider/exceptions.rb'
- 'lib/blacklight_oai_provider/resumption_token.rb'
- 'lib/blacklight_oai_provider/routes.rb'
- 'lib/blacklight_oai_provider/solr_document_provider.rb'
- 'lib/blacklight_oai_provider/solr_document_wrapper.rb'
- 'lib/blacklight_oai_provider/version.rb'
- 'lib/generators/blacklight_oai_provider/install_generator.rb'

# Offense count: 24
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: when_needed, always, never
Style/FrozenStringLiteralComment:
Enabled: false

# Offense count: 2
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Exclude:
- 'lib/generators/blacklight_oai_provider/install_generator.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: MinSize, SupportedStyles.
# SupportedStyles: percent, brackets
Style/SymbolArray:
EnforcedStyle: brackets

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
# IgnoredMethods: respond_to, define_method
Style/SymbolProc:
Exclude:
- 'spec/spec_helper.rb'
8 changes: 8 additions & 0 deletions .solr_wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Place any default configuration for solr_wrapper here
port: 8983
verbose: true
version: 5.5.5
managed: true
collection:
dir: solr/conf/
name: blacklight-core
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
notifications:
email: false

language: ruby
sudo: false
rvm:
- 2.3.3
- 2.2
- 2.1

env:
- "RAILS_VERSION=4.2.9"
- "RAILS_VERSION=4.1.16"

before_install:
- gem install bundler
36 changes: 34 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,37 @@ source 'http://rubygems.org'

gemspec

gem 'combustion'
gem 'sqlite3'
# BEGIN ENGINE_CART BLOCK
# engine_cart: 1.1.0
# engine_cart stanza: 0.10.0
# the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
if File.exist?(file)
begin
eval_gemfile file
rescue Bundler::GemfileError => e
Bundler.ui.warn '[EngineCart] Skipping Rails application dependencies:'
Bundler.ui.warn e.message
end
else
Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"

if ENV['RAILS_VERSION']
if ENV['RAILS_VERSION'] == 'edge'
gem 'rails', github: 'rails/rails'
ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
else
gem 'rails', ENV['RAILS_VERSION']
end
end

case ENV['RAILS_VERSION']
when /^4.2/
gem 'responders', '~> 2.0'
gem 'sass-rails', '>= 5.0'
gem 'coffee-rails', '~> 4.1.0'
when /^4.[01]/
gem 'sass-rails', '< 5.0'
end
end
# END ENGINE_CART BLOCK
Loading

0 comments on commit be5708f

Please sign in to comment.