You require a working archlinuxarm operarting system and the development tools:
$ pacman -S base-devel
| # This custom matcher can be used to test state machine | |
| # | |
| # Examples | |
| # | |
| # it { should have_event(:status, :event_name, [:state1, :state2] => [:state3, :state4]) } | |
| # it { should have_event(:status, :event_name, { | |
| # :state1 => :state3, | |
| # :state1 => :state4, | |
| # :state3 => :state3, | |
| # :state2 => :state4 |
| require 'spec/support/grep_matcher' | |
| describe do | |
| disallow_presence_of pattern: "send(.*#", | |
| location: "app/", | |
| description: "Do not use dynamic method invocations", | |
| failure: "Please change dynamic method call to something more sane." | |
| end |
| # Hack to change the Rails cookie serializer from Marshal to JSON and therefore allow the session | |
| # to be shared between different languages but also avoid that someone knowing the | |
| # cookie secret key could execute arbitrary code on the server by unmarshalling | |
| # modified Ruby code added to the session/permanent cookie. | |
| # | |
| # Note that all users will beed to login again since both the remember me cookie and the session cookies | |
| # won't be valid. Note also that the remember me cookie is tested multiple times per request even when it fails. | |
| # for performance reasons you might want to delete it if these extra cycles are too costly for you. | |
| # | |
| # Rails 4 (not tested on Rails 3). |
| $ rspec --format MacVimFormatter --color spec |
RE: teampoltergeist/poltergeist#44
Use Rack::SimpleEndpoint to prevent Poltergeist/PhantomJS from crashing on TTF fonts.
Create config/initializers/middleware-deny-ttf-to-phantomjs-under-test.rb:
if Rails.env.test?
require 'rack/contrib/simple_endpoint'
Rails.application.config.middleware.insert_after Rack::Runtime, Rack::SimpleEndpoint, /\.ttf$/ do |req, res|RE: teampoltergeist/poltergeist#44
Use Rack::SimpleEndpoint to prevent Poltergeist/PhantomJS from crashing on TTF fonts.
In config/environments/test.rb, add
require 'rack/contrib/simple_endpoint'
config.middleware.insert_after Rack::Runtime, Rack::SimpleEndpoint, /\.ttf$/ do |req, res, match|
res.status = '403'
"I will not serve TTF fonts in test mode."
| # Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed. | |
| # We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies. | |
| # Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module | |
| # | |
| # Deployment structure | |
| # | |
| # SERVER: | |
| # /etc/init.d/nginx (1. nginx) | |
| # /home/app/public_html/app_production/current (Capistrano directory) | |
| # |