From 06267c40b6da6a9acca58c66de7e87747e56dc94 Mon Sep 17 00:00:00 2001 From: Parth Chandgadhiya <73950482+Parth-Rewind@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:26:19 -0600 Subject: [PATCH] Refactor file names to follow rubygem guideline --- .rubocop.yml | 10 ++++++---- .../azure_devops}/version.rb | 2 +- lib/{omniauth => omni_auth}/strategies/azure_devops.rb | 0 lib/omniauth-azure-devops.rb | 4 ---- lib/omniauth_azure_devops.rb | 4 ++++ omniauth-azure-devops.gemspec | 4 ++-- spec/omni_auth/azure_devops/version_spec.rb | 7 +++++++ .../strategies/azure_devops_spec.rb | 0 spec/omniauth-azure-devops/version_spec.rb | 7 ------- spec/spec_helper.rb | 2 +- 10 files changed, 21 insertions(+), 19 deletions(-) rename lib/{omniauth-azure-devops => omni_auth/azure_devops}/version.rb (84%) rename lib/{omniauth => omni_auth}/strategies/azure_devops.rb (100%) delete mode 100644 lib/omniauth-azure-devops.rb create mode 100644 lib/omniauth_azure_devops.rb create mode 100644 spec/omni_auth/azure_devops/version_spec.rb rename spec/{omniauth => omni_auth}/strategies/azure_devops_spec.rb (100%) delete mode 100644 spec/omniauth-azure-devops/version_spec.rb diff --git a/.rubocop.yml b/.rubocop.yml index 3c852f9..bdace35 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -46,8 +46,8 @@ Metrics/PerceivedComplexity: Enabled: false # Naming cop configuration -Naming/FileName: - Enabled: false +#Naming/FileName: +# Enabled: false Naming/MethodParameterName: Enabled: true Exclude: @@ -80,9 +80,11 @@ RSpec/NestedGroups: RSpec/VerifiedDoubleReference: Enabled: false RSpec/FilePath: - Enabled: false + Exclude: + - spec/omni_auth/azure_devops/version_spec.rb RSpec/SpecFilePathFormat: - Enabled: false + Exclude: + - spec/omni_auth/azure_devops/version_spec.rb # Style cop configuration Style/ArgumentsForwarding: diff --git a/lib/omniauth-azure-devops/version.rb b/lib/omni_auth/azure_devops/version.rb similarity index 84% rename from lib/omniauth-azure-devops/version.rb rename to lib/omni_auth/azure_devops/version.rb index 222a82c..521d2c0 100644 --- a/lib/omniauth-azure-devops/version.rb +++ b/lib/omni_auth/azure_devops/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -module Omniauth +module OmniAuth module AzureDevops VERSION = '1.1.0' end diff --git a/lib/omniauth/strategies/azure_devops.rb b/lib/omni_auth/strategies/azure_devops.rb similarity index 100% rename from lib/omniauth/strategies/azure_devops.rb rename to lib/omni_auth/strategies/azure_devops.rb diff --git a/lib/omniauth-azure-devops.rb b/lib/omniauth-azure-devops.rb deleted file mode 100644 index e99f365..0000000 --- a/lib/omniauth-azure-devops.rb +++ /dev/null @@ -1,4 +0,0 @@ -# frozen_string_literal: true - -require 'omniauth-azure-devops/version' -require 'omniauth/strategies/azure_devops' diff --git a/lib/omniauth_azure_devops.rb b/lib/omniauth_azure_devops.rb new file mode 100644 index 0000000..a41214a --- /dev/null +++ b/lib/omniauth_azure_devops.rb @@ -0,0 +1,4 @@ +# frozen_string_literal: true + +require 'omni_auth/azure_devops/version' +require 'omni_auth/strategies/azure_devops' diff --git a/omniauth-azure-devops.gemspec b/omniauth-azure-devops.gemspec index d199def..0445d69 100644 --- a/omniauth-azure-devops.gemspec +++ b/omniauth-azure-devops.gemspec @@ -1,10 +1,10 @@ # frozen_string_literal: true -require File.expand_path('lib/omniauth-azure-devops/version', __dir__) +require File.expand_path('lib/omni_auth/azure_devops/version', __dir__) Gem::Specification.new do |gem| gem.name = 'omniauth-azure-devops' - gem.version = Omniauth::AzureDevops::VERSION + gem.version = OmniAuth::AzureDevops::VERSION gem.authors = ['Rewind Software Inc. | Parth Chandgadhiya'] gem.email = ['team@rewind.io'] diff --git a/spec/omni_auth/azure_devops/version_spec.rb b/spec/omni_auth/azure_devops/version_spec.rb new file mode 100644 index 0000000..fbf4e5c --- /dev/null +++ b/spec/omni_auth/azure_devops/version_spec.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +describe OmniAuth::AzureDevops do + it 'has a version number' do + expect(OmniAuth::AzureDevops::VERSION).not_to be_nil + end +end diff --git a/spec/omniauth/strategies/azure_devops_spec.rb b/spec/omni_auth/strategies/azure_devops_spec.rb similarity index 100% rename from spec/omniauth/strategies/azure_devops_spec.rb rename to spec/omni_auth/strategies/azure_devops_spec.rb diff --git a/spec/omniauth-azure-devops/version_spec.rb b/spec/omniauth-azure-devops/version_spec.rb deleted file mode 100644 index 6b398ff..0000000 --- a/spec/omniauth-azure-devops/version_spec.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -describe Omniauth::AzureDevops do - it 'has a version number' do - expect(Omniauth::AzureDevops::VERSION).not_to be_nil - end -end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 728be62..8bca50c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -17,7 +17,7 @@ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration RSpec.configure do |config| require 'omniauth' - require 'omniauth-azure-devops' + require 'omniauth_azure_devops' config.extend OmniAuth::Test::StrategyMacros, type: :strategy OmniAuth.config.test_mode = true