Skip to content

Instantly share code, notes, and snippets.

View jkthorne's full-sized avatar
💭
caffeinated

Jack jkthorne

💭
caffeinated
View GitHub Profile
8 processes for 222 tests, ~ 27 tests per process
Run options: --seed 55779
# Running tests:
Run options: --seed 88
# Running tests:
Run options: --seed 32480
@jkthorne
jkthorne / gist:5760191
Created June 11, 2013 20:11
rbx-2.0.0-rc1 build log
This file has been truncated, but you can view the full file.
/var/folders/4h/k23w0qd55dbcvf1f93v7b1jc0000gn/T/ruby-build.20130611160505.11966 ~
HTTP/1.0 200 OK
Content-Type: binary/octet-stream
Content-Length: 471759
Connection: keep-alive
Date: Fri, 08 Feb 2013 17:33:11 GMT
Last-Modified: Wed, 12 Dec 2012 18:53:11 GMT
ETag: "36c852831d02cf90508c29852361d01b"
Accept-Ranges: bytes
Server: AmazonS3
8 processes for 121 tests, ~ 15 tests per process
Run options: --seed 45915
# Running tests:
Run options: --seed 39899
# Running tests:
Run options: --seed 12033
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
File Locked; Currently caching to this file, so skipping
@jkthorne
jkthorne / gist:9698128
Last active August 29, 2015 13:57
loading env profiling
$ b rake environment -rprofile
% cumulative self self total
time seconds seconds calls ms/call ms/call name
15.89 60.57 60.57 315688 0.19 3.89 Array#each
8.37 92.47 31.90 84833 0.38 1.42 Array#map
5.81 114.61 22.14 80449 0.28 0.42 Array#include?
4.05 130.04 15.43 142598 0.11 0.15 Rack::Mount::StrexpParser#next_token
3.76 144.39 14.35 4831 2.97 61.49 Kernel.require_without_backports
3.35 157.17 12.78 96939 0.13 0.21 Regin::Parser#_next_token
2.95 168.43 11.26 3159192 0.00 0.00 Symbol#to_s
<strong>The Problem</strong>
I recently have come across and interesting problem with an inadequate solution. This a project which has gone through converting the names on there domain objects but has maintain there Types. An object called Foo would previously be called foo but now has a name of bar. Along with this rename there was an external reference that had to be changes to represent the same object we will call this an external_id. This exteranl_id was added but pointed to existing domain concepts.
<code># pre rename
foo = Foo.new
foo.name #=&gt; "foo"
foo.id #=&gt; 1
# post rename
foo = Foo.new
Foo.name #=&gt; "bar"
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@jkthorne
jkthorne / gist:1888630f4788ad33edc4
Created May 15, 2014 18:09
this is madness this is filters
[:ensure_proper_protocol, :verify_authenticity_token, :assign_current_user_to_models, :handle_user_settings, :clean_temp_files, "_callback_around_277", :validate_selected_object, :do_not_allow_rjs_to_be_requested_via_script_tag, :clear_timeslice_service_state, :sanitize_request_format, :check_for_xhr_html, :verify_supported_browser, :login_required, :prevent_sidejacking, :prevent_framing, :load_account, :verify_authed_correctly, :verify_permissions, :verify_restricted_partnerships, :load_shard, :adjust_format_for_iphone, :load_time_zone, :log_request, :set_end_user_filter, :record_format, :require_email_validation_for_logged_in_users, :setup_shard_cache_and_metric_scope, "_callback_before_34850", "_callback_before_34854(self)", "_callback_before_34858(self)", "_callback_before_34862(self)", "_callback_before_34866(self)", "_callback_before_34870(self)", "_callback_before_34874(self)", "_callback_before_34878(self)", "_callback_before_34882(self)", "_callback_before_34886(self)", "_callback_before_34890(self)"
Run options: --seed 6850
# Running:
.....................................................E.............................................................................................E.............................................................................................................................................................
Finished in 127.196609s, 2.3979 runs/s, 5.8885 assertions/s.
1) Error:
SalesforceUserCreationWorker::#perform#test_0010_gracefully handles multiple queued jobs for the same user:
iex(1)> alias BuzzwordBingo.User
nil
iex(2)> alias BuzzwordBingo.User.Repo
nil
iex(3)> Repo.all(User)
** (UndefinedFunctionError) undefined function: BuzzwordBingo.User.Repo.all/1 (module BuzzwordBingo.User.Repo is not available)
BuzzwordBingo.User.Repo.all(BuzzwordBingo.User)
iex(3)>