Skip to content

Instantly share code, notes, and snippets.

View marcusleemitchell's full-sized avatar
:octocat:
Socially Distanced Coding

Marcus Mitchell marcusleemitchell

:octocat:
Socially Distanced Coding
View GitHub Profile
SC.LabelView.extend({
layout: { left:0, top:15, height:20, width:73 },
content: content,
isEditable: YES,
content: content,
valueBinding: SC.binding('.operator', content),
textAlign: SC.ALIGN_RIGHT
})
/** MODELS **/
/** VIEW **/
MidasEvolvedSprout.OperationNodeView = SC.View.extend(SCUI.Cleanup, LinkIt.NodeView,
/** @scope MidasEvolvedSprout.OperatorNodeView.prototype */ {
classNames: ['operation-node-view'],
[506] $ cap production deploy
* executing `production'
!!! YOU ARE DEPLOYING TO PRODUCTION SERVERS (lacey, mocha) !!!
continue? (yes/[no]) yes
triggering start callbacks for `deploy'
* executing `multistage:ensure'
* executing `deploy'
triggering before callbacks for `deploy'
* executing `deploy:check'
[mmitchell] ~/Projects/HouseTrip-Web-App feature/bookings-create-booking-method-for-each-of-the-values-moved-into-payment $ be cap staging3 deploy:migrations
* 14:35:58 == Currently executing `staging3'
triggering start callbacks for `deploy:migrations'
* 14:35:58 == Currently executing `multistage:ensure'
triggering after callbacks for `multistage:ensure'
* 14:35:58 == Currently executing `deploy:migrations'
* 14:35:58 == Currently executing `deploy:update_code'
triggering before callbacks for `deploy:update_code'
* 14:35:58 == Currently executing `newrelic:read_comment'
1)
'User#send_low_availability_reminder!#update_reply_rate should not consider replies later than 36 hours after the request' FAILED
expected: 33,
got: 0 (using ==)
./spec/models/user_spec.rb:529:
2)
'Abingo#test should score one participation per identity' FAILED
expected: 2,
got: 5 (using ==)
1)
'Booking#total_cancellation_amount_for_host_calculation commission_reduction should not refund commission reduction' FAILED
expected: 75,
got: 95.0 (using ==)
./spec/models/booking/refund_trait_spec.rb:125:
2)
NoMethodError in 'NavigationDslHelper#navigation (with complex example) nests lists'
undefined method `navigation' for #<Spec::Rails::Example::HelperExampleGroupController:0x126b8d248>
./spec/helpers/navigation_dsl_helper_spec.rb:5:
@ -208,46 +202,16 @@ private
...skipping...
diff --git a/app/models/booking.rb b/app/models/booking.rb
index 0c52530..4443485 100644
--- a/app/models/booking.rb
+++ b/app/models/booking.rb
@@ -11,7 +11,6 @@ class Booking < ActiveRecord::Base
does 'date_range', :check_in_date, :check_out_date
does 'flag', :old_style_commissions, :default => false
namespace :finance do
desc "Move booking monitory values to payment"
task :move_payment_data => :environment do
ActiveRecord::Base.connection.execute("CREATE UNIQUE INDEX index_unique_payments_on_booking_id_and_type ON payments (booking_id,type);"
ActiveRecord::Base.connection.execute("INSERT payments (booking_id,type,credit_card_fee_amount,credit_card_cost,earning_FROM_credit_card,money_kept_by_adyen,currency_code,exchange_rate_id,used_for_authorisation,cc_charged,payment_faked_option,commission_amount,commission_reduction,commissionable_amount_for_guest,pre_reduction_commission_amount,uncommissionable_amount_for_guest,cash_in,cash_in_date,total_amount_guest_pays,total_price_of_stay_for_host,total_price_of_stay,payment_on_hold)
SELECT id,'InitialPayment',credit_card_fee_amount,credit_card_cost,earning_FROM_credit_card,money_kept_by_adyen,currency_code,exchange_rate_id,used_for_authorisation,cc_charged,payment_faked_option,commission_amount,commission_reduction,commissionable_amount_for_gu
undefined method `name_en' for nil:NilClass
/var/www/housetrip/releases/20121026095940/app/models/data_extracts/marketing_sources_property_report.rb:47:in `get_xls'
/var/www/housetrip/releases/20121026095940/app/models/data_extracts/marketing_sources_prop
undefined method `image' for nil:NilClass
/var/www/housetrip/releases/20121029125904/app/mailers/exact_target/second_review_reminder_mailer.rb:19:in `set_attributes'
/var/www/housetrip/releases/20121029125904/lib/exact_target/mailer.rb:75:in `attributes'
You must include the primary key if you define a select
/var/www/housetrip/shared/bundle/ruby/1.8/gems/activerecord-2.3.12/lib/active_record/batches.rb:72:in `find_in_batches'
/var/www/housetrip/releases/20121030143155/app/jobs/facebook_data_extract.rb:68
You must include the primary key if you define a select
@marcusleemitchell
marcusleemitchell / gist:4944795
Created February 13, 2013 13:59
Wanting to reprocess Host avatars...is this the best solution or is there another way?
User.find_in_batches(:conditions => "user_type IN ('host','ghost')") do |user_batch|
user_batch.each do |user|
user.delay.send(:generate_delayed_image_styles!)
end
end