Sha256: 6f44e767cc99c5d053aea7c2f051a8fb0af988cea9de344c235590c689ed5e13

Contents?: true

Size: 510 Bytes

Versions: 16

Compression:

Stored size: 510 Bytes

Contents

module Rib; end
module Rib::Auto
  module_function
  def load
    app, name = %w[ramaze rails rack].find{ |name|
      require "rib/app/#{name}"
      app = Rib.const_get(name.capitalize)
      if app.send("#{name}?")
        break app, name
      end
    }

    if app
      Rib.say("Found #{name.capitalize}, loading it...")
      begin
        app.load
      rescue LoadError => e
        Rib.warn("Error: #{e}", "Is this a #{app} app?")
      end
    else
      Rib.warn("No app found")
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rib-1.3.1 lib/rib/app/auto.rb
rib-1.3.0 lib/rib/app/auto.rb
rib-1.2.91 lib/rib/app/auto.rb
rib-1.2.9 lib/rib/app/auto.rb
rib-1.2.8 lib/rib/app/auto.rb
rib-1.2.7 lib/rib/app/auto.rb
rib-1.2.6 lib/rib/app/auto.rb
rib-1.2.5 lib/rib/app/auto.rb
rib-1.2.4 lib/rib/app/auto.rb
rib-1.2.3 lib/rib/app/auto.rb
rib-1.2.2 lib/rib/app/auto.rb
rib-1.2.1 lib/rib/app/auto.rb
rib-1.2.0 lib/rib/app/auto.rb
rib-1.1.6 lib/rib/app/auto.rb
rib-1.1.5 lib/rib/app/auto.rb
rib-1.1.4 lib/rib/app/auto.rb