Create the following folder structure in your cookbook:
test
└── integrationq
├── helpers
│ ├── serverspec
│ │ ├── shared_serverspec_tests
│ │ │ └── shared_tests2.rb
│ │ └── spec_helper.rb
Create the following folder structure in your cookbook:
test
└── integrationq
├── helpers
│ ├── serverspec
│ │ ├── shared_serverspec_tests
│ │ │ └── shared_tests2.rb
│ │ └── spec_helper.rb
A collection of Splunk recipes for Heroku logs. Instructions for setting up Splunk Storm with Heroku can be found here. For the vast majority of these recipes you'll need to have enabled the Heroku labs feature, log-runtime-metrics, for your application.
The Ember router is getting number of enhancements that will greatly enhance its power, reliability, predictability, and ability to handle asynchronous loading logic (so many abilities), particularly when used in conjunction with promises, though the API is friendly enough that a deep understanding of promises is not required for the simpler use cases.
require 'chefspec' | |
module SpecHelper | |
def global_stubs | |
# Don't worry about external cookbook dependencies | |
Chef::Cookbook::Metadata.any_instance.stub(:depends) | |
# Test each recipe in isolation, regardless of includes | |
@included_recipes = [] | |
Chef::RunContext.any_instance.stub(:loaded_recipe?).and_return(false) |
#!/usr/bin/env python | |
""" | |
How to use it: | |
1. Just `kill -2 PROCESS_ID` or `kill -15 PROCESS_ID` , The Tornado Web Server Will shutdown after process all the request. | |
2. When you run it behind Nginx, it can graceful reboot your production server. | |
3. Nice Print in http://weibo.com/1682780325/zgkb7g8k7 | |
""" |
module AuthHelper | |
def http_login | |
user = 'username' | |
pw = 'password' | |
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user,pw) | |
end | |
end | |
module AuthRequestHelper | |
# |
Changes:
this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .
ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.
this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.
This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.
require "timeout" | |
module WaitSteps | |
extend RSpec::Matchers::DSL | |
matcher :become_true do | |
match do |block| | |
begin | |
Timeout.timeout(Capybara.default_wait_time) do | |
sleep(0.1) until value = block.call |