Skip to content

Instantly share code, notes, and snippets.

require 'rest_client'
namespace :bankcodes do
desc "Import bankcodes from banklz.net"
task :import => :environment do
total_pages = JSON.parse(RestClient.get("http://banklz.net/bankcodes.json", :timeout => 30))["total_pages"]
bankcodes = []
1.upto(total_pages) do |page|
<post>
<assets-count type="integer">0</assets-count>
<body-html>
<p>my first citadel message (this is a placeholder)</p>
</body-html>
<body-plain>my first citadel message (this is a placeholder)</body-plain>
<body-source>my first citadel message (this is a placeholder)</body-source>
<created-at type="datetime">2009-07-07T18:09:33Z</created-at>
<embed nil="true"/>
<excerpt>my first citadel message (this is a placeholder)</excerpt>
<posts type="array">
<post>
<assets-count type="integer">0</assets-count>
<body-html/>
<body-plain/>
<body-source/>
<created-at type="datetime">2009-06-18T07:24:41Z</created-at>
<embed nil="true"/>
<excerpt nil="true"/>
<format>text</format>
desc "Task to run all required tasks to perform continuos integration with integrity/hudson"
task :cc do
RAILS_ENV = ENV['RAILS_ENV'] = 'test'
Rake::Task["test:move_test_db_config"].invoke
Rake::Task["gems:install"].invoke
Rake::Task["db:drop"].invoke
Rake::Task["db:create"].invoke
Rake::Task["db:migrate"].invoke
Rake::Task["test"].invoke
end
<user>
<aim>jeanbvkoos</aim>
<api-key>xxxxxxxxxxxxxxxxx</api-key>
<city>Cologne</city>
<country>Germany</country>
<created-at type="datetime">2009-06-19T20:49:33Z</created-at>
<email>[email protected]</email>
<id type="integer">8</id>
<jabber nil="true"/>
<language nil="true"/>
<channels type="array">
<channel>
<company-id type="integer">1</company-id>
<created-at type="datetime">2009-06-14T14:01:12Z</created-at>
<description>Our API channel</description>
<email>[email protected]</email>
<id type="integer">1</id>
<name>Channelthing API</name>
<permalink>channelthing-api</permalink>
<updated-at type="datetime">2009-06-26T12:19:48Z</updated-at>
<channel>
<company-id type="integer">1</company-id>
<created-at type="datetime">2009-06-14T14:01:12Z</created-at>
<description>Our API channel</description>
<email>[email protected]</email>
<id type="integer">1</id>
<name>Channelthing API</name>
<permalink>channelthing-api</permalink>
<updated-at type="datetime">2009-06-26T12:19:48Z</updated-at>
<company-name>Railslove</company-name>
<company>
<created-at type="datetime">2009-06-12T08:45:50Z</created-at>
<description>Our Company</description>
<id type="integer">1</id>
<logo-url nil="true"/>
<name>Railslove</name>
<permalink>railslove</permalink>
<updated-at type="datetime">2009-06-26T12:19:33Z</updated-at>
<website>http://www.railslove.com</website>
<small-logo-url>/logos/small/missing.png</small-logo-url>
<companies type="array">
<company>
<created-at type="datetime">2009-06-12T08:45:50Z</created-at>
<description>Our Company</description>
<id type="integer">1</id>
<logo-url nil="true"/>
<name>Railslove</name>
<permalink>railslove</permalink>
<updated-at type="datetime">2009-06-26T12:19:33Z</updated-at>
<website>http://www.railslove.com</website>
@railslove
railslove / railslove.rb
Created February 27, 2009 12:27 — forked from bumi/railslove.rb
# RAILSLOVE.com template
#
# with help and ideas from:
# http://gist.github.com/33337 By Peter Cooper
# http://github.com/jeremymcanally/rails-templates/tree/master/suspenders.rb Suspenders by Thoughtbot Nathan Esquenazi
if yes?("symlink local rails copy to vendor?")
path = ask("what's the directory of your local rails copy?")
inside('vendor') { run "ln -s #{path} rails" }