Aura Aura


The main class.


Aura.root         #=> "~/myapp/root"
Aura.gem_root     #=> "/usr/lib/ruby/gems.../aura-0.0.1"


Aura.files['models/book.rb']   #=> "~/myapp/app/models/book.rb"
Aura.files.glob('css/**/*')    #=> #<Array>


Aura.set '', 'Othello'
Aura.get('')          #=> "Othello"

# Attempts to set the default, but fails because it was
# already set previously.
Aura.default '', 'Talamasca'
puts Aura.get('').inspect
#=> "Othello"



Sinatra plugins

  • Public Allows apps to use more than one public folder.
  • Rendering Allows rendering from multiple engines or renderers.
  • Seeder To be refactored--this sucks

Class methods

  • admin Returns the Admin module.
  • db_dump Returns the database backup as a hash.
  • db_dump_yaml Returns the database backup as a YAML document.
  • db_restore Restores a previous output of db_dump.
  • editor Returns the Editor module.
  • files Returns the Files module.
  • find Finds a record that corresponds to a path.
  • gem_root Returns the root path of the Aura gem.
  • menu Returns the menu items, sorted properly.
  • models Returns a list of models.
  • prerelease? Checks if the Aura version is a prerelease.
  • root Returns the root path of the application.
  • roots Returns all model records without parents.
  • run_migrations! Runs migrations for everything.
  • site_empty? Checks if the site is empty.
  • slugs Returns the Slugs module.
  • version Returns the current version.