Skip to content

Instantly share code, notes, and snippets.

--type-set=bin=.pdf
--nobin
--ignore-dir=tmp
--ignore-dir=coverage
// Instance method in my XML Reader to easily read dates from the XML
// Pretty sure I have the date formatting right, per the link from the Apple documentation
// http://unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns
-(NSDate *)dateWithString:(NSString *)dateString {
NSDateFormatter * formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat:@"yyyy-MM-DD HH:mm:ss ZZ"];
NSLog(@"Converting '%@' to '%@'", dateString, [formatter dateFromString:dateString]);
return [formatter dateFromString:dateString];
}
namespace(:pb) do
desc "Symlink the databse config file from shared drectory to current release directory."
task :symlinks do
run "ln -nsf #{shared_path}/config/database.yml #{release_path}/config/database.yml"
run "ln -nsf #{shared_path}/config/initializers/site_keys.rb #{release_path}/config/initializers/site_keys.rb"
end
end
namespace(:deploy) do
desc "Tell Passenger to restart the server"