Sha256: 8a551c7d0f440837bf3859abb25984e2c3c26bd5d7d50578d510e11cc27c6f41

Contents?: true

Size: 628 Bytes

Versions: 121

Compression:

Stored size: 628 Bytes

Contents

# frozen_string_literal: true

require "rails/command/environment_argument"

module Rails
  module Command
    class InitializersCommand < Base # :nodoc:
      include EnvironmentArgument

      desc "initializers", "Print out all defined initializers in the order they are invoked by Rails."
      def perform
        extract_environment_option_from_argument
        ENV["RAILS_ENV"] = options[:environment]

        require_application_and_environment!

        Rails.application.initializers.tsort_each do |initializer|
          say "#{initializer.context_class}.#{initializer.name}"
        end
      end
    end
  end
end

Version data entries

121 entries across 114 versions & 11 rubygems

Version Path
argon-1.3.1 vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.1/lib/rails/commands/initializers/initializers_command.rb
symbolic_enum-1.1.5 vendor/bundle/ruby/2.7.0/gems/railties-6.0.2.1/lib/rails/commands/initializers/initializers_command.rb
railties-6.0.2.1 lib/rails/commands/initializers/initializers_command.rb
railties-6.0.2 lib/rails/commands/initializers/initializers_command.rb
railties-6.0.2.rc2 lib/rails/commands/initializers/initializers_command.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/railties-6.0.1/lib/rails/commands/initializers/initializers_command.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/railties-6.0.0/lib/rails/commands/initializers/initializers_command.rb
railties-6.0.2.rc1 lib/rails/commands/initializers/initializers_command.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/railties-6.0.1/lib/rails/commands/initializers/initializers_command.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/railties-6.0.0/lib/rails/commands/initializers/initializers_command.rb
railties-6.0.1 lib/rails/commands/initializers/initializers_command.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0/lib/rails/commands/initializers/initializers_command.rb
railties-6.0.1.rc1 lib/rails/commands/initializers/initializers_command.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/railties-6.0.0/lib/rails/commands/initializers/initializers_command.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/railties-6.0.0/lib/rails/commands/initializers/initializers_command.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/railties-6.0.0/lib/rails/commands/initializers/initializers_command.rb
zuora_connect_ui-0.8.3 vendor/ruby/2.6.0/gems/railties-6.0.0/lib/rails/commands/initializers/initializers_command.rb
zuora_connect_ui-0.8.2 vendor/ruby/2.6.0/gems/railties-6.0.0/lib/rails/commands/initializers/initializers_command.rb
railties-6.0.0 lib/rails/commands/initializers/initializers_command.rb
railties-6.0.0.rc2 lib/rails/commands/initializers/initializers_command.rb