Monthly Archive: August 2016

Single beforeEach() in Jasmine 0

Single beforeEach() in Jasmine

  << @philipraath @olignyf a beforeAll or beforeEach that is not inside of any describe will be applied to all suites/specs, as appropriate, during the execution of the suite. >> https://github.com/jasmine/jasmine/issues/811

yum timeout error 0

yum timeout error

Solution add timeout=60 in the main section of /etc/yum.conf $> sudo nano /etc/yum.conf [main] timeout=60 (...)  

Uninstall node.js on CentOS 6 7 0

Uninstall node.js on CentOS 6 7

Yes node has an uninstaller ! Get the .tar.gz of the release you have, for example for 0.10.46 https://github.com/nodejs/node/releases/tag/v0.10.46 Assuming it is downloaded in your your home ~/ $> tar -xzvf node-0.10.46.tar.gz $> cd...

Replace file_columns on Ruby On Rails to Carrierwave 0

Replace file_columns on Ruby On Rails to Carrierwave

Let's use CarrierWave Add to Gemfile gem 'carrierwave' gem 'mini_magick' Run this $> bundle install In your model add class SellerProduct < ActiveRecord::Base   mount_uploader :image, ImageUploader Then launch your server $> rails server...

endsWith() for node 0.10.X 0

endsWith() for node 0.10.X

You should not use endsWith() in node 0.10.X even though it exists because it is not supported and does not pass tests. The alternative is : file.originalFilename.endsWith(".p12") => file.originalFilename.match(/\.p12$/) If you look at node.green...

Upgrade Jasmine 1.3 to 2.4 0

Upgrade Jasmine 1.3 to 2.4

Quick upgrade with those Regexp replaces /createSpyObj/ => " jasmine.createSpyObj" /createSpy/ => "jasmine.createSpy" /\.andCallFake/ => ".and.callFake" /\.andReturn/ => ".and.returnValue" /\.andCallThrough/ => ".and.callThrough" /toNotMatch/ => "not.toMatch" /this.addMatchers/ => "jasmine.addMatchers" /\.calls\[0\]\./ => ".calls.first()" /\.calls\[(\d)\]\./ => ".calls.all()[$1]"...