Permalink
Browse files

Added rubocop.

  • Loading branch information...
dblock committed Jul 6, 2018
1 parent 3e1c6fc commit fc034c93796c67121fd9180f360ba077790940ad
Showing with 68 additions and 19 deletions.
  1. +18 −0 .rubocop.yml
  2. +13 −0 .rubocop_todo.yml
  3. +4 −3 Gemfile
  4. +18 −0 Gemfile.lock
  5. +1 −1 bin/rails
  6. +1 −1 bin/rake
  7. +1 −1 bin/spring
  8. +7 −7 config/application.rb
  9. +0 −1 config/environments/development.rb
  10. +2 −2 config/environments/production.rb
  11. +3 −3 config/puma.rb
@@ -0,0 +1,18 @@
AllCops:
Exclude:
- vendor/**/*

Metrics:
Enabled: false

Metrics/LineLength:
Max: 256
Enabled: false

Style/Documentation:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

inherit_from: .rubocop_todo.yml
@@ -0,0 +1,13 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-07-05 20:42:49 -0400 using RuboCop version 0.57.2.
# 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
Style/MixinUsage:
Exclude:
- 'bin/setup'
- 'bin/update'
@@ -3,14 +3,15 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.5.1'

gem 'rails', '~> 5.2.0'
gem 'puma', '~> 3.11'
gem 'mongoid'
gem 'bootsnap', '>= 1.1.0', require: false
gem 'mongoid'
gem 'puma', '~> 3.11'
gem 'rails', '~> 5.2.0'

gem 'rack-cors'

group :development, :test do
gem 'rubocop'
end

group :development do
@@ -43,6 +43,7 @@ GEM
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (9.0.0)
ast (2.4.0)
bootsnap (1.3.0)
msgpack (~> 1.0)
bson (4.3.0)
@@ -55,6 +56,7 @@ GEM
activesupport (>= 4.2.0)
i18n (1.0.1)
concurrent-ruby (~> 1.0)
jaro_winkler (1.5.1-x86_64-darwin-17)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
@@ -80,6 +82,10 @@ GEM
nio4r (2.3.1)
nokogiri (1.8.4)
mini_portile2 (~> 2.3.0)
parallel (1.12.1)
parser (2.5.1.0)
ast (~> 2.4.0)
powerpack (0.1.2)
puma (3.11.4)
rack (2.0.5)
rack-cors (1.0.2)
@@ -109,10 +115,20 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (3.0.0)
rake (12.3.1)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rubocop (0.57.2)
jaro_winkler (~> 1.5.1)
parallel (~> 1.10)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
ruby_dep (1.5.0)
spring (2.0.2)
activesupport (>= 4.2)
@@ -130,6 +146,7 @@ GEM
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.4.0)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
@@ -144,6 +161,7 @@ DEPENDENCIES
puma (~> 3.11)
rack-cors
rails (~> 5.2.0)
rubocop
spring
spring-watcher-listen (~> 2.0.0)

@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
load File.expand_path('spring', __dir__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
load File.expand_path('spring', __dir__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
@@ -8,7 +8,7 @@ unless defined?(Spring)
require 'bundler'

lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
spring = lockfile.specs.detect { |spec| spec.name == 'spring' }
if spring
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
gem 'spring', spring.version
@@ -1,15 +1,15 @@
require_relative 'boot'

require "rails"
require 'rails'
# Pick the frameworks you want:
require "active_model/railtie"
require "active_job/railtie"
require 'active_model/railtie'
require 'active_job/railtie'
# require "active_record/railtie"
# require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "action_cable/engine"
require 'action_controller/railtie'
require 'action_mailer/railtie'
require 'action_view/railtie'
require 'action_cable/engine'
# require "sprockets/railtie"
# require "rails/test_unit/railtie"

@@ -35,7 +35,6 @@
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log


# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true

@@ -42,7 +42,7 @@
config.log_level = :debug

# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
config.log_tags = [:request_id]

# Use a different cache store in production.
# config.cache_store = :mem_cache_store
@@ -71,7 +71,7 @@
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')

if ENV["RAILS_LOG_TO_STDOUT"].present?
if ENV['RAILS_LOG_TO_STDOUT'].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
@@ -4,16 +4,16 @@
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches the default thread size of Active Record.
#
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }
threads threads_count, threads_count

# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
port ENV.fetch("PORT") { 3000 }
port ENV.fetch('PORT') { 3000 }

# Specifies the `environment` that Puma will run in.
#
environment ENV.fetch("RAILS_ENV") { "development" }
environment ENV.fetch('RAILS_ENV') { 'development' }

# Specifies the number of `workers` to boot in clustered mode.
# Workers are forked webserver processes. If using threads and workers together

0 comments on commit fc034c9

Please sign in to comment.