Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
version: '2'
# Work around CodeClimate's inability to use Rubocop's inherit_gem directive:
# https://github.com/codeclimate/codeclimate-rubocop/issues/71#issuecomment-635055223
prepare:
fetch:
- url: https://raw.githubusercontent.com/GSA/searchgov_style/main/.default.yml
path: .rubocop-https---raw-githubusercontent-com-GSA-searchgov-style-main--default-yml
plugins:
brakeman:
enabled: true
Expand All @@ -16,17 +10,17 @@ plugins:
enabled: true
config:
languages:
- ruby
- ruby
exclude_patterns:
- "spec/"
- "spec/"
eslint:
enabled: true
fixme:
enabled: true
rubocop:
enabled: true
channel: rubocop-1-48-1
channel: rubocop-1-65-0
exclude_patterns:
- bin/
- vendor/
- coverage/
- bin/
- vendor/
- coverage/
28 changes: 10 additions & 18 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
# Work around CodeClimate's inability to use Rubocop's inherit_gem directive:
# https://github.com/codeclimate/codeclimate-rubocop/issues/71#issuecomment-635055223
inherit_from:
- https://raw.githubusercontent.com/GSA/searchgov_style/main/.default.yml
inherit_from: .rubocop_todo.yml

AllCops:
NewCops: enable

require:
- rubocop-performance
- rubocop-rails
- rubocop-rake
- rubocop-rspec

inherit_mode:
merge:
- Exclude

Metrics/ClassLength:
Exclude:
# Much of this class is made up of a long #body method which mimics the structure
# of a complex Elasticsearch query using the Elasticsearch DSL. (Method/Block ength cops are already
# disabled inline for that specific method.)
- app/classes/document_query.rb

Style/MethodCallWithArgsParentheses:
Exclude:
# Methods in this file uses the the Elasticsearch DSL and, as such, they fall under the rule "Always omit
# parentheses for methods that are part of an internal DSL":
# https://rubystyle.guide/#methods-that-are-part-of-an-internal-dsl
- app/classes/document_query.rb
19 changes: 19 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2025-04-01 21:22:59 UTC using RuboCop version 1.75.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: 1
RSpec/BeforeAfterAll:
Exclude:
- 'spec/requests/api/v1/documents_spec.rb'

# Offense count: 2
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/classes/query_parser_spec.rb'
24 changes: 12 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
# frozen_string_literal: true
source 'https://rubygems.org'

gem "elasticsearch-persistence", '~> 6.0'
gem "rails_semantic_logger", "~> 4.14"
gem 'dotenv', '~> 3.1'
gem 'elasticsearch', '~> 6.0'
gem 'elasticsearch-dsl', '~> 0.1.9'
gem 'elasticsearch-persistence', '~> 6.0'
gem 'grape', '~> 1.7.0'
gem 'jbuilder', '~> 2.7'
gem 'newrelic_rpm', '~> 9.10'
gem 'puma', '~> 5.6'
gem 'rack', '~> 2.2.8'
gem 'rack-cors', '~> 1.0.5'
gem 'rails', '~> 7.1.0'
gem 'rails_semantic_logger', '~> 4.14'
gem 'rake', '~> 13.0.0'
gem 'typhoeus', '~> 1.4.0'
gem 'virtus', '~> 1.0' # Virtus is no longer supported. Consider replacing with ActiveModel::Attributes

group :development, :test do
gem 'awesome_print', '~> 1.8' #To enable in Pry: https://github.com/awesome-print/awesome_print#pry-integration
gem 'capistrano', require: false
gem 'capistrano3-puma', require: false
gem 'capistrano-newrelic', require: false
gem 'capistrano-rails', require: false
gem 'capistrano-rbenv', require: false
gem 'capistrano3-puma', '~> 5.2.0', require: false
gem 'debug'
gem 'listen'
gem 'pry-byebug', '~> 3.4'
gem 'pry-rails', '~> 0.3'
gem 'rspec-rails', '~> 3.7'
end

group :development do
# Bumping searchgov_style? Be sure to update the Rubocop channel
# in .codeclimate.yml to match the channel in searchgov_style
# https://github.com/GSA/searchgov_style/blob/main/.codeclimate.yml
gem 'searchgov_style', '~> 0.1', require: false
gem 'rubocop', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rails', require: false
gem 'rubocop-rake', require: false
gem 'rubocop-rspec', require: false
end

group :test do
gem 'simplecov', '~> 0.13.0', require: false
gem "codeclimate-test-reporter", '~> 1.0.8', require: nil
gem 'codeclimate-test-reporter', '~> 1.0.8', require: nil
gem 'shoulda', '~> 4.0'
gem 'simplecov', '~> 0.13.0', require: false
end
Loading
Loading