Sha256: c1e38fa957c3ea6b0d023fb4e04bf2ac5a6a4ddef2c20672be1a150f240bce7c

Contents?: true

Size: 875 Bytes

Versions: 50

Compression:

Stored size: 875 Bytes

Contents

module EffectiveDeveloper
  class Engine < ::Rails::Engine
    engine_name 'effective_developer'

    # Set up our default configuration options.
    initializer 'effective_developer.defaults', before: :load_config_initializers do |app|
      # Set up our defaults, as per our initializer template
      eval File.read("#{config.root}/config/effective_developer.rb")
    end

    # Whenever the effective_resource do block is evaluated, check for changes
    # https://stackoverflow.com/questions/13506690/how-to-determine-if-rails-is-running-from-cli-console-or-as-server
    initializer 'effective_developer.effective_resources' do |app|
      if defined?(Rails::Server) && Rails.env.development? && EffectiveDeveloper.live
        ActiveSupport.on_load :effective_resource do
          Effective::LiveGenerator.new(self).generate!
        end
      end
    end

  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
effective_developer-0.8.5 lib/effective_developer/engine.rb
effective_developer-0.8.4 lib/effective_developer/engine.rb
effective_developer-0.8.3 lib/effective_developer/engine.rb
effective_developer-0.8.2 lib/effective_developer/engine.rb
effective_developer-0.8.1 lib/effective_developer/engine.rb
effective_developer-0.8.0 lib/effective_developer/engine.rb
effective_developer-0.7.8 lib/effective_developer/engine.rb
effective_developer-0.7.7 lib/effective_developer/engine.rb
effective_developer-0.7.6 lib/effective_developer/engine.rb
effective_developer-0.7.5 lib/effective_developer/engine.rb
effective_developer-0.7.4 lib/effective_developer/engine.rb
effective_developer-0.7.3 lib/effective_developer/engine.rb
effective_developer-0.7.2 lib/effective_developer/engine.rb
effective_developer-0.7.1 lib/effective_developer/engine.rb
effective_developer-0.7.0 lib/effective_developer/engine.rb
effective_developer-0.6.17 lib/effective_developer/engine.rb
effective_developer-0.6.16 lib/effective_developer/engine.rb
effective_developer-0.6.15 lib/effective_developer/engine.rb
effective_developer-0.6.14 lib/effective_developer/engine.rb
effective_developer-0.6.13 lib/effective_developer/engine.rb