Skip to content
Snippets Groups Projects
Commit 7214ad23 authored by Mayank Singh's avatar Mayank Singh :fox:
Browse files

Add .upcase method, disable cop in registry class enum

parent 28d7400c
No related branches found
No related tags found
No related merge requests found
Pipeline #923702147 passed
Pipeline: GitLab Community Fork

#923710313

    Pipeline: GitLab Community Fork

    #923710306

      ......@@ -13,7 +13,8 @@ class RegistryClassEnum < BaseEnum
      ::Geo::Secondary::RegistryConsistencyWorker::REGISTRY_CLASSES.each do |registry_class|
      next unless registry_class.graphql_mutable?
      value registry_class.graphql_enum_key.upcase,
      # Disabling RuboCop: `graphql_enum_key` adheres to the uppercase rule of Graphql/EnumValues.
      value registry_class.graphql_enum_key, # rubocop:disable Graphql/EnumValues
      value: registry_class.to_s,
      description: "#{registry_class} registry class"
      end
      ......
      ......@@ -93,7 +93,7 @@ def self.graphql_mutable?
      # Method to generate a GraphQL enum key based on registry class.
      def self.graphql_enum_key
      self.to_s.gsub('Geo::', '').underscore
      self.to_s.gsub('Geo::', '').underscore.upcase
      end
      # Search for a list of records associated with registries,
      ......
      ......@@ -96,8 +96,8 @@ def self.graphql_field_name
      # @return [String] GraphQL mutation registry class used by registry_class_enum.rb. E.g. "PACKAGE_FILE_REGISTRY"
      def self.graphql_mutation_registry_class
      self.registry_class.graphql_enum_key.upcase
      end
      self.registry_class.graphql_enum_key
      end
      # Return the registry related to the replicable resource
      #
      ......
      ......@@ -15,7 +15,7 @@
      with_them do
      let(:registry) { create(registry_factory) } # rubocop:disable Rails/SaveBang
      let(:registry_class_argument) { registry_class.graphql_enum_key.upcase }
      let(:registry_class_argument) { registry_class.graphql_enum_key }
      let(:registry_model_primary_key) { registry_class::MODEL_FOREIGN_KEY.to_s.camelize(:lower) }
      let(:registry_fragment_name) { registry_class_argument.downcase.camelize }
      let(:registry_global_id) { registry.to_global_id.to_s }
      ......
      0% Loading or .
      You are about to add 0 people to the discussion. Proceed with caution.
      Finish editing this message first!
      Please register or to comment