Change the Default Controller Name in Rails Functional Tests
Rails will infer the controller you want to test from the class name of the test case. For example...
class PeopleControllerTest < ActionController::TestCase
end
will test the app/controllers/people_controller.rb.
To change this is trivial. Us...
Written by Sean Behan on 10/23/2013
Running Gem Server to View Docs for Ruby Libraries on Localhost
gem server
will boot up documentation on port 8808 by default pass it the -p flag followed by the port number to change.
gem server -p3000
Written by Sean Behan on 06/17/2012
How to Add Additional Sub Directories to the Default Rails Test:Unit File Structure
# Edit Rakefile in project root
#
# Add a new rake test task... E.g., rake test:lib, below everything else in that file...
# Alternatively, add a task in lib/tasks/ directory and plop in the same code
namespace :test do
desc "Test lib source"
...
Written by Sean Behan on 06/17/2012
How to Generate a UUID in PHP 7
Here is a little snippet for generating a UUID in PHP 7
function uuid(){
$data = random_bytes(16);
$data[6] = chr(ord($data[6]) & 0x0f | 0x40);
$data[8] = chr(ord($data[8]) & 0x3f | 0x80);
return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_...
Written by Sean Behan on 10/26/2017
Why Doesn't Google Offer Dedicated Virtual Hosting?
AppEngine is nice, but it's a little limiting. No cron jobs, filesystem use nor customization with third party libraries, software, databases, languages, etc. You can't deploy PHP, Ruby and or your 'other' favorite web development tools.
You can only use ...
Written by Sean Behan on 06/17/2012