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
bash -c ' | |
<%= "export https_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> | |
distro=`uname -s` | |
if test "x$distro" = "xSunOS"; then | |
if test -d "/usr/sfw/bin"; then | |
PATH=/usr/sfw/bin:$PATH | |
export PATH | |
fi |
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
if [[ -z $TMUX ]]; then | |
server_name="--servername VIM" | |
else | |
server_name="--servername vim-`tmux display-message -p '#S.#I'`" | |
fi | |
alias vis="vim $server_name --remote-tab-silent" | |
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
require 'spec_helper' | |
require 'open-uri' | |
require 'pedant/rspec/common' | |
require 'pedant/rspec/node_util' | |
require 'spec/support/node_run_util' | |
describe "Node Runs API endpoint" do | |
include_context "node_run_util" | |
include Pedant::RSpec::NodeUtil | |
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
Gem::Specification.new do |s| | |
s.name = 'oc-reporting-pedant-tests' | |
s.version = '0.0.1' | |
s.date = '2012-11-05' | |
s.summary = "API tests for Opscode's Private Chef Reporting Services" | |
s.description = "API tests for Opscode's Private Chef Reporting Server; requires Pedant to actually run" | |
s.authors = ["Marc Paradise"] | |
s.email = '[email protected]' | |
s.files = Dir['spec/**/*_spec.rb'] + Dir['lib/**/*.rb'] | |
s.homepage = 'http://opscode.com' |
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
source :rubygems | |
gem 'chef-pedant-core', :git => "[email protected]:opscode/chef-pedant-core.git" | |
gem 'oc-chef-pedant-core', :git => "[email protected]:opscode/oc-chef-pedant-core.git" | |
gem 'oc-reporting-pedant-tests', :path => "." |
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
def run_callback_from_file(callback_file) | |
if whyrun_mode? | |
recipe_eval { } | |
else | |
if ::File.exist?(callback_file) | |
Dir.chdir(release_path) do | |
Chef::Log.info "#{@new_resource} running deploy hook #{callback_file}" | |
recipe_eval { from_file(callback_file) } | |
end | |
end |
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
class Chef::Provider::Service::Simple <<< Chef::Provider::Service | |
def shared_requirements | |
requirements.assert(:all_actions) do |a| | |
a.assertion { @new_resource.status_command or @new_resource.supports[:status] or | |
(!ps_cmd.nil? and !ps_cmd.empty?) } | |
a.failure_message Chef::Exceptions::Service, "#{@new_resource} could not determine how to inspect the process table, please set this nodes 'command.ps' attribute" | |
end | |
requirements.assert(:all_actions) do |a| | |
a.assertion { !@ps_command_failed } |
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
elsif File.exists?('/etc/slackware-version') | |
platform "slackware" | |
platform_family "slackware" | |
platform_version File.read("/etc/slackware-version").scan(/(\d+|\.+)/).join | |
elsif File.exists?('/etc/arch-release') | |
platform "arch" | |
platform_family "arch" | |
# no way to determine platform_version in a rolling release distribution | |
# kernel release will be used - ex. 2.6.32-ARCH |
NewerOlder