-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from samvera-labs/rubocop
Add Rubocop
- Loading branch information
Showing
22 changed files
with
242 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require: rubocop-rspec | ||
inherit_from: .rubocop_todo.yml | ||
|
||
AllCops: | ||
DisplayCopNames: true | ||
|
||
Metrics/LineLength: | ||
Max: 120 | ||
|
||
Metrics/BlockLength: | ||
Exclude: | ||
- 'spec/**/*.rb' | ||
|
||
RSpec/MultipleExpectations: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2017-07-26 10:46:37 -0500 using RuboCop version 0.49.1. | ||
# 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 | ||
Metrics/AbcSize: | ||
Exclude: | ||
- 'lib/iiif_manifest/manifest_builder/resource_builder.rb' | ||
- 'lib/iiif_manifest/manifest_factory.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. | ||
# URISchemes: http, https | ||
Metrics/LineLength: | ||
Exclude: | ||
- 'iiif_manifest.gemspec' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: AssignmentOnly. | ||
RSpec/InstanceVariable: | ||
Exclude: | ||
- 'spec/lib/iiif_manifest/manifest_factory_spec.rb' | ||
|
||
# Offense count: 8 | ||
RSpec/NamedSubject: | ||
Exclude: | ||
- 'spec/lib/iiif_manifest/display_image_spec.rb' | ||
- 'spec/lib/iiif_manifest/iiif_endpoint_spec.rb' | ||
- 'spec/lib/iiif_manifest/manifest_builder/resource_builder_spec.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: IgnoreSymbolicNames. | ||
RSpec/VerifiedDoubles: | ||
Exclude: | ||
- 'spec/lib/iiif_manifest/display_image_spec.rb' | ||
|
||
# Offense count: 20 | ||
Style/Documentation: | ||
Exclude: | ||
- 'lib/iiif_manifest/display_image.rb' | ||
- 'lib/iiif_manifest/iiif_collection.rb' | ||
- 'lib/iiif_manifest/iiif_endpoint.rb' | ||
- 'lib/iiif_manifest/manifest_builder/canvas_builder.rb' | ||
- 'lib/iiif_manifest/manifest_builder/canvas_builder.rb' | ||
- 'lib/iiif_manifest/manifest_builder/canvas_builder_factory.rb' | ||
- 'lib/iiif_manifest/manifest_builder/child_manifest_builder_factory.rb' | ||
- 'lib/iiif_manifest/manifest_builder/composite_builder.rb' | ||
- 'lib/iiif_manifest/manifest_builder/composite_builder_factory.rb' | ||
- 'lib/iiif_manifest/manifest_builder/deep_canvas_builder_factory.rb' | ||
- 'lib/iiif_manifest/manifest_builder/image_builder.rb' | ||
- 'lib/iiif_manifest/manifest_builder/image_service_builder.rb' | ||
- 'lib/iiif_manifest/manifest_builder/record_property_builder.rb' | ||
- 'lib/iiif_manifest/manifest_builder/resource_builder.rb' | ||
- 'lib/iiif_manifest/manifest_builder/sequence_builder.rb' | ||
- 'lib/iiif_manifest/manifest_builder.rb' | ||
- 'lib/iiif_manifest/manifest_factory.rb' | ||
- 'lib/iiif_manifest/manifest_service_locator.rb' | ||
- 'lib/iiif_manifest.rb' | ||
- 'spec/lib/iiif_manifest/manifest_factory_spec.rb' | ||
|
||
# Offense count: 1 | ||
Style/MethodMissing: | ||
Exclude: | ||
- 'lib/iiif_manifest/manifest_builder/composite_builder.rb' | ||
|
||
# Offense count: 1 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: MinSize, SupportedStyles. | ||
# SupportedStyles: percent, brackets | ||
Style/SymbolArray: | ||
EnforcedStyle: brackets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
require 'bundler/gem_tasks' | ||
require 'rspec/core/rake_task' | ||
require 'rubocop/rake_task' | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
|
||
task :default => :spec | ||
desc 'Run style checker' | ||
RuboCop::RakeTask.new(:rubocop) do |task| | ||
task.fail_on_error = true | ||
end | ||
|
||
desc 'Run all checks' | ||
task ci: [:rubocop, :spec] | ||
|
||
task default: :ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,30 @@ | ||
# coding: utf-8 | ||
|
||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'iiif_manifest/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "iiif_manifest" | ||
spec.name = 'iiif_manifest' | ||
spec.version = IIIFManifest::VERSION | ||
spec.authors = ["Justin Coyne", "Trey Pendragon"] | ||
spec.email = ["jcoyne@justincoyne.com"] | ||
spec.authors = ['Justin Coyne', 'Trey Pendragon'] | ||
spec.email = ['jcoyne@justincoyne.com'] | ||
|
||
spec.summary = %q{Generate IIIF presentation manifests for Hydra::Works} | ||
spec.description = %q{IIIF http://iiif.io/ defines an API for presenting related images in a viewer. This transforms Hydra::Works objects into that format usable by players such as http://universalviewer.io/} | ||
spec.homepage = "http://github.com/projecthydra-labs/iiif_manifest" | ||
spec.summary = 'Generate IIIF presentation manifests for Hydra::Works' | ||
spec.description = 'IIIF http://iiif.io/ defines an API for presenting related images in a viewer. This transforms Hydra::Works objects into that format usable by players such as http://universalviewer.io/' | ||
spec.homepage = 'http://github.com/projecthydra-labs/iiif_manifest' | ||
|
||
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
spec.bindir = "exe" | ||
spec.bindir = 'exe' | ||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } | ||
spec.require_paths = ["lib"] | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_dependency 'activesupport', '>= 4' | ||
spec.add_dependency 'iiif-presentation', '~> 0.2.0' | ||
|
||
spec.add_dependency "activesupport", ">= 4" | ||
spec.add_dependency "iiif-presentation", '~> 0.2.0' | ||
|
||
spec.add_development_dependency "bundler", "~> 1.11" | ||
spec.add_development_dependency "rake", "~> 10.0" | ||
spec.add_development_dependency "rspec", "~> 3.0" | ||
spec.add_development_dependency 'bundler', '~> 1.11' | ||
spec.add_development_dependency 'rake', '~> 10.0' | ||
spec.add_development_dependency 'rspec', '~> 3.0' | ||
spec.add_development_dependency 'rubocop' | ||
spec.add_development_dependency 'rubocop-rspec' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module IIIFManifest | ||
VERSION = "0.2.0" | ||
VERSION = '0.2.0'.freeze | ||
end |
Oops, something went wrong.