Skip to content

Instantly share code, notes, and snippets.

View azuby's full-sized avatar

azuby

  • California, USA
View GitHub Profile
@shift_groups = @shifts.group_by(&:date).to_a.sort.reverse
# output of 'puts @shift_groups.inspect'
[
[Wed, 08 Feb 2012,
[#<Shift id: 5, user_id: 1, job_id: nil, duration: 32408, created_at: "2012-02-07 21:21:46", updated_at: "2012-02-07 21:22:32">]
],
[Tue, 07 Feb 2012,
# == Schema Information
#
# Table name: house
#
# id :integer not null, primary key
# number :string(255)
# subscribed :boolean default(FALSE)
# last_location_id :integer
# last_location_time :datetime
# created_at :datetime
i'm getting this error from resque after making two simultaneous api calls with the same paramaters
PGError: SSL error: decryption failed or bad record mac : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"clocks"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum
puts "Hello"
Resque.enqueue(Clocker, clock.id)
it "enqueue FooWorker#create_user" do
mock(Resque).enqueue(FooWorker, :create_user, user.id)
user.create_on_foo
end
@azuby
azuby / Gemfile
Created February 1, 2012 10:02
Show Notes
group :test do
# ...
gem 'vcr'
gem 'fakeweb'
gem 'capybara-mechanize'
end
require 'spec_helper'
describe "User Registration" do
describe "signup" do
before(:each) do
#used by registrations controller
role = Factory(:basic_role)
company = Factory(:company)
$ rake resque:work QUEUE='*'
rake aborted!
No such file to load -- devise/confirmations_controller
Tasks: TOP => resque:work => resque:preload
(See full trace by running task with --trace)
<!DOCTYPE html>
<html>
<head>
<title><%= title %></title>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tag %>
---
- !ruby/struct:VCR::HTTPInteraction
request: !ruby/struct:VCR::Request
method: :get
uri: <registrar_wsdl>
body: !!null
headers: !!null
response: !ruby/struct:VCR::Response
status: !ruby/struct:VCR::ResponseStatus
code: 200