Top Level Namespace

Defined Under Namespace

Modules: AppGem, FileSet, Hooks, Kernel, LibDemo, Middleman, ObjectSpace, Outer, Padrino, PadrinoTasks, SupportLite, Webrat Classes: Address, ColoredIO, Complex1Demo, Complex2Demo, E, F, FastImage, FooError, G, HooksTest, HttpRouter, MarkupDemo, MarkupUser, Module, MyExtension, PadrinoPristine, PadrinoTestApp, PadrinoTestApp2, Permission, RenderDemo, RenderUser, SimpleDemo, String, Symbol, Telephone

Constant Summary collapse

MIDDLEMAN_ROOT_PATH =
File.dirname(File.dirname(File.dirname(__FILE__)))
MIDDLEMAN_BIN_PATH =
File.join(MIDDLEMAN_ROOT_PATH, "bin")
PROJECT_ROOT_PATH =
File.dirname(File.dirname(File.dirname(__FILE__)))
PADRINO_ROOT =

The Padrino project root path (falls back to the first caller)

File.dirname(__FILE__)
PADRINO_ENV =

The Padrino environment (falls back to the rack env or finally develop)

'test'
PADRINO_LOG_LEVEL =

Defines the log level for a Padrino project.

ENV['PADRINO_LOG_LEVEL']
PADRINO_LOGGER =

Defines the logger used for a Padrino project.

ENV['PADRINO_LOGGER']
A_result =

But here we need some of b.rb

[B, C]
A =
"A"
B_result =

But here we need some of c.rb and a.rb

C
B =
"B"
C =
"C"
D =
0

Instance Method Summary collapse

Instance Method Details

#applicationsObject

Show applications



7
8
9
10
11
12
13
14
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/cli/console.rb', line 7

def applications
  puts "==== List of Mounted Applications ====\n\n"
  Padrino.mounted_apps.each do |app|
    puts " * %-10s mapped to      %s" % [app.name, app.uri_root]
  end
  puts
  Padrino.mounted_apps.map { |app| "#{app.name} => #{app.uri_root}" }
end

#list_app_routes(app, args) ⇒ Object

lists all routes of a given app



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/cli/rake_tasks.rb', line 26

def list_app_routes(app, args)
  app_routes = app.named_routes
  app_routes.reject! { |r| r.identifier.to_s !~ /#{args.query}/ } if args.query.present?
  app_routes.map! { |r| [r.verb, r.name, r.path] }
  return if app_routes.empty?
  shell.say "\nApplication: #{app.app_class}", :yellow
  app_routes.unshift(["REQUEST", "URL", "PATH"])
  max_col_1 = app_routes.max { |a, b| a[0].size <=> b[0].size }[0].size
  max_col_2 = app_routes.max { |a, b| a[1].size <=> b[1].size }[1].size
  app_routes.each_with_index do |row, i|
    message = [row[1].ljust(max_col_2+2), row[0].center(max_col_1+2), row[2]]
    shell.say("    " + message.join(" "), i==0 ? :bold : nil)
  end
end

#reload!Object

Reloads classes



2
3
4
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/cli/console.rb', line 2

def reload!
  Padrino.reload!
end

#shellObject



45
46
47
# File 'lib/vendored-middleman-deps/padrino-core-0.11.2/lib/padrino-core/cli/rake.rb', line 45

def shell
  @_shell ||= Thor::Base.shell.new
end