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 test_formats_on_nested_element | |
| @nested = { :id => 2, :name => 'Nested', :data => {:foo => ''}} | |
| for format in [ :json, :xml ] | |
| using_format(Person, format) do | |
| ActiveResource::HttpMock.respond_to.get "/people/1.#{format}", {'Accept' => ActiveResource::Formats[format].mime_type}, ActiveResource::Formats[format].encode(@nested) | |
| assert_equal @nested[:name], Person.find(1).name | |
| end | |
| end | |
| 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
| ::: in your database.yml | |
| # stuff common to several databases | |
| login: &login | |
| adapter: mysql | |
| username: fad | |
| password: fad | |
| host: localhost | |
| fad_2007: | |
| <<: *login |
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
| # returns true if the user authenticates to the LDAP server with the | |
| # provided password | |
| # | |
| def ldap_authenticated?(password) | |
| SimpleLdapAuthenticator.valid?(self.login, password) | |
| end | |
| def login=(value) | |
| write_attribute :login, (value ? value.downcase : nil) | |
| 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
| MAC PRO | |
| MB: dual socket nehalem xeon | |
| CPU: 2.66 Ghz Nehalem Xeon | |
| MEM: 3GB 1066MHZ DDR3 ECC | |
| HDD: 640MB 7200RPM SATA 3G/s | |
| VID: Geforce GT 120 | |
| CDR: 18x SuperDrive | |
| Input: Apple Mouse + Keyboard | |
| OS: Mac OSX 10.5 | |
| CASE: Mac Pro Aluminum Case |
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/env ruby | |
| # Symlink this to ~/.autotest | |
| require 'autotest/redgreen' | |
| # AUTOTEST_IMAGE_PATH = File.dirname(File.symlink?(__FILE__) ? File.readlink(__FILE__) : File.expand_path(__FILE__)) | |
| module Autotest::Growl | |
| def self.growl title, msg, img, pri=0, stick="" | |
| system "growlnotify -w -n autotest --image #{img.inspect} -p #{pri} -m #{msg.inspect} #{title.inspect} #{stick}" | |
| 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
| # | |
| # ############################################################# | |
| # # Rake | |
| # ############################################################# | |
| # | |
| namespace :rake do | |
| namespace :db do | |
| task :reset do | |
| run("cd #{deploy_to}/current; /usr/bin/rake db:reset RAILS_ENV=production") |
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
| # The Azure Hourly Error | |
| from Cron Daemon <root@azure.resortclosings.com> | |
| to root@azure.resortclosings.com | |
| date Mon, Jun 29, 2009 at 4:00 AM | |
| subject Cron <root@azure> /root/scripts/rsnapshot-with-remount hourly | |
| /bin/cp: will not create hard link `/backup/hourly.1/localhost/data/Completed Escrow Documents/10000-19999/10401' to directory `/backup/hourly.1/localhost/data/Completed Escrow Documents/10000-19999/10401' | |
| ---------------------------------------------------------------------------- | |
| rsnapshot encountered an error! The program was invoked with these options: | |
| /usr/bin/rsnapshot hourly | |
| ---------------------------------------------------------------------------- |
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
| # Azure Hourly Error | |
| from Cron Daemon <root@azure.resortclosings.com> | |
| to root@azure.resortclosings.com | |
| date Tue, Jul 21, 2009 at 4:00 PM | |
| subject Cron <root@azure> /root/scripts/rsnapshot-with-remount hourly | |
| /bin/cp: will not create hard link `/backup/hourly.1/localhost/data/Completed Escrow Documents/10000-19999/10401' to directory `/backup/hourly.1/localhost/data/Completed Escrow Documents/10000-19999/10401' | |
| ---------------------------------------------------------------------------- | |
| rsnapshot encountered an error! The program was invoked with these options: | |
| /usr/bin/rsnapshot hourly | |
| ---------------------------------------------------------------------------- |
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
| # Dev/Apps Capistrano Deployment Script | |
| # Copyright (c) 2009 Montana State University | |
| # | |
| # Version: 0.2 | |
| # | |
| # FILE: deploy.mysql.rb | |
| # This deployment file will allow a user to deploy their application code to dev.msu.montana.edu | |
| # | |
| # PREREQUISITES | |
| # - capistrano gem installed (sudo gem install capistrano) |
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
| # Dev/Apps Capistrano Deployment Script | |
| # Copyright (c) 2009 Montana State University | |
| # | |
| # Version: 0.3 | |
| # | |
| # FILE: deploy.mysql.rb | |
| # This deployment file will allow a user to deploy their application | |
| # code to dev.msu.montana.edu | |
| # | |
| # PREREQUISITES |