Skip to content

Instantly share code, notes, and snippets.

View DanBradbury's full-sized avatar

Dan Bradbury DanBradbury

View GitHub Profile
[HealthBarSettings]
MaxHealthTicks = 50
MaxHealthMicroTicks = 100
DefaultHealthPerMicroTick = 50
DefaultHealthPerTick = 200
DefaultHealthPerMegaTick = 1000
TickAlpha = 200
MicroTickAlpha = 140
MicroTickHeight = 0.5
require 'benchmark'
require 'rubygems'
valid = Benchmark.measure do
Gem::Version.new '1.22.333.4444.55555.666666.7777777'
end
puts 'Valid version time:'
puts valid
@DanBradbury
DanBradbury / zzz
Created October 15, 2013 17:58
Migrating admin to 1.9.3
Upgrade Strategy
----------------
The goal of this is to outline the plan to update admin to Ruby 1.9.3 as
seemlessly as possible. The document is broken into phases that need to be
taken to fully upgrade the application.
### Testing ###
We are going to need to be able to stand up an App box to allow for QA to fully
Auto-merging vagrant/util/admin_db_restore
CONFLICT (content): Merge conflict in vagrant/util/admin_db_restore
Auto-merging vagrant/Vagrantfile
CONFLICT (content): Merge conflict in vagrant/Vagrantfile
Auto-merging admin/test/unit/messages_test.rb
CONFLICT (content): Merge conflict in admin/test/unit/messages_test.rb
Auto-merging admin/test/unit/message_group_test.rb
Auto-merging admin/test/unit/image_test.rb
Auto-merging admin/test/test_helper.rb
Auto-merging admin/test/integration/api_integration_test.rb
dan@app05:/nutricate/production/app$ git status
# On branch deploy
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: admin/config/email.yml
# modified: admin/config/environments/admin.rb
# modified: admin/config/initializers/recaptcha.rb
# modified: instance/init_scripts/admin
Processing MessagesController#update (for 33.33.33.1 at 2013-09-25 12:24:13) [PUT]
Parameters: {"group"=>"8", "message"=>{"end_date"=>"", "value"=>"", "priority"=>"3", "pos_id"=>"", "name"=>"10% Off Any Catering Order Over $50", "start_offset"=>"1", "frame"=>"0", "barcode_print_string"=>"0", "image_placement"=>"1", "barcode_string"=>"", "barcode_placement"=>"1", "include_barcode"=>"0", "duration"=>"30", "image_id"=>"2055", "text"=>"", "redeem_suppress"=>"0", "duration_round"=>"None", "answer"=>"", "include_pool"=>"1", "include_info"=>"0", "duration_unit"=>"Days", "dynamic_date"=>"1", "answer_inverted"=>"0", "info"=>"", "embedded_text"=>"<p>{{beg_date}} - {{exp_date}}</p>", "include_answer"=>"0", "optional"=>"0", "embedded_text_2"=>"<p>{{receipt.header_address1}}</p>", "message_type_id"=>"4", "barcode_height"=>"24", "start_date"=>"", "string_rules_attributes"=>{"0"=>{"string_type"=>"", "comparison"=>"between", "max_value"=>"", "min_value"=>"", "string_value_id"=>"", "printable"=>"0"}}, "cost"=>"", "barcode_f
Finished in 54.126982387 seconds.
1) Failure:
test_post(ApiIntegrationTest) [test/integration/api_integration_test.rb:131]:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>error</status>
<error>undefined method `name' for nil:NilClass</error>
</response>
.
@DanBradbury
DanBradbury / gist:6692988
Created September 24, 2013 23:51
Current run
Processing MessagesController#update (for 33.33.33.1 at 2013-09-24 16:51:04) [PUT]
Parameters: {"group"=>"8", "string_value"=>{"name"=>"", "pos_profile_id"=>"5"}, "search"=>{"search_name"=>""}, "controller"=>"messages", "message"=>{"name"=>"3 Regular Footlong Subs for 14.99 [after 4PM & Weekends]", "image_id"=>"2102", "frame"=>"0", "value"=>"", "priority"=>"3", "barcode_height"=>"24", "include_barcode"=>"0", "duration_unit"=>"Days", "answer"=>"", "redeem_suppress"=>"0", "barcode_placement"=>"1", "embedded_text"=>"<p>{{beg_date}} - {{exp_date}}</p>", "answer_inverted"=>"0", "string_rules_attributes"=>{"0"=>{"comparison"=>"between", "max_value"=>"", "string_type"=>"", "string_value_id"=>"", "printable"=>"0", "min_value"=>""}}, "start_date"=>"", "optional"=>"0", "barcode_format_id"=>"1", "end_date"=>"", "start_offset"=>"1", "text"=>"", "message_type_id"=>"4", "barcode_string"=>"", "image_placement"=>"1", "include_info"=>"0", "dynamic_date"=>"1", "cost"=>"", "include_pool"=>"1", "pos_id"=>"", "info"=>"", "barco
@DanBradbury
DanBradbury / gist:6627037
Last active December 23, 2015 11:18
19th morning run
1) Failure:
test_refresh_list(AlertsControllerTest) [test/functional/alerts_controller_test.rb:88]:
<0> expected but was
<2>.
2) Error:
test_create(BulletinsControllerTest):
RuntimeError: ERROR CREATING OBJECT
test/test_helper.rb:216:in `check_obj'
@DanBradbury
DanBradbury / gist:6596020
Created September 17, 2013 15:35
Early morning
Finished in 642.351675781 seconds.
1) Error:
test_refresh_list(AlertsControllerTest):
ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: syntax error at or near "["
LINE 1: SELECT ["alert_history.id"] FROM "alert_history" WHERE (((al...
^
: SELECT ["alert_history.id"] FROM "alert_history" WHERE (((alert_history.code IN ('ITEM_MISMATCH')) AND (alert_history.id IN (9))) AND (alert_history.entity_id IN (1,2,3,6))) ORDER BY alert_history.id
app/models/ar_helpers.rb:525:in `block in list_all_writable_foreign'
app/models/ar_helpers.rb:524:in `list_all_writable_foreign'