Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Permalink
Browse files

Rubocop coding standards.

  • Loading branch information...
ruebot committed Aug 16, 2017
1 parent 5995d6a commit 14b154dd414dc1ee4a7cd5c14d7d50227dc70469
@@ -1,4 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

# Declare your gem's dependencies in warclight.gemspec.
@@ -29,9 +30,9 @@ else

case ENV['RAILS_VERSION']
when /^4.2/
gem 'coffee-rails', '~> 4.1.0'
gem 'responders', '~> 2.0'
gem 'sass-rails', '>= 5.0'
gem 'coffee-rails', '~> 4.1.0'
when /^4.[01]/
gem 'sass-rails', '< 5.0'
end
@@ -1,4 +1,8 @@
# frozen_string_literal: true

module Warclight
##
# Controller. This might disappear.
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
end
@@ -1,4 +1,8 @@
# frozen_string_literal: true

module Warclight
##
# Helper for Warclight. This might disappear.
module ApplicationHelper
end
end
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Warclight
class ApplicationJob < ActiveJob::Base
end

This file was deleted.

@@ -1,4 +1,8 @@
# frozen_string_literal: true

module Warclight
##
# ApplicationRecord class. We'll probably get rid of this.
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
@@ -1,2 +1,4 @@
# frozen_string_literal: true

Warclight::Engine.routes.draw do
end
@@ -1,4 +1,6 @@
require "warclight/engine"
# frozen_string_literal: true

require 'warclight/engine'

module Warclight
# Your code goes here...
@@ -3,101 +3,103 @@
require 'blacklight'

module Warclight
##
# This is the defining class for the Warclight Rails Engine
class Engine < ::Rails::Engine
Warclight::Engine.config.catalog_controller_field_accessors = %i[
access_terms
author
category
collection
collection_name
collection_number
collections
comments
content
content_encoding
content_ffb
content_first_bytes
content_language
content_length
content_metadata
content_metadata_ss
content_text_length
content_type
content_type_droid
content_type_ext
content_type_full
content_type_norm
content_type_served
content_type_tika
content_type_version
crawl_date
crawl_dates
crawl_year
crawl_year_month
crawl_year_month_day
crawl_years
description
domain
elements_used
generator
hash
hashes
host
host_surt
id_long
image_colours
image_dominant_colour
image_faces
image_faces_count
image_height
image_size
image_width
institution
keywords
last_modified
last_modified_year
license_url
links
links_domains
links_hosts
links_hosts_surts
links_norm
links_public_suffixes
locations
parse_error
pdf_pdfa_errors
pdf_pdfa_is_valid
postcode
postcode_district
public_suffix
publication_date
publication_year
record_type
referrer_url
resourcename
sentiment
sentiment_score
server
source_file
source_file_offset
status_code
subject
text
title
type
url
url_norm
url_path
url_type
wayback_date
wct_agency
wct_collections
wct_description
wct_instance_id
wct_subjects
wct_target_id
wct_title
xml_root_ns
access_terms
author
category
collection
collection_name
collection_number
collections
comments
content
content_encoding
content_ffb
content_first_bytes
content_language
content_length
content_metadata
content_metadata_ss
content_text_length
content_type
content_type_droid
content_type_ext
content_type_full
content_type_norm
content_type_served
content_type_tika
content_type_version
crawl_date
crawl_dates
crawl_year
crawl_year_month
crawl_year_month_day
crawl_years
description
domain
elements_used
generator
hash
hashes
host
host_surt
id_long
image_colours
image_dominant_colour
image_faces
image_faces_count
image_height
image_size
image_width
institution
keywords
last_modified
last_modified_year
license_url
links
links_domains
links_hosts
links_hosts_surts
links_norm
links_public_suffixes
locations
parse_error
pdf_pdfa_errors
pdf_pdfa_is_valid
postcode
postcode_district
public_suffix
publication_date
publication_year
record_type
referrer_url
resourcename
sentiment
sentiment_score
server
source_file
source_file_offset
status_code
subject
text
title
type
url
url_norm
url_path
url_type
wayback_date
wct_agency
wct_collections
wct_description
wct_instance_id
wct_subjects
wct_target_id
wct_title
xml_root_ns
]
end
end
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Warclight
VERSION = '0.1.0'
end
@@ -3,7 +3,7 @@
require 'rails/generators'

class TestAppGenerator < Rails::Generators::Base
source_root "./spec/test_app_templates"
source_root './spec/test_app_templates'

# if you need to generate any additional configuration
# into the test app, this generator will be run immediately
@@ -26,4 +26,3 @@ def install_engine
generate 'warclight:install'
end
end

@@ -1,17 +1,18 @@
$:.push File.expand_path("../lib", __FILE__)
# frozen_string_literal: true

# Maintain your gem's version:
require "warclight/version"
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'warclight/version'

# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "warclight"
s.name = 'warclight'
s.version = Warclight::VERSION
s.authors = ["Nick Ruest"]
s.email = ["ruestn@yorku.ca"]
s.homepage = "https://github.com/archivesunleashed/warclight"
s.summary = "A Rails engine supporting discovery of web archives."
s.license = "Apache-2.0"
s.authors = ['Nick Ruest']
s.email = ['ruestn@yorku.ca']
s.homepage = 'https://github.com/archivesunleashed/warclight'
s.summary = 'A Rails engine supporting discovery of web archives.'
s.license = 'Apache-2.0'

s.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
@@ -20,20 +21,20 @@ Gem::Specification.new do |s|
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
s.require_paths = ['lib']

s.add_dependency "blacklight"
s.add_dependency "blacklight_range_limit"
s.add_dependency "rails", "~> 5.1.2"
s.add_dependency 'blacklight'
s.add_dependency 'blacklight_range_limit'
s.add_dependency 'rails', '~> 5.1.2'

s.add_development_dependency "bundler", "~> 1.14"
s.add_development_dependency "codecov"
s.add_development_dependency "engine_cart"
s.add_development_dependency "mocha"
s.add_development_dependency "poltergeist"
s.add_development_dependency "rake", "~> 12.0"
s.add_development_dependency "rspec-rails", "~> 3.0"
s.add_development_dependency "rubocop", "~> 0.48.1"
s.add_development_dependency "rubocop-rspec", "~> 1.15.0"
s.add_development_dependency "simplecov"
s.add_development_dependency "solr_wrapper"
s.add_development_dependency "sqlite3"
s.add_development_dependency 'bundler', '~> 1.14'
s.add_development_dependency 'codecov'
s.add_development_dependency 'engine_cart'
s.add_development_dependency 'mocha'
s.add_development_dependency 'poltergeist'
s.add_development_dependency 'rake', '~> 12.0'
s.add_development_dependency 'rspec-rails', '~> 3.0'
s.add_development_dependency 'rubocop', '~> 0.48.1'
s.add_development_dependency 'rubocop-rspec', '~> 1.15.0'
s.add_development_dependency 'simplecov'
s.add_development_dependency 'solr_wrapper'
s.add_development_dependency 'sqlite3'
end

0 comments on commit 14b154d

Please sign in to comment.
You can’t perform that action at this time.