Skip to content

Instantly share code, notes, and snippets.

View mostlyobvious's full-sized avatar

Paweł Pacana mostlyobvious

View GitHub Profile
require 'socket'
require 'logger'
STDOUT.sync = true
logger = Logger.new(STDOUT)
watchdog_timeout = (ENV['WATCHDOG_USEC'].to_i / 1_000_000)
sd_notify_socket = Socket.new(Socket::AF_UNIX, Socket::SOCK_DGRAM)
sd_notify_socket.connect(Addrinfo.unix(ENV['NOTIFY_SOCKET']))
loop do
# Expectations:
#
# * application code in /srv/myapp/current
# * ruby runtime in /srv/myapp/.rubies/ruby-2.3.0
# * unicorn.rb config specifies pid file location to /srv/myapp/current/unicorn.pid and working directory to /srv/myapp/current
[Unit]
Description=Sample unicorn app
[Service]
TypeError: this.initialize.apply is not a function. (In 'this.initialize.apply(this,arguments)', 'this.initialize.apply' is an instance of Object)
Modelowl-web-c9a2df36e07e71c26e3a436290cef395.js:28639
towl-web-c9a2df36e07e71c26e3a436290cef395.js:10605
_prepareModelowl-web-c9a2df36e07e71c26e3a436290cef395.js:28986
setowl-web-c9a2df36e07e71c26e3a436290cef395.js:28868
addowl-web-c9a2df36e07e71c26e3a436290cef395.js:28828
resetowl-web-c9a2df36e07e71c26e3a436290cef395.js:28907
resetowl-web-c9a2df36e07e71c26e3a436290cef395.js:2188
setowl-web-c9a2df36e07e71c26e3a436290cef395.js:9400
(anonimowa funkcja)owl-web-c9a2df36e07e71c26e3a436290cef395.js:9376
..FFF
Failures:
1) Dummy.foo stubbing class once in another example
Failure/Error: stub(Dummy).foo('same_argument')
ArgumentError:
tried to stub foo() with arguments: "same_argument"
# ./rbx_jruby_stubbing_class_method_spec.rb:32:in `(root)'
require 'bogus/rspec'
class Foo
def bar(baz, ene = nil, due = nil)
end
end
describe 'default arguments' do
fake(:foo)
require 'bogus/rspec'
class Foo
def bar(baz, ene = nil, due = nil)
end
end
describe 'default arguments' do
fake(:foo)
require 'bogus/rspec'
class Foo
def bar(baz, default = nil)
end
end
describe 'default arguments' do
fake(:foo)
require 'bogus/rspec'
class Model
def initialize(argument)
end
def self.from_argument(argument)
self.new(argument)
end
end
class InitializerStruct
def self.new(*args)
Class.new do
define_method(:initialize) do |*initializer_args|
arity_error = ArgumentError.new("wrong number of arguments (#{initializer_args.size} for #{args.size})")
raise arity_error unless initializer_args.size == args.size
args.each do |arg|
instance_variable_set("@#{arg}", initializer_args.shift)
end