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 'rubygems' | |
require 'tlsmail' | |
RAILS_ROOT = "/Users/reggie/src/new_altomic/altomic" | |
FETCHER_SCRIPT = "RAILS_ENV=production #{RAILS_ROOT}/script/mailer_daemon_fetcher" | |
Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE) | |
# mail settings | |
God::Contacts::Email.message_settings = { |
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
buba:new_altomic reggie$ god -c monitor_mail_deamon.god -D | |
I [2009-04-06 22:24:44] INFO: Using pid file directory: /Users/reggie/.god/pids | |
I [2009-04-06 22:24:44] INFO: Started on drbunix:///tmp/god.17165.sock | |
I [2009-04-06 22:24:44] INFO: fetcher-daemon move 'unmonitored' to 'init' | |
I [2009-04-06 22:24:44] INFO: fetcher-daemon moved 'unmonitored' to 'init' | |
I [2009-04-06 22:24:44] INFO: fetcher-daemon [trigger] process is not running (ProcessRunning) | |
I [2009-04-06 22:24:44] INFO: fetcher-daemon move 'init' to 'start' | |
I [2009-04-06 22:24:44] INFO: fetcher-daemon before_start: no pid file to delete (CleanPidFile) | |
I [2009-04-06 22:24:44] INFO: fetcher-daemon start: RAILS_ENV=production /Users/reggie/src/new_altomic/altomic/script/mailer_daemon_fetcher start | |
W [2009-04-06 22:24:44] WARN: fetcher-daemon start command exited with non-zero code = 1 |
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
# I'm trying to search the 'cleanest' solution to create an hash. | |
# The different guidestyles I've found around does not satisfy me at all. | |
# Tell me which ones you like between those options | |
# solution 1 (favorite at the moment) | |
let!(:params) do | |
{ response_type: 'code', | |
client_id: application.id.to_s, | |
redirect_uri: application.redirect_uri, |
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 'rubygems' | |
require 'spork' | |
# This code runs once when you run your test suite | |
Spork.prefork do | |
ENV['RAILS_ENV'] ||= 'test' | |
# Mongoid models reload | |
require 'rails/mongoid' | |
Spork.trap_class_method(Rails::Mongoid, :load_models) |
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
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch(%r{^config/locales/.+\.yml$}) | |
watch('Gemfile') | |
watch('Gemfile.lock') | |
watch('spec/spec_helper.rb') | |
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
// ------------------------------------------------- | |
// MongoDB extension to get back the new records | |
// added to a capped collection. This code will not | |
// be used if mongoose is found out to be reliable | |
// | |
// var events = require('./lib/events'); | |
// | |
// events.connect(function(collection) { | |
// events.execute(collection); | |
// }); |
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
def self.cache_key | |
Digest::MD5.hexdigest "#{scoped.max(:updated_at).to_i}-#{scoped.min(:updated_at)}-#{scoped.count}" | |
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
describe 'when updates a property' do | |
let(:resource) { FactoryGirl.create :device } | |
let(:property_id) { resource.properties.first.id } | |
describe 'when :pending was false' do | |
before { resource.update_attributes(properties_attributes: [{ id: property_id, pending: false }]) } | |
describe 'when updates :value' do |
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
/** | |
* | |
* OAuth usage example. | |
* | |
**/ | |
var http = require("http"); | |
var Url = require("url"); | |
var querystring = require("querystring"); |
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
2013-02-07T21:46:13+00:00 heroku[nginx]: | |
23.23.21.5 - - [07/Feb/2013:21:46:13 +0000] | |
"OPTIONS /devices/50c61ff1d033a9b610000001 | |
HTTP/1.1" 411 576 "http://localhost:8000/app/index.html" | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) | |
AppleWebKit/537.17 (KHTML, like Gecko) | |
Chrome/24.0.1312.57 Safari/537.17" devices.lelylan.com |
OlderNewer