spec
|--- apis #do not put into controllers folder.
|--- your_api_test_spec.rb
|--- controllers
|--- models
|--- factories
|--- views
# RSpec matcher to spec delegations. | |
# | |
# Usage: | |
# | |
# describe Post do | |
# it { should delegate(:name).to(:author).with_prefix } # post.author_name | |
# it { should delegate(:month).to(:created_at) } | |
# it { should delegate(:year).to(:created_at) } | |
# end |
Name : Sam | |
Serial : eJzzzU/OLi0odswsqglOzK0xsjQzNzI2NjA1q3GuMQQAnJAJjw== |
{ | |
"always_show_minimap_viewport": true, | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", |
{ | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"AlignTab", | |
"Better CoffeeScript", | |
"BlameHighlighter", | |
"BracketHighlighter", |
chmod +x git-hooks/pending_migrations_check.rb | |
cd .git/hooks | |
ln -is ../../git-hooks/pending_migrations_check.rb post-merge | |
ln -is ../../git-hooks/pending_migrations_check.rb post-checkout |
class ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
Most instructions for using Capistrano tell you how to make it restart Phusion Passenger by 'touch'ing the restart.txt
file, but this doesn't immediately restart the app - instead the first person to try to use the application will cause it to be restarted, so they will see a delay of at least a few seconds.
This shows how to add a post-deploy task to 'ping' the server, to cause it to restart immediately.
Then add a deploy:ping
task to config/deploy.rb
and set it to run automatically after deploy:restart
. Alternatively you could put it into the deploy:restart
task directly.
TODO: Test the response HTTP header of the ping, that it is a 200, and not some other error response (404/500).
You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.
- postgresql
- postgresql-client
- libpq-dev
/** | |
* @example | |
* <span ng-html='foo.bar'></span> | |
*/ | |
app.directive('ngHtml', function() { | |
return function(scope, element, attrs) { | |
scope.$watch(attrs.ngHtml, function(value) { | |
element[0].innerHTML = value; | |
}); | |
} |