diff --git a/lib/fx.rb b/lib/fx.rb index c46508f..797a315 100644 --- a/lib/fx.rb +++ b/lib/fx.rb @@ -28,7 +28,7 @@ def self.load # @return [Fx::Configuration] F(x)'s current configuration def self.configuration - @_configuration ||= Configuration.new + @_configuration ||= Fx::Configuration.new end # Set F(x)'s configuration diff --git a/lib/fx/adapters/postgres.rb b/lib/fx/adapters/postgres.rb index f87a6a0..c6fb839 100644 --- a/lib/fx/adapters/postgres.rb +++ b/lib/fx/adapters/postgres.rb @@ -47,7 +47,7 @@ def initialize(connectable = ActiveRecord::Base) # # @return [Array] def functions - Functions.all(connection) + Fx::Adapters::Postgres::Functions.all(connection) end # Returns an array of triggers in the database. @@ -57,7 +57,7 @@ def functions # # @return [Array] def triggers - Triggers.all(connection) + Fx::Adapters::Postgres::Triggers.all(connection) end # Creates a function in the database. @@ -152,7 +152,7 @@ def drop_trigger(name, on:) delegate :execute, to: :connection def connection - Connection.new(connectable.connection) + Fx::Adapters::Postgres::Connection.new(connectable.connection) end end end diff --git a/lib/fx/adapters/postgres/functions.rb b/lib/fx/adapters/postgres/functions.rb index 80165e3..cf5d336 100644 --- a/lib/fx/adapters/postgres/functions.rb +++ b/lib/fx/adapters/postgres/functions.rb @@ -30,7 +30,7 @@ class Functions # # @return [Array] def self.all(connection) - QueryExecutor.call( + Fx::Adapters::Postgres::QueryExecutor.call( connection: connection, query: FUNCTIONS_WITH_DEFINITIONS_QUERY, model_class: Fx::Function diff --git a/lib/fx/adapters/postgres/triggers.rb b/lib/fx/adapters/postgres/triggers.rb index cfe199a..5451f40 100644 --- a/lib/fx/adapters/postgres/triggers.rb +++ b/lib/fx/adapters/postgres/triggers.rb @@ -30,7 +30,7 @@ class Triggers # # @return [Array] def self.all(connection) - QueryExecutor.call( + Fx::Adapters::Postgres::QueryExecutor.call( connection: connection, query: TRIGGERS_WITH_DEFINITIONS_QUERY, model_class: Fx::Trigger diff --git a/lib/generators/fx/function/function_generator.rb b/lib/generators/fx/function/function_generator.rb index 6ecee3b..74af934 100644 --- a/lib/generators/fx/function/function_generator.rb +++ b/lib/generators/fx/function/function_generator.rb @@ -72,7 +72,7 @@ def migration_class_name end def formatted_name - NameHelper.format_for_migration(singular_name) + Fx::Generators::NameHelper.format_for_migration(singular_name) end end diff --git a/lib/generators/fx/trigger/trigger_generator.rb b/lib/generators/fx/trigger/trigger_generator.rb index b64453e..eefb54a 100644 --- a/lib/generators/fx/trigger/trigger_generator.rb +++ b/lib/generators/fx/trigger/trigger_generator.rb @@ -66,11 +66,11 @@ def migration_class_name end def formatted_name - NameHelper.format_for_migration(singular_name) + Fx::Generators::NameHelper.format_for_migration(singular_name) end def formatted_table_name - NameHelper.format_table_name_from_hash(table_name) + Fx::Generators::NameHelper.format_table_name_from_hash(table_name) end end