-
Notifications
You must be signed in to change notification settings - Fork 80
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 #12 from the-teacher/rubocop
Add Rubocop
- Loading branch information
Showing
64 changed files
with
360 additions
and
130 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,70 @@ | ||
require: rubocop-rails | ||
Style/FrozenStringLiteralComment: | ||
Enabled: true | ||
Style/Documentation: | ||
Enabled: false | ||
Style/StringLiterals: | ||
Exclude: | ||
- Gemfile | ||
- Rakefile | ||
- test/test_helper.rb | ||
- config/boot.rb | ||
- config/importmap.rb | ||
- config/application.rb | ||
- config/initializers/assets.rb | ||
- config/environments/test.rb | ||
- config/environments/development.rb | ||
- config/environments/production.rb | ||
- app/mailers/application_mailer.rb | ||
Naming/FileName: | ||
Exclude: | ||
- config/_PUMA.rb | ||
- config/_SCHEDULE.rb | ||
- config/initializers/_CHEWY.rb | ||
- config/initializers/_CONFIG.rb | ||
- config/initializers/_REDIS.rb | ||
- config/initializers/_SIDEKIQ.rb | ||
Style/SymbolArray: | ||
Exclude: | ||
- config/initializers/filter_parameter_logging.rb | ||
Style/GlobalStdStream: | ||
Exclude: | ||
- config/environments/production.rb | ||
Style/ClassAndModuleChildren: | ||
Exclude: | ||
- test/test_helper.rb | ||
Layout/SpaceInsidePercentLiteralDelimiters: | ||
Exclude: | ||
- Gemfile | ||
Rails/Output: | ||
Exclude: | ||
- db/seeds.rb | ||
- app/jobs/example_job.rb | ||
- app/models/currency_rate.rb | ||
- config/environments/development.rb | ||
- config/initializers/_CHEWY.rb | ||
- config/initializers/_CONFIG.rb | ||
- config/initializers/_REDIS.rb | ||
- config/initializers/_SIDEKIQ.rb | ||
Metrics/MethodLength: | ||
Exclude: | ||
- bin/helpers/docker.rb | ||
- app/controllers/demo_controller.rb | ||
Style/OptionalBooleanParameter: | ||
Exclude: | ||
- bin/helpers/docker.rb | ||
Style/OptionalBooleanParameter: | ||
Exclude: | ||
- bin/helpers/common.rb | ||
Lint/UselessAssignment: | ||
Exclude: | ||
- bin/helpers/puma.rb | ||
- bin/helpers/sidekiq.rb | ||
Style/GlobalVars: | ||
Exclude: | ||
- bin/helpers/common.rb | ||
- bin/helpers/helpers.rb | ||
- config/initializers/_REDIS.rb | ||
Metrics/BlockLength: | ||
Exclude: | ||
- config/environments/development.rb |
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,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationCable | ||
class Channel < ActionCable::Channel::Base | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationCable | ||
class Connection < ActionCable::Connection::Base | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
# @articles = ArticlesIndex.query( | ||
# query_string: { | ||
# query: 'Article', | ||
|
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,2 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationController < ActionController::Base | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
module ApplicationHelper | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# frozen_string_literal: true | ||
|
||
module ArticlesHelper | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
class ExampleJob < ApplicationJob | ||
queue_as :default | ||
|
||
# ExampleJob.perform_now | ||
# ExampleJob.perform_later | ||
# ExampleJob.set(wait: 1.week).perform_later() | ||
def perform(*args) | ||
puts "Job is Started" | ||
def perform(*_args) | ||
puts 'Job is Started' | ||
sleep(10) | ||
puts "Job is Finished" | ||
puts 'Job is Finished' | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
class ApplicationRecord < ActiveRecord::Base | ||
primary_abstract_class | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
# rails g model Article | ||
# title:string | ||
# content_raw:text | ||
|
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,14 +1,11 @@ | ||
def chewy_index | ||
puts "Indexing with CHEWY" | ||
container_exec('rails', 'rake chewy:update') | ||
end | ||
# frozen_string_literal: true | ||
|
||
def chewy_index | ||
puts "Indexing with CHEWY" | ||
puts 'Indexing with CHEWY' | ||
container_exec('rails', 'rake chewy:update') | ||
end | ||
|
||
def chewy_reset | ||
puts "Dropping CHEWY indicies" | ||
puts 'Dropping CHEWY indicies' | ||
container_exec('rails', 'rake chewy:reset') | ||
end |
Oops, something went wrong.