This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| person = Person.new | |
| person.name | |
| person.setName(name) | |
| person.setFirstName(first, lastName:last) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSApp.beginSheet(@info_sheet, | |
| modalForWindow:@main_window, | |
| modalDelegate:self, | |
| didEndSelector:nil, | |
| contextInfo:nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def setup | |
| @cus_save = Customer.find("####") | |
| login | |
| end | |
| def teardown | |
| cus = Customer.find "####" | |
| cus.attributes = @cus_save.attributes | |
| assert cus.save! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def format_validations(object) | |
| error_msg = "Error inputting user: <ul>" | |
| error_msg << object.errors.map { |msg| "<li> #{msg.last} </li>"}.join(" ") | |
| error_msg << "</ul>" | |
| end | |
| flash[:notice] = format_validations(data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| page.visual_effect :appear, :flash_notice | |
| page.delay(10.0) do | |
| page.visual_effect :fade, :flash_notice | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # grabs the changed hash and maps it to a flat hash containing just the updated params | |
| @customer.attributes = Hash[*(params[:customer].map{|k,v| [k, v.last]}.flatten)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module VersionInfo | |
| #Version number file | |
| MAJOR_VERSION = 1 | |
| ENHANCE_VERSION = 3 | |
| FIX_VERSION = 2 | |
| BETA_FLAG = true | |
| RC_FLAG = false | |
| def self.get_svn_revision | |
| `svn info`.split("\n")[4][/\d+/].to_i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/ruby | |
| # | |
| # File: failoverd.rb | |
| # Description: Daemon to handle failover and restart | |
| # Date: 12-14-2009 - Luke van der Hoeven | |
| # | |
| # Credit: Based on Patrick Hennessy's ipfaild.pl script | |
| # (http://git.pathennessy.com/cgi-bin/gitweb.cgi?p=linux-scripts.git;a=blob;f=ipfaild.pl;hb=HEAD) | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| require 'rubygems' | |
| require 'hpricot' | |
| require 'yaml' | |
| require 'open-uri' | |
| site = "http://www2.hargray.com" | |
| settings = YAML::load( File.open("template_options.yml") ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module VersionInfo | |
| #Version number file | |
| MAJOR_VERSION = 1 | |
| ENHANCE_VERSION = 4 | |
| FIX_VERSION = 0 | |
| BETA_FLAG = true | |
| RC_FLAG = false | |
| def self.get_svn_revision | |
| `svn info`.split("\n")[4][/\d+/].to_i |
OlderNewer