Skip to content

Commit

Permalink
Rename base configurator
Browse files Browse the repository at this point in the history
  • Loading branch information
apexatoll committed Oct 1, 2023
1 parent 693d5e5 commit 1c9e78f
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/kangaru/configurators.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Configurators
def self.classes
constants.map { |constant| const_get(constant) }
.select { |constant| constant.is_a?(Class) }
.reject { |constant| constant == BaseConfigurator }
.reject { |constant| constant == Configurator }
end
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Kangaru
module Configurators
class BaseConfigurator
class Configurator
using Patches::Inflections

def self.name
Expand Down
2 changes: 1 addition & 1 deletion sig/kangaru/config.rbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Kangaru
class Config
type configurator = Configurators::BaseConfigurator
type configurator = Configurators::Configurator

attr_reader configurators: Hash[Symbol, configurator]

Expand Down
2 changes: 1 addition & 1 deletion sig/kangaru/configurators.rbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Kangaru
module Configurators
def self.classes: -> Array[singleton(BaseConfigurator)]
def self.classes: -> Array[singleton(Configurator)]
end
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Kangaru
module Configurators
class BaseConfigurator
class Configurator
self.@settings: Array[Symbol]

def self.name: -> Symbol
Expand Down
4 changes: 2 additions & 2 deletions spec/kangaru/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
after { described_class.undef_method(name) }

let(:configurator_class) do
class_spy(Kangaru::Configurators::BaseConfigurator, name:)
class_spy(Kangaru::Configurators::Configurator, name:)
end

let(:configurator) do
instance_spy(
Kangaru::Configurators::BaseConfigurator,
Kangaru::Configurators::Configurator,
serialise: configurator_hash
)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RSpec.describe Kangaru::Configurators::BaseConfigurator do
RSpec.describe Kangaru::Configurators::Configurator do
describe ".name" do
subject(:name) { configurator_class.name }

Expand Down

0 comments on commit 1c9e78f

Please sign in to comment.