You need to update circle.yml:
machine:
node: # add node dependency
version:
7.4
environment:
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
require 'spec_helper' | |
# Based on https://github.com/rails/ssl_requirement/blob/master/lib/ssl_requirement.rb | |
class SslRequirement | |
def initialize(app, options= {}) | |
@app = app | |
@allowed = options[:allowed] | |
@required = options[:required] | |
end | |
## Most important settings
Create a new facebook app (1) and make sure the canvas url (2) in the basic tab matches the host and port configured with Capybara.server_port and Capybara.app_host. Activating sandbox mode (3) in the advanced tab enables you to roll without providing an SSL canvas url. You want to set the display mode (4) of your facebook dialogs to page, which is also the default.
Look at the following image...
...it shows an object being tested.
You can't see inside the object. All you can do is send it messages. This is an important point to make because we should be "testing the interface, and NOT the implementation" - doing so will allow us to change the implementation without causing our tests to break.
## | |
# This files shows some possible implementations of the Singleton pattern | |
# in Ruby. I'm not a huge fan of the Singleton pattern, but it's nice | |
# in some cases. In this file I'm going to implement a simple logger. | |
# | |
## | |
# The first implementation that can come to our minds is to create a class | |
# that holds an instance as a class variable that can be accessed through |
<%= semantic_form_for @parent do |a| %> | |
<%= a.inputs "Family Details" do %> | |
<%= a.input :name %> | |
<%= a.input :user %> | |
<%= a.input :region %> | |
<% end %> | |
<%= a.inputs "Children" do %> | |
<table> |
// Stateful is a simple implementation of the state pattern for javascript. | |
// | |
// Read more on this design pattern here: | |
// -> http://sourcemaking.com/design_patterns/state | |
// | |
// Initialize Stateful by passing it an object, the name of the initial state | |
// (defaults to "default"), and an optional hash of interfaces that will be | |
// applied for each state. If these interfaces are not passed, they default to | |
// the object's constructor's States property. So, for example: | |
// |
var parent = function() { | |
var spawn = require('child_process').spawn; | |
var child = spawn(process.execPath, [process.argv[1], 123]); | |
var stdout = ''; | |
var stderr = ''; | |
child.stdout.on('data', function(buf) { | |
console.log('[STR] stdout "%s"', String(buf)); | |
stdout += buf; | |
}); | |
child.stderr.on('data', function(buf) { |
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |