This file contains 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
require 'mechanize' | |
require 'nokogiri' | |
require 'sinatra' | |
get '/:psuid' do | |
find_name params[:psuid] | |
end | |
def find_name(psuid) |
This file contains 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
############################################## | |
# Different ways to define singleton methods # | |
############################################## | |
# Being able to reference external instance variables when creating a method | |
# enables useful meta-programming techniques in ruby. The styles which are | |
# capable of this will define methods that "Moof!" (like Clarus the Dogcow). | |
moof = "Moof!" |
This file contains 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
Blog::Application.routes.draw do | |
resources :posts do | |
resources :comments | |
end | |
# You can have the root of your site routed with "root" | |
# just remember to delete public/index.html. | |
root :to => "home#index" | |
end |
This file contains 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
task :test do | |
["git clone git://github.com/radiant/radiant-reorder-extension.git vendor/extensions/reorder", | |
"rake radiant:extensions:reorder:migrate", | |
"rake radiant:extensions:reorder:update"].each do |command| | |
begin | |
sh( command ) | |
rescue Exception => e | |
puts e | |
puts "FAIl!" | |
exit |