Skip to content

Instantly share code, notes, and snippets.

View ahawkins's full-sized avatar
💭
🌈🏄🏼‍♂️🤙🏻

Adam Hawkins ahawkins

💭
🌈🏄🏼‍♂️🤙🏻
View GitHub Profile
Then /^the jobs are processed$/ do
worker = Resque::Worker.new('*')
worker.work(0)
Resque::Worker.working.map(&:shutdown)
end
artist_name = lambda {|release_name| artist = release_name.split('-').first; artist.match(/(.+)_$/) ? $~[1] : artist }
releases.each do |release|
path = "#{track_path}/#{artist_name.call(release)}"
FileUtils.mkdir(path) unless File.directory?(path)
FileUtils.mv(release, "#{path}/#{File.basename(release)}")
end
[:models, :controllers, :views, :helpers, :lib, :mailers, :observers, :middleware].each do |sub|
desc "Run #{sub} specs with rcov"
Spec::Rake::SpecTask.new("rcov:#{sub}" => spec_prereq) do |t|
t.spec_opts = ['--options', "\"#{RAILS_ROOT}/spec/spec.opts\""]
t.spec_files = FileList["spec/#{sub}/**/*_spec.rb"]
t.rcov = true
# create exclusion patterns since there no "inlucde only" option with rspec
directories = [:models, :controllers, :views, :helpers, :lib, :mailers, :observers, :middleware].reject {|dir| dir == sub}
patterns = directories.map {|dir| "\"#{dir}/*\""}
$(something).autocomplete(option).data( "autocomplete" )._renderItem = function( ul, item) {
var term = this.term; // what the user typed into the box, can do some fanciness now
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( $( "<a></a>" ).text( item.label ) )
.appendTo( ul );
};
# run your test suite with this formatter to print out all undefined steps
# Good for finding old and unused steps after a lot of refactoring !
require 'cucumber'
require 'cucumber/formatter/usage'
class UnusedSteps < Cucumber::Formatter::Usage
def print_summary(features)
add_unused_stepdefs
namespace :specjour do
def specjour_dir
"~/.specjour/#{fetch(:project_name)}"
end
def specjour_pid_file
specjour_dir + "/manager.pid"
end
task :start, :roles => :test do

CRITICAL

  • Creating a contact on the mobile fails to sync with Radium error returned (did not affect old app)
  • We still can´t get the account [email protected] to sync with radium mobile (from Tomppa).
  • E-mail´s like nebula and sigmatic are quite standard fore small businesses in finland (from Tomppa).
  • SMS from radium to phone doesn’t work
  • Opened the call to Tommy Morelius. I wanted to mark the call as private but there was no make private button. http://beta.radiumcrm.com/agents# (this works on some some its missing)
  • Mobile issues – see pivotal radium-mobile (Adam)
  • customers – bulk todo form doesn’t show the “alert me” options.
  • http://app.radiumcrm.com/customers/249 choose calls filter then press more. now you see todos as well.
# God init script for ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: god
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Facilities to start/stop/restart the god process monitor
source "http://rubygems.org"
gem 'rails', '2.3.8'
gem "authlogic", '2.1.5'
gem 'paperclip', '2.3.3'
gem 'haml', '2.2.23'
gem "daemons", '1.1.0'
gem "acts-as-taggable-on", '2.0.6'
gem 'faker', '0.3.1'
given a hash like
{:property1 => [1,2,3,4,5], :property2 => [1,2,3,4,5]}
how to iterate through all the keys
and their values to create all possible combinations of each property
given an infinite number of keys where each key's value is an array of possible values