This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module NginxMatchers | |
RSpec::Matchers.define :permit do |ip_addresses| | |
match do |content| | |
escaped_url = Regexp.escape @url | |
ip_addresses.all?{ |ip_address| | |
content=~/location #{escaped_url} \{[^}]+allow #{ip_address};/m | |
} | |
end | |
chain :access_to do |url| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Determine which apps require the 'app' tier to be set up on this node: | |
tier_apps = ai_stack.apps_for_tier(node, 'app') | |
# Initialize an array to store user names that will later be added to the | |
# "sshlogin" group: | |
sshlogin_users = [] | |
# Perform configuration required by all apps: | |
unless tier_apps.empty? | |
# Ensure all dependencies necessary to build Ruby are present: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Cookbook Name:: rails_app | |
# Recipe:: default | |
# | |
# Copyright 2014, AbelsonInfo | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
include_recipe 'rails_app_server::default' |
NewerOlder