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
attr_accessible :foo, :bar, \ | |
:baz, :bang, :bin |
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
(gdb) info thread | |
5 Thread 0x41ca3940 (LWP 12025) 0x0000003c0240aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 | |
4 Thread 0x426a4940 (LWP 12117) 0x0000003c0240cd01 in sem_wait () from /lib64/libpthread.so.0 | |
3 Thread 0x41285940 (LWP 12553) 0x0000003c0240aebb in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 | |
2 Thread 0x418c8940 (LWP 32146) 0x0000003c010cd722 in select () from /lib64/libc.so.6 | |
* 1 Thread 0x2b1c74921cc0 (LWP 11931) 0x0000003c0240aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 | |
(gdb) thread 2 | |
[Switching to thread 2 (Thread 0x418c8940 (LWP 32146))]#0 0x0000003c010cd722 in select () from /lib64/libc.so.6 | |
(gdb) bt | |
#0 0x0000003c010cd722 in select () from /lib64/libc.so.6 |
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
(gdb) info threads | |
6 Thread 0x40b93940 (LWP 15361) 0x00000037efa0aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 | |
5 Thread 0x42755940 (LWP 15431) 0x00000037efa0cd01 in sem_wait () from /lib64/libpthread.so.0 | |
4 Thread 0x413b7940 (LWP 15771) 0x00000037efa0aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 | |
3 Thread 0x41c0d940 (LWP 15772) 0x00000037efa0aee9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 | |
2 Thread 0x4011d940 (LWP 19424) 0x00000037eeacd722 in select () from /lib64/libc.so.6 | |
* 1 Thread 0x2b96ec0facc0 (LWP 15167) 0x00000037eeabb187 in sched_yield () from /lib64/libc.so.6 | |
(gdb) bt full | |
#0 0x00000037eeabb187 in sched_yield () from /lib64/libc.so.6 | |
No symbol table info available. |
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
0x00000037eeabb187 in sched_yield () from /lib64/libc.so.6 | |
(gdb) backtrace | |
#0 0x00000037eeabb187 in sched_yield () from /lib64/libc.so.6 | |
#1 0x00002b96ebe39ba3 in gvl_yield (vm=0x55f8f20, th=<value optimized out>) at thread_pthread.c:123 | |
#2 0x00002b96ebe39f39 in rb_thread_schedule_limits () at thread.c:1025 | |
#3 rb_thread_schedule () at thread.c:1035 | |
#4 0x00002b96ebe3a136 in rb_thread_terminate_all () at thread.c:375 | |
#5 0x00002b96ebd1af8e in ruby_cleanup (ex=6) at eval.c:140 | |
#6 0x00002b96ebd1b0d6 in ruby_run_node (n=0x5ba9910) at eval.c:244 | |
#7 0x00000000004008bf in main (argc=8, argv=0x7fffb6cb9078) at main.c:38 |
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 "#excerpt" do | |
context "when there is a post excerpt" do | |
let(:post_options) {{ | |
:wp_excerpt => "This is a WP excerpt", | |
:content => "This is the post content" | |
}} | |
its(:excerpt) { should == "This is a WP excerpt" } | |
end | |
context "when there is not a post excerpt" 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
class PushService < AbstractController::Base | |
include AbstractController::Rendering | |
self.view_paths = "app/views" | |
def self.publish(recipient_ids, json) | |
recipients = RecipentClass.where(:id.in recipient_ids).all | |
FayePublisher.new(recipients, json).publish | |
GcmPublisher.new(recipients, json).publish | |
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
# After forking, reconnect any Redis connections | |
if defined?(PhusionPassenger) | |
PhusionPassenger.on_event(:starting_worker_process) do |forked| | |
if forked | |
reconnect_redis() | |
end | |
end | |
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
Submission.from_upload(user, upload).tap do |s| | |
add_submission s | |
publish 'submission.uploaded', s.to_hash | |
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
$__load_path_size = nil | |
$__cached_load_paths = {} | |
$__cache_scanned = {} | |
PATH_START_SLASH = "/" | |
PATH_START_PERIOD = "." | |
PATH_START_TILDE = "~" | |
::Kernel.class_eval do | |
alias __gem_original_require gem_original_require |
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
class Question < ActiveRecord::Base | |
belongs_to :survey | |
def samples | |
populate_samples | |
end | |
private | |
def populate_samples |