Skip to content

Commit

Permalink
Order requirements alphabetically
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermoap committed Sep 20, 2023
1 parent 2070ba4 commit 2801f75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/active_outbox.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true

require 'active_outbox/adapter_helper'
require 'active_outbox/configuration'
require 'active_outbox/errors'
require 'active_outbox/outboxable'
require 'active_outbox/adapter_helper'
require 'active_outbox/generators/active_outbox_generator'
require 'active_outbox/outboxable'
require 'active_outbox/railtie' if defined?(Rails::Railtie)
2 changes: 1 addition & 1 deletion lib/active_outbox/outboxable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def save!(**options, &block)

def create_outbox!(action, event_name)
unless self.class.module_parent.const_defined?('OUTBOX_MODEL')
*namespace, _ = self.class.name.underscore.upcase.split('/')
*namespace, _klass = self.class.name.underscore.upcase.split('/')
namespace.reverse.join('.')
outbox_model_name = ActiveOutbox.configuration.outbox_mapping[self.class.module_parent.name.underscore] ||
ActiveOutbox.configuration.outbox_mapping['default']
Expand Down
5 changes: 3 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

ENV['RAILS_ENV'] ||= 'test'

require 'active_record'
require 'active_outbox'
require 'active_record'
require 'byebug'
require 'simplecov'
require 'database_cleaner/active_record'
require 'simplecov'

SimpleCov.start 'rails' do
add_filter 'spec/'
Expand Down Expand Up @@ -39,6 +39,7 @@ def self.name

validates_presence_of :identifier, :payload, :aggregate, :aggregate_identifier, :event
end

FakeModel = Class.new(ActiveRecord::Base) do
def self.name
'FakeModel'
Expand Down

0 comments on commit 2801f75

Please sign in to comment.