code
stringlengths
1
1.73M
language
stringclasses
1 value
require 'zerenity/base' module Zerenity # Creates a calendar dialog allowing the user to select a date. Returns # a Time object representing the selected date or nil if Cancel is # clicked. # # ==== Example Usage # date = Zerenity::Calendar(:text=>"Please select a date") def self.Calendar(options={}) ...
Ruby
require 'zerenity/messagedialog' module Zerenity # Displays an error dialog. # ====Example Usage # Zerenity::Error(:text=>"An error has occured. Please check the system log.") def self.Error(options={}) Error.run(options) end class Error < MessageDialog # :nodoc: def self.check(options) ...
Ruby
require('zerenity/base') module Zerenity # Displays a list dialog on the screen. Items in the list # can be selected. Returns the rows which were selected # or nil if Cancel is clicked. # # ====Options # [:columns] The names which will be displayed at the top og # each column. This option is...
Ruby
require('zerenity/base') module Zerenity # Displays a text entry box. Returns the text entered or nil if # Cancel is pressed. # # ====Options # [:password] When set to true all all characters in the text # entry area will be masked by the '*' character. # ====Example Usage # name = Zereni...
Ruby
require('zerenity/base') module Zerenity # Displays a progress bar which can be updated via a processing # block which is passed a ProgressProxy object. # # ====Options # [:autoClose] The dialog will automatically close once the # progressing block is complete. # [:cancellable] If set to true...
Ruby
require('zerenity/base') module Zerenity # Displays a sliding scale. Returns the value selected or nil if # cancel is pressed. # # ====Options # [:min] The minimum value of the sliding scale. Defaults to 0. # [:max] The maximum value of the sliding scale. Defaults to 100. # [:step] The size of the value ...
Ruby
require 'zerenity/messagedialog' module Zerenity # Displays a warning dialog on the screen. # # ====Example Usage # Zerenity::Warning(:text=>"This operation can cause data corruption if interrupted") def self.Warning(options={}) Warning.run(options) end class Warning < MessageDialog # :nodoc: ...
Ruby
require 'zerenity/base' module Zerenity # Displays a file/directory selection dialog. Returns the name(s) # of the files/directories chosen or nil if Cancel is pressed. # # ====Options # [:filename] The file to selected initially # [:multiple] If set to true multiple files/directories can be selected # ...
Ruby
require 'gtk2' # Zerenity provides a number of simple graphical dialogs. # # ==== Global Options # [:title] The text displayed in the title bar. # [:text] The text that will be displayed in the dialog (if needed). # [:activatesDefault] If set to false disables the firing of the OK # button when the...
Ruby
require('zerenity/messagedialog') module Zerenity # Displays a question dialog. Returns true if OK is clicked, false if # Cancel is clicked. # # ====Example Useage # if Zerenity::Question(:text=>"Continue processing?") # post_process_files() # end def self.Question(options={}) Question.run(op...
Ruby
require 'zerenity/base' module Zerenity class MessageDialog < Base # :nodoc: def self.build(dialog,options) options[:ok_button] = dialog.add_button(Gtk::Stock::OK,Gtk::Dialog::RESPONSE_OK) dialog.set_default_response(Gtk::Dialog::RESPONSE_OK) end def self.run(options={}) Gtk.init...
Ruby
require('test/unit') require('gtk2') require('zerenity/fileselection') class TC_FileSelection < Test::Unit::TestCase def setup Gtk.init @options={} @dialog=Gtk::Dialog.new end def test_check_normal Zerenity::FileSelection.check(@options) assert_equal(Gtk::FileChooser::ACTION_OPEN,@options[:a...
Ruby
require('test/unit') require('gtk2') require('zerenity/messagedialog') class TC_MessageDialog < Test::Unit::TestCase def setup Gtk.init @options={} @dialog = Gtk::Dialog.new end def test_build_normal Zerenity::MessageDialog.build(@dialog,@options) assert_nil(@options[:cancel_button]) end e...
Ruby
require('test/unit') require('gtk2') require('zerenity/info') class TC_Info < Test::Unit::TestCase def setup Gtk.init @options={} @dialog=Gtk::Dialog.new end def test_check_normal Zerenity::Info.check(@options) assert_equal(Gtk::MessageDialog::INFO,@options[:type]) end end
Ruby
require('test/unit') require('gtk2') require('zerenity/question') class TC_Question < Test::Unit::TestCase def setup Gtk.init @options = {:text=>"Do you wish to continue"} @dialog = Gtk::Dialog.new end def test_check Zerenity::Question.check(@options) assert_equal("Do you wish to continue",@...
Ruby
require('test/unit') require('zerenity/base') class TC_Base < Test::Unit::TestCase def setup Gtk.init @options={} @dialog=Gtk::Dialog.new end def test_check_normal Zerenity::Base.check(@options) assert(@options[:activatesDefault]) assert_equal("",@options[:title]) assert_equal("",@op...
Ruby
require('test/unit') require('gtk2') require('zerenity/warning') class TC_Waring < Test::Unit::TestCase def setup Gtk.init @options={} @dialog = Gtk::Dialog.new end def test_build_normal Zerenity::Warning.check(@options) assert_equal(Gtk::MessageDialog::WARNING,@options[:type]) end end
Ruby
require('test/unit') require('gtk2') require('zerenity/scale') class TC_Scale < Test::Unit::TestCase def setup Gtk.init @options = {} @dialog = Gtk::Dialog.new end def test_check_normal assert_nothing_raised{Zerenity::Scale.check(@options)} assert_equal(0,@options[:initial]) assert_equal...
Ruby
require('test/unit') require('gtk2') require('zerenity/textinfo') class TC_TextInfo < Test::Unit::TestCase def setup Gtk.init #Prevents segmentation fault @options = {} @dialog = Gtk::Dialog.new end def test_check_normal Zerenity::TextInfo.check(@options) assert_equal(false,@options[:editabl...
Ruby
require('test/unit') require('zerenity/progress') class TC_Progress < Test::Unit::TestCase def setup Gtk.init @options = {:title=>"Operation in progress",:text=>"Building index..."} @dialog = Gtk::Dialog.new @hButtonBox = Gtk::HButtonBox.new @hButtonBox.add(Gtk::Button.new) @hButtonBox.add(Gt...
Ruby
require('zerenity/entry') class TC_Entry < Test::Unit::TestCase def setup Gtk.init @options = {:title=>"Enter your name",:text=>"Enter your name"} @dialog = Gtk::Dialog.new end def test_build_normal Zerenity::Entry.build(@dialog,@options) assert_equal(true,@dialog.vbox.children[1].visibility...
Ruby
require ('test/unit') require('test/tc_list') require('test/tc_progress') require('test/tc_question') require('test/tc_textinfo') require('test/tc_entry') require('test/tc_base') require('test/tc_calendar') require('test/tc_fileselection') require('test/tc_info') require('test/tc_messagedialog') require('test/tc_scale'...
Ruby
require('test/unit') require('gtk2') require('zerenity/calendar') class TC_Calender < Test::Unit::TestCase def setup Gtk.init @options={:text=>"Select a date"} @dialog=Gtk::Dialog.new end def test_build_normal Zerenity::Calendar.build(@dialog,@options) assert_equal(Gtk::Label,@dialog.vbox...
Ruby
require('test/unit') require('gtk2') require('zerenity/list') class TC_List < Test::Unit::TestCase def setup Gtk.init @options = {:columns=>["Snack","Energy(KJ)"],:data=>[["Beer","300"],["Chips","500"],["Chocolate","750"]]} @dialog = Gtk::Dialog.new end def test_check_normal assert_nothing_raise...
Ruby
require('zerenity/textinfo') Zerenity::TextInfo(:title=>"Source file: #{$0}",:text=>File.new($0).read) text = Zerenity::TextInfo(:title=>"Editable Text",:editable=>true) if text puts "You entered:" puts text else puts "You clicked cancel" end
Ruby
require('zerenity/entry') text = Zerenity::Entry(:text=>"Please enter your name") puts "Hello #{text}" if text puts "You did not enter your name" unless text text = Zerenity::Entry(:text=>"Please enter your password",:password=>true) puts "Your password is: #{text}" if text puts "You did not enter your password" unle...
Ruby
require('zerenity/list') choice = Zerenity::List(:columns=>["Food","Energy"],:data=>[["Chips","200KJ"],["Chocolate","300KJ"]]) choice ? puts("You chose #{choice[0]} which has #{choice[1]} of energy.") : puts("You didn't choose an item.") choice = Zerenity::List(:columns=>["Selected","Food","Energy"],:data=>[[true,"C...
Ruby
require("zerenity/info") Zerenity::Info(:text=>"Hello, world",:title=>"Hello!")
Ruby
require('zerenity/question') choice = Zerenity::Question(:text=>"Process images?") choice ? (puts "OK") : (puts "CANCEL")
Ruby
require('zerenity/fileselection') fileName = Zerenity::FileSelection(:title=>"Which file do you want?",:filename=>File.expand_path(__FILE__),:action=>:open) puts "You chose #{fileName}" if fileName puts "You did not select a file" unless fileName fileNames = Zerenity::FileSelection(:title=>"Please choose the require...
Ruby
require 'zerenity/error' Zerenity::Error(:text=>"An error has occured.",:title=>"Oops!")
Ruby
require 'zerenity/warning' Zerenity::Warning(:text=>"An error could occur",:title=>"Danger!")
Ruby
require('zerenity/calendar') date = Zerenity::Calendar(:text=>"What day is your birthday?",:title=>"Please select a date") puts "You selected #{date.to_s}" if date puts "You didn't select a date" unless date
Ruby
require('zerenity/progress') Zerenity::Progress(:title=>"Normal",:text=>"Building index") do |progress| 0.step(1,0.01) do |number| progress.update(number,"#{(number*100).to_i}%") sleep(0.02) end end Zerenity::Progress(:title=>"Normal pulse",:text=>"Querying Database") do |progress| 0.step(1,0.01) do ...
Ruby
require('zerenity/base') require('zerenity/calendar') require('zerenity/entry') require('zerenity/error') require('zerenity/fileselection') require('zerenity/info') require('zerenity/list') require('zerenity/messagedialog') require('zerenity/progress') require('zerenity/question') require('zerenity/scale') require('zer...
Ruby
require 'zerenity/messagedialog' module Zerenity # Displays an informational popup dialog on the screen. # # ====Examle Usage # Zerenity::Info(:text=>"Processing has completed.") def Zerenity::Info(options={}) Info.run(options) end class Info < MessageDialog # :nodoc: def self.check(options)...
Ruby
require('zerenity/base') module Zerenity # Displays text in a multiline text info box. # # ====Options # [:editable] If set to true the text info box is editable. # [:scrollable] If the size of the text does not fit in the # height and width constraints, the text info box will become # ...
Ruby
require 'zerenity/base' module Zerenity # Creates a calendar dialog allowing the user to select a date. Returns # a Time object representing the selected date or nil if Cancel is # clicked. # # ==== Example Usage # date = Zerenity::Calendar(:text=>"Please select a date") def self.Calendar(options={}) ...
Ruby
require 'zerenity/messagedialog' module Zerenity # Displays an error dialog. # ====Example Usage # Zerenity::Error(:text=>"An error has occured. Please check the system log.") def self.Error(options={}) Error.run(options) end class Error < MessageDialog # :nodoc: def self.check(options) ...
Ruby
require('zerenity/base') module Zerenity # Displays a list dialog on the screen. Items in the list # can be selected. Returns the rows which were selected # or nil if Cancel is clicked. # # ====Options # [:columns] The names which will be displayed at the top og # each column. This option is...
Ruby
require('zerenity/base') module Zerenity # Displays a text entry box. Returns the text entered or nil if # Cancel is pressed. # # ====Options # [:password] When set to true all all characters in the text # entry area will be masked by the '*' character. # ====Example Usage # name = Zereni...
Ruby
require('zerenity/base') module Zerenity # Displays a progress bar which can be updated via a processing # block which is passed a ProgressProxy object. # # ====Options # [:autoClose] The dialog will automatically close once the # progressing block is complete. # [:cancellable] If set to true...
Ruby
require('zerenity/base') module Zerenity # Displays a sliding scale. Returns the value selected or nil if # cancel is pressed. # # ====Options # [:min] The minimum value of the sliding scale. Defaults to 0. # [:max] The maximum value of the sliding scale. Defaults to 100. # [:step] The size of the value ...
Ruby
require 'zerenity/messagedialog' module Zerenity # Displays a warning dialog on the screen. # # ====Example Usage # Zerenity::Warning(:text=>"This operation can cause data corruption if interrupted") def self.Warning(options={}) Warning.run(options) end class Warning < MessageDialog # :nodoc: ...
Ruby
require 'zerenity/base' module Zerenity # Displays a file/directory selection dialog. Returns the name(s) # of the files/directories chosen or nil if Cancel is pressed. # # ====Options # [:filename] The file to selected initially # [:multiple] If set to true multiple files/directories can be selected # ...
Ruby
require 'gtk2' # Zerenity provides a number of simple graphical dialogs. # # ==== Global Options # [:title] The text displayed in the title bar. # [:text] The text that will be displayed in the dialog (if needed). # [:activatesDefault] If set to false disables the firing of the OK # button when the...
Ruby
require('zerenity/messagedialog') module Zerenity # Displays a question dialog. Returns true if OK is clicked, false if # Cancel is clicked. # # ====Example Useage # if Zerenity::Question(:text=>"Continue processing?") # post_process_files() # end def self.Question(options={}) Question.run(op...
Ruby
require 'zerenity/base' module Zerenity class MessageDialog < Base # :nodoc: def self.build(dialog,options) options[:ok_button] = dialog.add_button(Gtk::Stock::OK,Gtk::Dialog::RESPONSE_OK) dialog.set_default_response(Gtk::Dialog::RESPONSE_OK) end def self.run(options={}) Gtk.init...
Ruby
require('test/unit') require('gtk2') require('zerenity/fileselection') class TC_FileSelection < Test::Unit::TestCase def setup Gtk.init @options={} @dialog=Gtk::Dialog.new end def test_check_normal Zerenity::FileSelection.check(@options) assert_equal(Gtk::FileChooser::ACTION_OPEN,@options[:a...
Ruby
require('test/unit') require('gtk2') require('zerenity/messagedialog') class TC_MessageDialog < Test::Unit::TestCase def setup Gtk.init @options={} @dialog = Gtk::Dialog.new end def test_build_normal Zerenity::MessageDialog.build(@dialog,@options) assert_nil(@options[:cancel_button]) end e...
Ruby
require('test/unit') require('gtk2') require('zerenity/info') class TC_Info < Test::Unit::TestCase def setup Gtk.init @options={} @dialog=Gtk::Dialog.new end def test_check_normal Zerenity::Info.check(@options) assert_equal(Gtk::MessageDialog::INFO,@options[:type]) end end
Ruby
require('test/unit') require('gtk2') require('zerenity/question') class TC_Question < Test::Unit::TestCase def setup Gtk.init @options = {:text=>"Do you wish to continue"} @dialog = Gtk::Dialog.new end def test_check Zerenity::Question.check(@options) assert_equal("Do you wish to continue",@...
Ruby
require('test/unit') require('zerenity/base') class TC_Base < Test::Unit::TestCase def setup Gtk.init @options={} @dialog=Gtk::Dialog.new end def test_check_normal Zerenity::Base.check(@options) assert(@options[:activatesDefault]) assert_equal("",@options[:title]) assert_equal("",@op...
Ruby
require('test/unit') require('gtk2') require('zerenity/warning') class TC_Waring < Test::Unit::TestCase def setup Gtk.init @options={} @dialog = Gtk::Dialog.new end def test_build_normal Zerenity::Warning.check(@options) assert_equal(Gtk::MessageDialog::WARNING,@options[:type]) end end
Ruby
require('test/unit') require('gtk2') require('zerenity/scale') class TC_Scale < Test::Unit::TestCase def setup Gtk.init @options = {} @dialog = Gtk::Dialog.new end def test_check_normal assert_nothing_raised{Zerenity::Scale.check(@options)} assert_equal(0,@options[:initial]) assert_equal...
Ruby
require('test/unit') require('gtk2') require('zerenity/textinfo') class TC_TextInfo < Test::Unit::TestCase def setup Gtk.init #Prevents segmentation fault @options = {} @dialog = Gtk::Dialog.new end def test_check_normal Zerenity::TextInfo.check(@options) assert_equal(false,@options[:editabl...
Ruby
require('test/unit') require('zerenity/progress') class TC_Progress < Test::Unit::TestCase def setup Gtk.init @options = {:title=>"Operation in progress",:text=>"Building index..."} @dialog = Gtk::Dialog.new @hButtonBox = Gtk::HButtonBox.new @hButtonBox.add(Gtk::Button.new) @hButtonBox.add(Gt...
Ruby
require('zerenity/entry') class TC_Entry < Test::Unit::TestCase def setup Gtk.init @options = {:title=>"Enter your name",:text=>"Enter your name"} @dialog = Gtk::Dialog.new end def test_build_normal Zerenity::Entry.build(@dialog,@options) assert_equal(true,@dialog.vbox.children[1].visibility...
Ruby
require ('test/unit') require('test/tc_list') require('test/tc_progress') require('test/tc_question') require('test/tc_textinfo') require('test/tc_entry') require('test/tc_base') require('test/tc_calendar') require('test/tc_fileselection') require('test/tc_info') require('test/tc_messagedialog') require('test/tc_scale'...
Ruby
require('test/unit') require('gtk2') require('zerenity/calendar') class TC_Calender < Test::Unit::TestCase def setup Gtk.init @options={:text=>"Select a date"} @dialog=Gtk::Dialog.new end def test_build_normal Zerenity::Calendar.build(@dialog,@options) assert_equal(Gtk::Label,@dialog.vbox...
Ruby
require('test/unit') require('gtk2') require('zerenity/list') class TC_List < Test::Unit::TestCase def setup Gtk.init @options = {:columns=>["Snack","Energy(KJ)"],:data=>[["Beer","300"],["Chips","500"],["Chocolate","750"]]} @dialog = Gtk::Dialog.new end def test_check_normal assert_nothing_raise...
Ruby
# # BMFontGen to Gorilla file generator # # Description # Converts BMFontGen files (xml) into Gorilla files. # # Usage # > bmfontgen_to_gorilla font.xml def make_gorilla(xm, name = nil) glyphs = [] kernings = [] baseline = 0 spacelength = 0 lineheight = 0 kerning = 0 monowidth = 0 alt_name...
Ruby
# Sketchup To Ogre Exporter Configuration File Version 1.2.0 # Sketchup coords are in inches. The scale value converts inches into ogre units. # scale = 0.0254 -> 1 ogre unit = 1 meter # scale = 1 -> 1 ogre unit = 1 inch # scale = 2.54 -> 1 ogre unit = 1 centimeter $g_ogre_scale = 0.0254 # If ...
Ruby
# Sketchup To Ogre Exporter Version 1.2.0b9 # Partially rewritten by Fabrizio Nunnari <fabrizio.nunnari@vrmmp.it> # based on v1.0.1 Written by Kojack # # TODO # - Some objects are not centered. It is due to the Axes repositioning. Must detect current axes position and transform object accodingly. # # 1.2.0b9 - 1...
Ruby
# Sketchup Backface Highlighting Version 1.0.0 # Written by Kojack # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later #...
Ruby
# # BMFontGen to Gorilla file generator # # Description # Converts BMFontGen files (xml) into Gorilla files. # # Usage # > bmfontgen_to_gorilla font.xml def make_gorilla(xm, name = nil) glyphs = [] kernings = [] baseline = 0 spacelength = 0 lineheight = 0 kerning = 0 monowidth = 0 alt_name...
Ruby
# Sketchup To Ogre Exporter Configuration File Version 1.2.0 # Sketchup coords are in inches. The scale value converts inches into ogre units. # scale = 0.0254 -> 1 ogre unit = 1 meter # scale = 1 -> 1 ogre unit = 1 inch # scale = 2.54 -> 1 ogre unit = 1 centimeter $g_ogre_scale = 0.0254 # If ...
Ruby
# Sketchup To Ogre Exporter Version 1.2.0b9 # Partially rewritten by Fabrizio Nunnari <fabrizio.nunnari@vrmmp.it> # based on v1.0.1 Written by Kojack # # TODO # - Some objects are not centered. It is due to the Axes repositioning. Must detect current axes position and transform object accodingly. # # 1.2.0b9 - 1...
Ruby
# Sketchup Backface Highlighting Version 1.0.0 # Written by Kojack # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later #...
Ruby
# Require any additional compass plugins here. # Set this to the root of your project when deployed: http_path = "/" css_dir = "theme/css" sass_dir = "theme/scss" images_dir = "images" javascripts_dir = "js" # You can select your preferred output style here (can be overridden via the command line): output_style = :co...
Ruby
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # i...
Ruby
# These settings change the behavior of Rails 2 apps and will be defaults # for Rails 3. You can remove this initializer when Rails 3 is released. # Include Active Record class name as root for JSON serialized output. ActiveRecord::Base.include_root_in_json = true # Store the full class name (including module namespa...
Ruby
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone Mime::Type.register "application/x-amf", :amf
Ruby
require 'app/configuration' module RubyAMF module Configuration #set the service path used in all requests # RubyAMF::App::RequestStore.service_path = File.expand_path(RAILS_ROOT) + '/app/controllers' # => CLASS MAPPING CONFIGURATION # => Global Property Ignoring # By putting attribute names...
Ruby
# Settings specified here will take precedence over those in config/environment.rb # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true # Use a different logger for distributed setups # config.logger = SyslogLogger.new # Full error repor...
Ruby
# Settings specified here will take precedence over those in config/environment.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the webserver when you make code changes. config.ca...
Ruby
# Settings specified here will take precedence over those in config/environment.rb # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between...
Ruby
# Be sure to restart your server when you modify this file # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.1...
Ruby
# Don't change this file! # Configure your app in config/environment.rb and config/environments/*.rb RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) module Rails class << self def boot! unless booted? preinitialize pick_boot.run end end def booted? ...
Ruby
ActionController::Routing::Routes.draw do |map| map.resources :usuarios map.rubyamf_gateway 'rubyamf_gateway', :controller => 'rubyamf', :action => 'gateway' # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :contro...
Ruby
module StockQuotesHelper end
Ruby
# Methods added to this helper will be available to all templates in the application. module ApplicationHelper end
Ruby
module UsuariosHelper end
Ruby
#This is just a stub file so Rails doesn't complain about me not being in the helpers folder module RubyamfHelper end
Ruby
class Usuario < ActiveRecord::Base end
Ruby
class StockQuotes < ActiveRecord::Base end
Ruby
class UsuariosController < ApplicationController # GET /usuarios # GET /usuarios.xml def index @usuarios = Usuario.find(:all) respond_to do |format| format.html # index.html.erb format.xml { render :xml => @usuarios } end end # GET /usuarios/1 # GET /usuarios/1.xml def show ...
Ruby
class StockQuotesController < ApplicationController # return all StockQuotes def find_all respond_to do |format| format.amf { render :amf => StockQuotes.find(:all) } end end # return a single StockQuotes by id # expects id in params[0] def find_by_id respond_to do |format| for...
Ruby
class RubyamfController < ActionController::Base include RubyAMF::App def gateway RequestStore.rails_authentication = nil #clear auth hash RequestStore.rails_request = request RequestStore.rails_response = response #Compress the amf output for smaller data transfer over the wire...
Ruby
# Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details...
Ruby
# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' require 'rake/rdoctask' require 'tasks/rails'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/dbconsole'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/console'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/runner'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/benchmarker'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/benchmarker'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/request'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/profiler'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/profiler'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/request'
Ruby