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
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.1.0/gems/railties-7.0.8.6/lib/rails/commands/initializers/initializers_command.rb
trusty-cms-7.0.9.1 vendor/bundle/ruby/3.3.0/gems/railties-7.0.8.7/lib/rails/commands/initializers/initializers_command.rb
railties-7.0.8.7 lib/rails/commands/initializers/initializers_command.rb
railties-7.0.8.6 lib/rails/commands/initializers/initializers_command.rb
railties-6.1.7.10 lib/rails/commands/initializers/initializers_command.rb
railties-6.1.7.9 lib/rails/commands/initializers/initializers_command.rb
railties-7.0.8.5 lib/rails/commands/initializers/initializers_command.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/railties-7.0.8.4/lib/rails/commands/initializers/initializers_command.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/railties-7.0.5.1/lib/rails/commands/initializers/initializers_command.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/railties-7.0.5.1/lib/rails/commands/initializers/initializers_command.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/railties-7.0.5.1/lib/rails/commands/initializers/initializers_command.rb
railties-7.0.8.4 lib/rails/commands/initializers/initializers_command.rb
railties-6.1.7.8 lib/rails/commands/initializers/initializers_command.rb
railties-7.0.8.1 lib/rails/commands/initializers/initializers_command.rb
railties-6.1.7.7 lib/rails/commands/initializers/initializers_command.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/railties-7.0.3.1/lib/rails/commands/initializers/initializers_command.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/railties-7.0.2.3/lib/rails/commands/initializers/initializers_command.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/railties-6.1.6.1/lib/rails/commands/initializers/initializers_command.rb
railties-7.0.8 lib/rails/commands/initializers/initializers_command.rb
railties-7.0.7.2 lib/rails/commands/initializers/initializers_command.rb