Sha256: 9868398f159d4ec842e650d611aabb23a3e95836fd8a569f0c98559a6ee058ab

Contents?: true

Size: 394 Bytes

Versions: 11

Compression:

Stored size: 394 Bytes

Contents

module EmberCLI
  class Middleware
    def initialize(app)
      @app = app
    end

    def call(env)
      enable_ember_cli
      EmberCLI.wait!

      @app.call(env)
    end

    private

    def enable_ember_cli
      @enabled ||= begin
        if Rails.env.development?
          EmberCLI.run!
        else
          EmberCLI.compile!
        end

        true
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ember-cli-rails-0.1.1 lib/ember-cli/middleware.rb
ember-cli-rails-0.1.0 lib/ember-cli/middleware.rb
ember-cli-rails-0.0.18 lib/ember-cli/middleware.rb
ember-cli-rails-0.0.17 lib/ember-cli/middleware.rb
ember-cli-rails-0.0.16 lib/ember-cli/middleware.rb
ember-cli-rails-0.0.15 lib/ember-cli/middleware.rb
ember-cli-rails-0.0.14 lib/ember-cli/middleware.rb
ember-cli-rails-0.0.13 lib/ember-cli/middleware.rb
ember-cli-rails-0.0.12 lib/ember-cli/middleware.rb
ember-cli-rails-0.0.11 lib/ember-cli/middleware.rb
ember-cli-rails-0.0.10 lib/ember-cli/middleware.rb