I hereby claim:
- I am westoque on github.
- I am westoque (https://keybase.io/westoque) on keybase.
- I have a public key whose fingerprint is D5EA 1B04 A98F E6E6 503B 8A24 6696 E9C5 BAAB 1458
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Hello World |
# Activate the gem you are reporting the issue against. | |
unless File.exists?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', '4.0.0' | |
gem 'pg' | |
GEMFILE | |
system 'bundle' | |
end |
var events = require('events'); | |
function Dog() { | |
} | |
util.inherits(Dog, events.EventEmitter); | |
// This statement will override the current `prototype`, thus losing | |
// the methods from EventEmitter. | |
Dog.prototype = { |
var Animal = function() { | |
EventEmitter.call(this); | |
}; | |
util.inherits(Animal, EventEmitter); | |
//////////////////////////////////// | |
// QUESTION AREA | |
//////////////////////////////////// |
describe MessagesController do | |
describe "POST create" do | |
it "saves the message" do | |
lambda { | |
post :create, :message => { "text" => "a quick brown fox" } | |
}.should change(Message, :count).by(1) | |
end | |
end | |
end |
describe MessagesController do | |
describe "POST create" do | |
let(:message) { mock_model(Message).as_null_object } | |
before do | |
Message.stub(:new).and_return(message) | |
end | |
it "creates a new message" do | |
Message.should_receive(:new). |
The image http://mywebsite.com/images/mypicture.jpg cannot be displayed, because it contains errors. |
def create_video_thumb_nails(event) | |
videopath = "#{RAILS_ROOT}/public#{event.video.url}" | |
tpath = "#{RAILS_ROOT}/public/videos/#{event.id}/original/thumbnail.jpg" | |
image_path = "/videos/#{event.id}/original/thumbnail.jpg" | |
system `ffmpeg -itsoffset -30 -i #{videopath} -y -vcodec mjpeg -vframes 1 -an -f rawvideo -s 140x100 #{tpath}` | |
return image_path | |
end |