cap-rightscale 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +40 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/cap-rightscale.gemspec +74 -0
- data/features/cap-rightscale.feature +9 -0
- data/features/step_definitions/cap-rightscale_steps.rb +0 -0
- data/features/support/env.rb +13 -0
- data/lib/cap-rightscale.rb +10 -0
- data/lib/cap-rightscale/configuration.rb +7 -0
- data/lib/cap-rightscale/configuration/rightscale.rb +150 -0
- data/lib/cap-rightscale/recipes/rs_cache.rb +13 -0
- data/spec/cap-rightscale_spec.rb +7 -0
- data/spec/spec_helper.rb +12 -0
- metadata +161 -0
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "rspec", "~> 2.3.0"
|
10
|
+
gem "cucumber", ">= 0"
|
11
|
+
gem "bundler", "~> 1.0.0"
|
12
|
+
gem "jeweler", "~> 1.5.2"
|
13
|
+
gem "rcov", ">= 0"
|
14
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
builder (3.0.0)
|
5
|
+
cucumber (0.10.0)
|
6
|
+
builder (>= 2.1.2)
|
7
|
+
diff-lcs (~> 1.1.2)
|
8
|
+
gherkin (~> 2.3.2)
|
9
|
+
json (~> 1.4.6)
|
10
|
+
term-ansicolor (~> 1.0.5)
|
11
|
+
diff-lcs (1.1.2)
|
12
|
+
gherkin (2.3.3)
|
13
|
+
json (~> 1.4.6)
|
14
|
+
git (1.2.5)
|
15
|
+
jeweler (1.5.2)
|
16
|
+
bundler (~> 1.0.0)
|
17
|
+
git (>= 1.2.5)
|
18
|
+
rake
|
19
|
+
json (1.4.6)
|
20
|
+
rake (0.8.7)
|
21
|
+
rcov (0.9.9)
|
22
|
+
rspec (2.3.0)
|
23
|
+
rspec-core (~> 2.3.0)
|
24
|
+
rspec-expectations (~> 2.3.0)
|
25
|
+
rspec-mocks (~> 2.3.0)
|
26
|
+
rspec-core (2.3.1)
|
27
|
+
rspec-expectations (2.3.0)
|
28
|
+
diff-lcs (~> 1.1.2)
|
29
|
+
rspec-mocks (2.3.0)
|
30
|
+
term-ansicolor (1.0.5)
|
31
|
+
|
32
|
+
PLATFORMS
|
33
|
+
ruby
|
34
|
+
|
35
|
+
DEPENDENCIES
|
36
|
+
bundler (~> 1.0.0)
|
37
|
+
cucumber
|
38
|
+
jeweler (~> 1.5.2)
|
39
|
+
rcov
|
40
|
+
rspec (~> 2.3.0)
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Satoshi Ohki
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
= cap-rightscale
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Contributing to cap-rightscale
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
9
|
+
* Fork the project
|
10
|
+
* Start a feature/bugfix branch
|
11
|
+
* Commit and push until you are happy with your contribution
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2011 Satoshi Ohki. See LICENSE.txt for
|
18
|
+
further details.
|
19
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'rake'
|
11
|
+
|
12
|
+
require 'jeweler'
|
13
|
+
Jeweler::Tasks.new do |gem|
|
14
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
15
|
+
gem.name = "cap-rightscale"
|
16
|
+
gem.homepage = "http://github.com/roothybrid7/cap-rightscale"
|
17
|
+
gem.license = "MIT"
|
18
|
+
gem.summary = %Q{Capistrano extension that maps RightScale parameters to Roles}
|
19
|
+
gem.description = %Q{Capistrano extension that maps RightScale parameters to Roles.}
|
20
|
+
gem.email = "roothybrid7@gmail.com"
|
21
|
+
gem.authors = ["Satoshi Ohki"]
|
22
|
+
# Include your dependencies below. Runtime dependencies are required when using your gem,
|
23
|
+
# and development dependencies are only needed for development (ie running rake tasks, tests, etc)
|
24
|
+
# gem.add_runtime_dependency 'jabber4r', '> 0.1'
|
25
|
+
# gem.add_development_dependency 'rspec', '> 1.2.3'
|
26
|
+
end
|
27
|
+
Jeweler::RubygemsDotOrgTasks.new
|
28
|
+
|
29
|
+
require 'rspec/core'
|
30
|
+
require 'rspec/core/rake_task'
|
31
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
32
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
33
|
+
end
|
34
|
+
|
35
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
36
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
37
|
+
spec.rcov = true
|
38
|
+
end
|
39
|
+
|
40
|
+
require 'cucumber/rake/task'
|
41
|
+
Cucumber::Rake::Task.new(:features)
|
42
|
+
|
43
|
+
task :default => :spec
|
44
|
+
|
45
|
+
require 'rake/rdoctask'
|
46
|
+
Rake::RDocTask.new do |rdoc|
|
47
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
48
|
+
|
49
|
+
rdoc.rdoc_dir = 'rdoc'
|
50
|
+
rdoc.title = "cap-rightscale #{version}"
|
51
|
+
rdoc.rdoc_files.include('README*')
|
52
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{cap-rightscale}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Satoshi Ohki"]
|
12
|
+
s.date = %q{2011-02-02}
|
13
|
+
s.description = %q{Capistrano extension that maps RightScale parameters to Roles.}
|
14
|
+
s.email = %q{roothybrid7@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".rspec",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"cap-rightscale.gemspec",
|
29
|
+
"features/cap-rightscale.feature",
|
30
|
+
"features/step_definitions/cap-rightscale_steps.rb",
|
31
|
+
"features/support/env.rb",
|
32
|
+
"lib/cap-rightscale.rb",
|
33
|
+
"lib/cap-rightscale/configuration.rb",
|
34
|
+
"lib/cap-rightscale/configuration/rightscale.rb",
|
35
|
+
"lib/cap-rightscale/recipes/rs_cache.rb",
|
36
|
+
"spec/cap-rightscale_spec.rb",
|
37
|
+
"spec/spec_helper.rb"
|
38
|
+
]
|
39
|
+
s.homepage = %q{http://github.com/roothybrid7/cap-rightscale}
|
40
|
+
s.licenses = ["MIT"]
|
41
|
+
s.require_paths = ["lib"]
|
42
|
+
s.rubygems_version = %q{1.3.7}
|
43
|
+
s.summary = %q{Capistrano extension that maps RightScale parameters to Roles}
|
44
|
+
s.test_files = [
|
45
|
+
"spec/cap-rightscale_spec.rb",
|
46
|
+
"spec/spec_helper.rb"
|
47
|
+
]
|
48
|
+
|
49
|
+
if s.respond_to? :specification_version then
|
50
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
51
|
+
s.specification_version = 3
|
52
|
+
|
53
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
54
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
55
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
56
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
57
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
58
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
59
|
+
else
|
60
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
61
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
62
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
63
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
64
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
65
|
+
end
|
66
|
+
else
|
67
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
68
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
69
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
70
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
71
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
begin
|
3
|
+
Bundler.setup(:default, :development)
|
4
|
+
rescue Bundler::BundlerError => e
|
5
|
+
$stderr.puts e.message
|
6
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
7
|
+
exit e.status_code
|
8
|
+
end
|
9
|
+
|
10
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
|
11
|
+
require 'cap-rightscale'
|
12
|
+
|
13
|
+
require 'rspec/expectations'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
require 'pp'
|
3
|
+
require 'rubygems'
|
4
|
+
require 'right_resource'
|
5
|
+
|
6
|
+
$:.unshift(File.dirname(__FILE__)) unless
|
7
|
+
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
8
|
+
|
9
|
+
require 'cap-rightscale/configuration'
|
10
|
+
Dir['cap-rightscale/recipes/*.rb'].each { |plugin| load(plugin) }
|
@@ -0,0 +1,150 @@
|
|
1
|
+
module Capistrano
|
2
|
+
class Configuration
|
3
|
+
module RightScale
|
4
|
+
def get_rs_confpath
|
5
|
+
@rs_confpath ||= File.join(ENV['HOME'], ".rsconf", "rsapiconfig.yml")
|
6
|
+
end
|
7
|
+
|
8
|
+
def set_rs_confpath(path)
|
9
|
+
@rs_confpath = path
|
10
|
+
end
|
11
|
+
|
12
|
+
def connect
|
13
|
+
@auth ||= open(get_rs_confpath) {|f| YAML.load(f)}
|
14
|
+
@conn ||= RightResource::Connection.new do |c|
|
15
|
+
c.login(:username => @auth["username"], :password => @auth["password"], :account => @auth["account"])
|
16
|
+
end
|
17
|
+
RightResource::Base.connection = @conn
|
18
|
+
end
|
19
|
+
|
20
|
+
def check_role(role)
|
21
|
+
return false if ENV['HOSTS']
|
22
|
+
return false if ENV['ROLES'] && ENV['ROLES'].split(',').include?("#{role}") == false
|
23
|
+
return true
|
24
|
+
end
|
25
|
+
|
26
|
+
# Get RightScale Server Array
|
27
|
+
# === Parameters
|
28
|
+
# * _role_ - Capistrano role symbol (ex. :app, :web, :db)
|
29
|
+
# * _params[:array_id]_ - ex. :array_id => 1[https://my.rightscale.com/server_arrays/{id}]
|
30
|
+
# * _params[:xxx]_ - ex. :user => "www", :port => 2345, etc...
|
31
|
+
# === Examples
|
32
|
+
# array_id = 1
|
33
|
+
# server_array :app, :array_id => array_id, :port => 1234
|
34
|
+
def server_array(role, params)
|
35
|
+
return [] unless check_role(role)
|
36
|
+
raise ArgumentError, ":array_id is not included in params!![#{params}]" unless params.has_key?(:array_id)
|
37
|
+
|
38
|
+
start = Time.now
|
39
|
+
connect
|
40
|
+
logger.info("SETTING ROLE: #{role}")
|
41
|
+
array = ServerArray.show(params[:array_id])
|
42
|
+
logger.info("querying rightscale for server_array #{array.nickname}...")
|
43
|
+
deployment_name = Deployment.show(array.deployment_href.match(/[0-9]+$/).to_s).nickname
|
44
|
+
logger.info("Deployment #{deployment_name}:")
|
45
|
+
|
46
|
+
params.delete(:array_id) # remove rightscale's parameters
|
47
|
+
|
48
|
+
host_list = ServerArray.instances(array.id).select {|i| i[:state] == "operational"}.map do |instance|
|
49
|
+
ip = instance[:private_ip_address]
|
50
|
+
logger.info("Found server: #{instance[:nickname]}(#{ip})")
|
51
|
+
# server(ip, role, params)
|
52
|
+
ip
|
53
|
+
end
|
54
|
+
role(role, host_list.join(','), params) if host_list
|
55
|
+
puts "Time: #{Time.now - start}"
|
56
|
+
host_list || []
|
57
|
+
end
|
58
|
+
|
59
|
+
# Get servers in deployment
|
60
|
+
# === Parameters
|
61
|
+
# * _role_ - Capistrano role symbol (ex. :app, :web, :db)
|
62
|
+
# * _params[:name_prefix]_ - ex. :name_prefix => "db" (RightScale instance nickname)
|
63
|
+
# * _params[:deployment]_ - ex. :deployment => 1[https://my.rightscale.com/deployments/{id}]
|
64
|
+
# * _params[:xxx]_ - ex. :user => "www", :port => 2345, etc...
|
65
|
+
# === Examples
|
66
|
+
# deployment_id = 1
|
67
|
+
# nickname :db, :name_prefix => "db", :deployment => deployment_id, :user => "mysql"
|
68
|
+
def nickname(role, params)
|
69
|
+
return [] unless check_role(role)
|
70
|
+
raise ArgumentError, ":deployment is not included in params!![#{params}]" unless params.has_key?(:deployment)
|
71
|
+
|
72
|
+
start = Time.now
|
73
|
+
connect
|
74
|
+
logger.info("SETTING ROLE: #{role}")
|
75
|
+
dept = Deployment.show(params[:deployment], :server_settings => 'true')
|
76
|
+
logger.info("querying rightscale for servers #{params[:name_prefix]} in deployment #{dept.nickname}...")
|
77
|
+
srvs = dept.servers.select {|s| s[:state] == "operational"}
|
78
|
+
srvs = srvs.select {|s| /#{params[:name_prefix]}/ =~ s[:nickname]} if params[:name_prefix]
|
79
|
+
|
80
|
+
# remove rightscale's parameters
|
81
|
+
params.delete(:deployment)
|
82
|
+
params.delete(:name_prefix) if params.has_key?(:name_prefix)
|
83
|
+
|
84
|
+
host_list = srvs.map do |server|
|
85
|
+
ip = server[:settings][:private_ip_address]
|
86
|
+
logger.info("Found server: #{server[:nickname]}(#{ip})")
|
87
|
+
# server(ip, role, params)
|
88
|
+
ip
|
89
|
+
end
|
90
|
+
role(role, host_list.join(','), params) if host_list
|
91
|
+
puts "Time: #{Time.now - start}"
|
92
|
+
host_list || []
|
93
|
+
end
|
94
|
+
|
95
|
+
# Get servers matching tags in deployment
|
96
|
+
# === Parameters
|
97
|
+
# * _role_ - Capistrano role symbol (ex. :app, :web, :db)
|
98
|
+
# * _params[:tags]_ - ex. :tags => "xx_db:role=master", "xx_web:role", "xx_lb" (RightScale tags partial matchs 'namespece:predicate=value')
|
99
|
+
# * _params[:deployment]_ - ex. :deployment => 1[https://my.rightscale.com/deployments/{id}]
|
100
|
+
# * _params[:xxx]_ - ex. :user => "www", :port => 2345, etc...
|
101
|
+
# === Examples
|
102
|
+
# deployment_id = 1
|
103
|
+
# nickname :db, :tags => "xx_db:role", :deployment => deployment_id, :port => 3306
|
104
|
+
def tag(role, params)
|
105
|
+
return [] unless check_role(role)
|
106
|
+
raise ArgumentError, ":tags is not included in params!![#{params}]" unless params.has_key?(:tags)
|
107
|
+
raise ArgumentError, ":deployment is not included in params!![#{params}]" unless params.has_key?(:deployment)
|
108
|
+
|
109
|
+
start = Time.now
|
110
|
+
connect
|
111
|
+
logger.info("SETTING ROLE: #{role}")
|
112
|
+
dept = Deployment.show(params[:deployment], :server_settings => 'true')
|
113
|
+
logger.info("querying rightscale for servers matching tags #{params[:tags]} in deployment #{dept.nickname}...")
|
114
|
+
srvs = dept.servers.select {|s| s[:state] == "operational"}
|
115
|
+
|
116
|
+
ts_params = {:resource_type => "ec2_instance", :tags => [params[:tags]]}
|
117
|
+
ts = Tag.search(ts_params).
|
118
|
+
select {|s| s.state == "operational"}.
|
119
|
+
select {|s| s.deployment_href.match(/[0-9]+$/).to_s == params[:deployment].to_s}
|
120
|
+
|
121
|
+
# diff servers in deployment and servers matching tags in deployment
|
122
|
+
srvs_ids = srvs.map {|s| s[:href].match(/[0-9]+$/).to_s}
|
123
|
+
ts_ids = ts.map {|s| s.href.sub("/current", "").match(/[0-9]+$/).to_s}
|
124
|
+
found_ids = srvs_ids & ts_ids
|
125
|
+
|
126
|
+
# remove rightscale's parameters
|
127
|
+
params.delete(:deployment)
|
128
|
+
params.delete(:tags)
|
129
|
+
|
130
|
+
host_list = []
|
131
|
+
if found_ids.size > 0
|
132
|
+
host_list = srvs.select {|s| found_ids.include?(s[:href].match(/[0-9]+$/).to_s)}.map do |server|
|
133
|
+
ip = server[:settings][:private_ip_address]
|
134
|
+
logger.info("Found server: #{server[:nickname]}(#{ip})")
|
135
|
+
#server(ip, role, params)
|
136
|
+
ip
|
137
|
+
end
|
138
|
+
|
139
|
+
role(role, host_list.join(','), params) if host_list
|
140
|
+
end
|
141
|
+
puts "Time: #{Time.now - start}"
|
142
|
+
host_list || []
|
143
|
+
end
|
144
|
+
def clear_cache()
|
145
|
+
puts "CLEAR!!"
|
146
|
+
end
|
147
|
+
END { puts "END" }
|
148
|
+
end
|
149
|
+
end
|
150
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
desc "Alias cache:clear"
|
2
|
+
task :cc do
|
3
|
+
rs_cache.clear
|
4
|
+
end
|
5
|
+
|
6
|
+
desc "Clear rightscale's server list cache"
|
7
|
+
namespace :rs_cache do
|
8
|
+
task :clear do
|
9
|
+
puts "Clear cache all"
|
10
|
+
pp Dir.glob("#{Dir.tmpdir}/cap-rightscale-*/*")
|
11
|
+
FileUtils.rm(Dir.glob("#{Dir.tmpdir}/cap-rightscale-*/*"), {:force => true})
|
12
|
+
end
|
13
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
require 'rspec'
|
4
|
+
require 'cap-rightscale'
|
5
|
+
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
7
|
+
# in ./support/ and its subdirectories.
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: cap-rightscale
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Satoshi Ohki
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-02-02 00:00:00 +09:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 2
|
31
|
+
- 3
|
32
|
+
- 0
|
33
|
+
version: 2.3.0
|
34
|
+
name: rspec
|
35
|
+
requirement: *id001
|
36
|
+
type: :development
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 3
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
version: "0"
|
48
|
+
name: cucumber
|
49
|
+
requirement: *id002
|
50
|
+
type: :development
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ~>
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 23
|
59
|
+
segments:
|
60
|
+
- 1
|
61
|
+
- 0
|
62
|
+
- 0
|
63
|
+
version: 1.0.0
|
64
|
+
name: bundler
|
65
|
+
requirement: *id003
|
66
|
+
type: :development
|
67
|
+
- !ruby/object:Gem::Dependency
|
68
|
+
prerelease: false
|
69
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ~>
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 7
|
75
|
+
segments:
|
76
|
+
- 1
|
77
|
+
- 5
|
78
|
+
- 2
|
79
|
+
version: 1.5.2
|
80
|
+
name: jeweler
|
81
|
+
requirement: *id004
|
82
|
+
type: :development
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
prerelease: false
|
85
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 3
|
91
|
+
segments:
|
92
|
+
- 0
|
93
|
+
version: "0"
|
94
|
+
name: rcov
|
95
|
+
requirement: *id005
|
96
|
+
type: :development
|
97
|
+
description: Capistrano extension that maps RightScale parameters to Roles.
|
98
|
+
email: roothybrid7@gmail.com
|
99
|
+
executables: []
|
100
|
+
|
101
|
+
extensions: []
|
102
|
+
|
103
|
+
extra_rdoc_files:
|
104
|
+
- LICENSE.txt
|
105
|
+
- README.rdoc
|
106
|
+
files:
|
107
|
+
- .document
|
108
|
+
- .rspec
|
109
|
+
- Gemfile
|
110
|
+
- Gemfile.lock
|
111
|
+
- LICENSE.txt
|
112
|
+
- README.rdoc
|
113
|
+
- Rakefile
|
114
|
+
- VERSION
|
115
|
+
- cap-rightscale.gemspec
|
116
|
+
- features/cap-rightscale.feature
|
117
|
+
- features/step_definitions/cap-rightscale_steps.rb
|
118
|
+
- features/support/env.rb
|
119
|
+
- lib/cap-rightscale.rb
|
120
|
+
- lib/cap-rightscale/configuration.rb
|
121
|
+
- lib/cap-rightscale/configuration/rightscale.rb
|
122
|
+
- lib/cap-rightscale/recipes/rs_cache.rb
|
123
|
+
- spec/cap-rightscale_spec.rb
|
124
|
+
- spec/spec_helper.rb
|
125
|
+
has_rdoc: true
|
126
|
+
homepage: http://github.com/roothybrid7/cap-rightscale
|
127
|
+
licenses:
|
128
|
+
- MIT
|
129
|
+
post_install_message:
|
130
|
+
rdoc_options: []
|
131
|
+
|
132
|
+
require_paths:
|
133
|
+
- lib
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
none: false
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
hash: 3
|
140
|
+
segments:
|
141
|
+
- 0
|
142
|
+
version: "0"
|
143
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
|
+
none: false
|
145
|
+
requirements:
|
146
|
+
- - ">="
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
hash: 3
|
149
|
+
segments:
|
150
|
+
- 0
|
151
|
+
version: "0"
|
152
|
+
requirements: []
|
153
|
+
|
154
|
+
rubyforge_project:
|
155
|
+
rubygems_version: 1.3.7
|
156
|
+
signing_key:
|
157
|
+
specification_version: 3
|
158
|
+
summary: Capistrano extension that maps RightScale parameters to Roles
|
159
|
+
test_files:
|
160
|
+
- spec/cap-rightscale_spec.rb
|
161
|
+
- spec/spec_helper.rb
|