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
{ | |
"name": "main", | |
"common": { | |
"container": { | |
"environment": { | |
"NODE_ENV": "development", | |
"MONGO_URI": "mongodb://mongo:27017", | |
"REDIS_URI": "redis", | |
"EVENT_SERVER": "nats://nats-streaming:4222", | |
"RUN_MIGRATIONS_UP": "true", |
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
module TokenInputHelpers | |
THEME = '' # set to 'facebook' or 'mac' if using themes | |
def token_input(locator, options) | |
raise "Must pass a hash containing 'with'" unless options.is_a?(Hash) && options.has_key?(:with) | |
theme = THEME.present? ? "-#{THEME}" : "" | |
field = _find_fillable_field(locator) # find the field that will ultimately be sent to the server, the one the user intends to fill in |
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
namespace :db do | |
desc "Remove orphans" | |
task :remove_orphans => :environment do | |
Dir[Rails.root + "app/models/**/*.rb"].each do |path| | |
require path | |
end | |
ActiveRecord::Base.send(:descendants).each do |model| | |
model.reflections.each do |association_name, reflection| | |
if reflection.macro == :belongs_to | |
delete_all_like_this = false |
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
(function($){ | |
var Project = Backbone.Model.extend({ | |
url: function() { | |
return '/heroku/resources/' + this.id + '.json'; | |
}, | |
display: function() { | |
this.fetch({ | |
success: function(model, response) { | |
$('#git_url').val(model.get('git_url')); |
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
'renders 404 when the project is not found': (controller) -> | |
@response = new mocks.Response() | |
@response.render = (params...) -> | |
@correct = (params[0] == '404') | |
controller.show(new mocks.Request(app_id: 1), @response) | |
assert.ok @response.correct |
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
ruby-1.9.2-p180 :024 > response = gateway.purchase(1000, credit_card, options) | |
/Users/ddonahue/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678: [BUG] Segmentation fault | |
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0] | |
-- control frame ---------- | |
c:0047 p:---- s:0218 b:0218 l:000217 d:000217 CFUNC :connect | |
c:0046 p:0011 s:0215 b:0215 l:000bd0 d:000214 BLOCK /Users/ddonahue/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678 | |
c:0045 p:0109 s:0213 b:0213 l:0001e0 d:0001e0 METHOD /Users/ddonahue/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:57 | |
c:0044 p:0026 s:0201 b:0201 l:000200 d:000200 METHOD /Users/ddonahue/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:87 | |
c:0043 p:0444 s:0195 b:0195 l:000bd0 d:000bd0 METHOD /Users/ddonahue/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/net/http.rb:678 |