Navigation Menu

Skip to content

Commit

Permalink
modified.
Browse files Browse the repository at this point in the history
  • Loading branch information
kappa committed Feb 1, 2014
1 parent 8936d30 commit f7ff3fe
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 48 deletions.
20 changes: 19 additions & 1 deletion Rakefile
@@ -1,6 +1,24 @@
require 'rake'
require 'rspec/core/rake_task'

#
require 'fileutils'
require 'aws-sdk'
require 'yaml'
#
task :genspec do
config = YAML.load(File.read("#{ENV['HOME']}/path/to/config/deploy/config.yml"))
AWS.config(config)
#
ORIG = "./spec_template"
SPEC = "./spec"
#
servers = AWS.ec2.instances.select {|i| i.tags[:Name] == 'setup' && i.status == :running}.map(&:dns_name)
servers.each do |server|
puts "Created #{SPEC}/#{server}/check_spec.rb"
FileUtils.cp_r("#{ORIG}","#{SPEC}""/""#{server}") unless FileTest.exist?(server)
end
end
#
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = 'spec/*/*_spec.rb'
end
29 changes: 0 additions & 29 deletions spec/localhost/check_spec.rb

This file was deleted.

18 changes: 0 additions & 18 deletions spec_generater.rb

This file was deleted.

13 changes: 13 additions & 0 deletions spec_template/check_spec.rb
@@ -0,0 +1,13 @@
require 'spec_helper'

describe package('nginx') do
it { should be_installed }
end

describe package('php5') do
it { should be_installed }
end

describe package('mysql-server') do
it { should be_installed }
end

0 comments on commit f7ff3fe

Please sign in to comment.