From 257d0a3130598d7ab96652970900e49a995843f9 Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Mon, 4 Dec 2023 15:36:17 -0500 Subject: [PATCH] Fix rubocop issues --- .rubocop.yml | 5 ++++- nulogy_graphql_api.gemspec | 3 ++- spec/integration_spec_helper.rb | 2 +- .../lib/nulogy_graphql_api/graphql_api_controller_spec.rb | 2 ++ .../lib/nulogy_graphql_api/graphql_base_controller_spec.rb | 2 ++ 5 files changed, 11 insertions(+), 3 deletions(-) rename spec/{integration => requests}/lib/nulogy_graphql_api/graphql_api_controller_spec.rb (96%) rename spec/{integration => requests}/lib/nulogy_graphql_api/graphql_base_controller_spec.rb (96%) diff --git a/.rubocop.yml b/.rubocop.yml index 1955765..336033b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,7 +10,7 @@ AllCops: NewCops: enable TargetRubyVersion: 2.7 -Gemspec/DateAssignment: +Gemspec/DeprecatedAttributeAssignment: Enabled: true Layout/EmptyLinesAroundAttributeAccessor: @@ -135,6 +135,9 @@ RSpec/MessageSpies: RSpec/NotToNot: EnforcedStyle: to_not +RSpec/Rails/InferredSpecType: + Enabled: false + Style/AccessorGrouping: Enabled: true diff --git a/nulogy_graphql_api.gemspec b/nulogy_graphql_api.gemspec index b529d7c..264ff7c 100644 --- a/nulogy_graphql_api.gemspec +++ b/nulogy_graphql_api.gemspec @@ -14,7 +14,8 @@ Gem::Specification.new do |spec| "homepage_uri" => "https://github.com/nulogy/nulogy_graphql_api", "changelog_uri" => "https://github.com/nulogy/nulogy_graphql_api/blob/master/CHANGELOG.md", "source_code_uri" => "https://github.com/nulogy/nulogy_graphql_api", - "bug_tracker_uri" => "https://github.com/nulogy/nulogy_graphql_api/issues" + "bug_tracker_uri" => "https://github.com/nulogy/nulogy_graphql_api/issues", + "rubygems_mfa_required" => "true" } spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0") diff --git a/spec/integration_spec_helper.rb b/spec/integration_spec_helper.rb index 8baf7f1..8768ae0 100644 --- a/spec/integration_spec_helper.rb +++ b/spec/integration_spec_helper.rb @@ -8,7 +8,7 @@ require "rspec/rails" require "active_record" require "nulogy_graphql_api/rspec" -require_relative "./helpers/db_helpers" +require_relative "helpers/db_helpers" RSpec.configure do |config| # Uncomment this line to see full backtraces for spec failures diff --git a/spec/integration/lib/nulogy_graphql_api/graphql_api_controller_spec.rb b/spec/requests/lib/nulogy_graphql_api/graphql_api_controller_spec.rb similarity index 96% rename from spec/integration/lib/nulogy_graphql_api/graphql_api_controller_spec.rb rename to spec/requests/lib/nulogy_graphql_api/graphql_api_controller_spec.rb index 813b50a..424abaa 100644 --- a/spec/integration/lib/nulogy_graphql_api/graphql_api_controller_spec.rb +++ b/spec/requests/lib/nulogy_graphql_api/graphql_api_controller_spec.rb @@ -1,4 +1,5 @@ # rubocop:disable RSpec/FilePath +# rubocop:disable RSpec/SpecFilePathFormat RSpec.describe DummyApiController, :graphql, type: :request do it "returns graphql response" do query = <<~GRAPHQL @@ -87,3 +88,4 @@ def consider_all_requests_non_local end end # rubocop:enable RSpec/FilePath +# rubocop:enable RSpec/SpecFilePathFormat diff --git a/spec/integration/lib/nulogy_graphql_api/graphql_base_controller_spec.rb b/spec/requests/lib/nulogy_graphql_api/graphql_base_controller_spec.rb similarity index 96% rename from spec/integration/lib/nulogy_graphql_api/graphql_base_controller_spec.rb rename to spec/requests/lib/nulogy_graphql_api/graphql_base_controller_spec.rb index a13bba5..9a62039 100644 --- a/spec/integration/lib/nulogy_graphql_api/graphql_base_controller_spec.rb +++ b/spec/requests/lib/nulogy_graphql_api/graphql_base_controller_spec.rb @@ -1,4 +1,5 @@ # rubocop:disable RSpec/FilePath +# rubocop:disable RSpec/SpecFilePathFormat RSpec.describe DummyBaseController, type: :request do it "returns Not Found when requesting an entity that does not exist" do get "/graphql_api/dummy_base/test_record_not_found" @@ -65,3 +66,4 @@ def consider_all_requests_non_local end end # rubocop:enable RSpec/FilePath +# rubocop:enable RSpec/SpecFilePathFormat