inspect a faied job in resque:
failed = JSON.parse(Resque.redis.lpop("failed"))
| class IncomingMailsController < ApplicationController | |
| skip_before_filter :verify_authenticity_token | |
| def create | |
| message = Mail.new(params[:message]) | |
| user = User.where(:email=>message.from).first | |
| if !message.attachments.first.nil? | |
| post = Post.new( | |
| :title => message.subject, |
| # mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]] | |
| settings = URI.parse(ENV['MONGOLAB_URL'] || ENV['MONGOHQ_URL'] || 'mongodb://localhost/app_test') | |
| database_name = settings.path.gsub(/^\//, '') | |
| Mongoid.configure do |config| | |
| config.master = Mongo::Connection.new(settings.host, settings.port).db(database_name) | |
| config.master.authenticate(settings.user, settings.password) if settings.user | |
| end |
| describe "Hash literal" do | |
| before do | |
| @hash = {} | |
| end | |
| it "{} should return an empty hash" do | |
| @hash.size.should == 0 | |
| @hash.should == {} | |
| end | |
| Kernel.send :define_method, :namespace do |*args| | |
| .... | |
| end |
| { | |
| "failed_at" => "2011/07/31 13:02:32", | |
| "payload" => { | |
| "args" => [ | |
| [0] { | |
| "coordinates" => nil, | |
| "truncated" => false, | |
| "favorited" => false, | |
| "created_at" => "Sun Jul 31 13:01:23 +0000 2011", | |
| "id_str" => "97653080010661888", |
| describe("Model.extend", function() { | |
| var applicant; | |
| beforeEach(function(){ | |
| // I am passionate developer who learned to stop worrying and love Javascript | |
| // | |
| applicant = Person.init({ | |
| name: "Pedro Del Gallego", | |
| github: "https://github.com/pedrodelgallego", | |
| skills: ['ruby', 'css3', 'html5', 'scuba diving', 'js'], | |
| passion: ["Javascript"] |
| // base path, that will be used to resolve files and exclude | |
| basePath = '../'; | |
| // list of files / patterns to load in the browser | |
| files = [ | |
| JASMINE, | |
| JASMINE_ADAPTER, | |
| "spec/*.js" | |
| ]; |
| <!DOCTYPE html> | |
| <html> | |
| <head><meta charset="utf-8" /> | |
| <title>Chapter 9: 2 Column Layout - positioning</title> | |
| <link rel="stylesheet" href="style.css" /> | |
| <style type="text/css" media="screen"> | |
| /* Write here your code */ | |
| </style> | |
| </head> | |
| <body> |
| /* Learn layout */ |