capistrano-rack 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +35 -0
- data/.travis.yml +11 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +175 -0
- data/LICENSE +22 -0
- data/LICENSE.txt +21 -0
- data/README.md +56 -0
- data/Rakefile +5 -0
- data/capistrano-rack.gemspec +28 -0
- data/lib/capistrano/rack.rb +65 -0
- data/lib/capistrano/rack/version.rb +5 -0
- data/tasks/rspec.rake +3 -0
- metadata +134 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7d066e18263d780bab15ff95203f2b3a38abe981
|
4
|
+
data.tar.gz: 2d9a77c0398e9b1c2dcf4f580039f5fa1098f7cf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 80f9422987ec6385f054536536a1905b301048dcfadb1f66590a1fe2b6883771537e30b449e957c435f153f216001dbec32008b11d888e6f0d2f1e082488e13e
|
7
|
+
data.tar.gz: 0e669b7195804499fa26e5e9f549a404fed7fb39a9d912925d0852a371cda36a0fe9078f14f9210b5d5d5b9e4ab0c3f8d6b60413a87cdb19a5fe0c65753cf21a
|
data/.gitignore
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/vendor/bundle
|
26
|
+
/lib/bundler/man/
|
27
|
+
|
28
|
+
# for a library or gem, you might want to ignore these files since the code is
|
29
|
+
# intended to run in multiple environments; otherwise, check them in:
|
30
|
+
# Gemfile.lock
|
31
|
+
# .ruby-version
|
32
|
+
# .ruby-gemset
|
33
|
+
|
34
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
35
|
+
.rvmrc
|
data/.travis.yml
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 2.2.3
|
4
|
+
before_install: gem install bundler
|
5
|
+
deploy:
|
6
|
+
provider: rubygems
|
7
|
+
gem: capistrano-rack
|
8
|
+
api_key:
|
9
|
+
secure: o/BZXJzqa7m1C4Iyg6B6TxTCFp627zgfMCTqJHqxYBI4SPT8BNU+BNzPOC0/fvP5n0SIuPVwzbUSlpN91paI9+PegaV4xhpT1MwaZz6AdqqosADlVvKNfwCdiKrWCHUP5uyApyxgiax2paqXtdWYGKICqNJgYMtQ6XALWL6FMFM/quaeMd+WYyj1jr5sVJxDdITuqMG1/F3LibVTK8GhYy0bdmyOwMYvVJwtP4Fj9T8z4Mz5ZvIDE7v0qFWgmm9HOfgvd+lWSlJeJ2oj5EhVyGYpxNtV7g791Bg6m89f9U3PKXDtmzTaX0YXYovXRGwgMZtgS+Npi3HxsegePahnmQTgX2Nwgq6R+fNEifssq1eXKtMtaw+/Z76umbGeOn57xUToLS81GDjkhjVrMNdkRm3h5TZs3YzJnQlB6FkDpOCGEqZRBM8rM9DXSRuoOg7hNBAohKSUW0acrvO+lBTOb+6RzMRevUOXYpm6vi50gsBBJgNItApyqsh9r6FcX+9M7FKi9keQ0hpZPlvyosdu6xVJdgK4fHtXNm8QD2pZvAkRCjjPjRoHbsiPzrEcMD5bdau/NBfk3kgam9umhK8sNKOnltUKPoJ0iqfrhuNX8OijxCiAxPlw1kNnZRSIwkrTE7xsHADFdO+MJtA9NYB0mYdRdzPppctMjGhC01mzwT8=
|
10
|
+
on:
|
11
|
+
tags: true
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,175 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
capistrano-rack (0.1.0)
|
5
|
+
capistrano (~> 3.4, >= 3.0.0)
|
6
|
+
fog (~> 1.35)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
CFPropertyList (2.3.2)
|
12
|
+
builder (3.2.2)
|
13
|
+
capistrano (3.4.0)
|
14
|
+
i18n
|
15
|
+
rake (>= 10.0.0)
|
16
|
+
sshkit (~> 1.3)
|
17
|
+
colorize (0.7.7)
|
18
|
+
diff-lcs (1.2.5)
|
19
|
+
excon (0.45.4)
|
20
|
+
fission (0.5.0)
|
21
|
+
CFPropertyList (~> 2.2)
|
22
|
+
fog (1.35.0)
|
23
|
+
fog-aliyun
|
24
|
+
fog-atmos
|
25
|
+
fog-aws (>= 0.6.0)
|
26
|
+
fog-brightbox (~> 0.4)
|
27
|
+
fog-core (~> 1.32)
|
28
|
+
fog-dynect (~> 0.0.2)
|
29
|
+
fog-ecloud (~> 0.1)
|
30
|
+
fog-google (>= 0.1.1)
|
31
|
+
fog-json
|
32
|
+
fog-local
|
33
|
+
fog-powerdns (>= 0.1.1)
|
34
|
+
fog-profitbricks
|
35
|
+
fog-radosgw (>= 0.0.2)
|
36
|
+
fog-riakcs
|
37
|
+
fog-sakuracloud (>= 0.0.4)
|
38
|
+
fog-serverlove
|
39
|
+
fog-softlayer
|
40
|
+
fog-storm_on_demand
|
41
|
+
fog-terremark
|
42
|
+
fog-vmfusion
|
43
|
+
fog-voxel
|
44
|
+
fog-xenserver
|
45
|
+
fog-xml (~> 0.1.1)
|
46
|
+
ipaddress (~> 0.5)
|
47
|
+
nokogiri
|
48
|
+
fog-aliyun (0.0.10)
|
49
|
+
fog-core (~> 1.27)
|
50
|
+
fog-json (~> 1.0)
|
51
|
+
ipaddress (~> 0.8)
|
52
|
+
xml-simple (~> 1.1)
|
53
|
+
fog-atmos (0.1.0)
|
54
|
+
fog-core
|
55
|
+
fog-xml
|
56
|
+
fog-aws (0.7.6)
|
57
|
+
fog-core (~> 1.27)
|
58
|
+
fog-json (~> 1.0)
|
59
|
+
fog-xml (~> 0.1)
|
60
|
+
ipaddress (~> 0.8)
|
61
|
+
fog-brightbox (0.9.0)
|
62
|
+
fog-core (~> 1.22)
|
63
|
+
fog-json
|
64
|
+
inflecto (~> 0.0.2)
|
65
|
+
fog-core (1.32.1)
|
66
|
+
builder
|
67
|
+
excon (~> 0.45)
|
68
|
+
formatador (~> 0.2)
|
69
|
+
mime-types
|
70
|
+
net-scp (~> 1.1)
|
71
|
+
net-ssh (>= 2.1.3)
|
72
|
+
fog-dynect (0.0.2)
|
73
|
+
fog-core
|
74
|
+
fog-json
|
75
|
+
fog-xml
|
76
|
+
fog-ecloud (0.3.0)
|
77
|
+
fog-core
|
78
|
+
fog-xml
|
79
|
+
fog-google (0.1.1)
|
80
|
+
fog-core
|
81
|
+
fog-json
|
82
|
+
fog-xml
|
83
|
+
fog-json (1.0.2)
|
84
|
+
fog-core (~> 1.0)
|
85
|
+
multi_json (~> 1.10)
|
86
|
+
fog-local (0.2.1)
|
87
|
+
fog-core (~> 1.27)
|
88
|
+
fog-powerdns (0.1.1)
|
89
|
+
fog-core (~> 1.27)
|
90
|
+
fog-json (~> 1.0)
|
91
|
+
fog-xml (~> 0.1)
|
92
|
+
fog-profitbricks (0.0.5)
|
93
|
+
fog-core
|
94
|
+
fog-xml
|
95
|
+
nokogiri
|
96
|
+
fog-radosgw (0.0.4)
|
97
|
+
fog-core (>= 1.21.0)
|
98
|
+
fog-json
|
99
|
+
fog-xml (>= 0.0.1)
|
100
|
+
fog-riakcs (0.1.0)
|
101
|
+
fog-core
|
102
|
+
fog-json
|
103
|
+
fog-xml
|
104
|
+
fog-sakuracloud (1.3.3)
|
105
|
+
fog-core
|
106
|
+
fog-json
|
107
|
+
fog-serverlove (0.1.2)
|
108
|
+
fog-core
|
109
|
+
fog-json
|
110
|
+
fog-softlayer (1.0.2)
|
111
|
+
fog-core
|
112
|
+
fog-json
|
113
|
+
fog-storm_on_demand (0.1.1)
|
114
|
+
fog-core
|
115
|
+
fog-json
|
116
|
+
fog-terremark (0.1.0)
|
117
|
+
fog-core
|
118
|
+
fog-xml
|
119
|
+
fog-vmfusion (0.1.0)
|
120
|
+
fission
|
121
|
+
fog-core
|
122
|
+
fog-voxel (0.1.0)
|
123
|
+
fog-core
|
124
|
+
fog-xml
|
125
|
+
fog-xenserver (0.2.2)
|
126
|
+
fog-core
|
127
|
+
fog-xml
|
128
|
+
fog-xml (0.1.2)
|
129
|
+
fog-core
|
130
|
+
nokogiri (~> 1.5, >= 1.5.11)
|
131
|
+
formatador (0.2.5)
|
132
|
+
i18n (0.7.0)
|
133
|
+
inflecto (0.0.2)
|
134
|
+
ipaddress (0.8.0)
|
135
|
+
mime-types (2.6.2)
|
136
|
+
mini_portile (0.6.2)
|
137
|
+
multi_json (1.11.2)
|
138
|
+
net-scp (1.2.1)
|
139
|
+
net-ssh (>= 2.6.5)
|
140
|
+
net-ssh (3.0.1)
|
141
|
+
nokogiri (1.6.6.2)
|
142
|
+
mini_portile (~> 0.6.0)
|
143
|
+
rake (10.4.2)
|
144
|
+
rspec (3.3.0)
|
145
|
+
rspec-core (~> 3.3.0)
|
146
|
+
rspec-expectations (~> 3.3.0)
|
147
|
+
rspec-mocks (~> 3.3.0)
|
148
|
+
rspec-core (3.3.2)
|
149
|
+
rspec-support (~> 3.3.0)
|
150
|
+
rspec-expectations (3.3.1)
|
151
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
152
|
+
rspec-support (~> 3.3.0)
|
153
|
+
rspec-mocks (3.3.2)
|
154
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
155
|
+
rspec-support (~> 3.3.0)
|
156
|
+
rspec-support (3.3.0)
|
157
|
+
sshkit (1.7.1)
|
158
|
+
colorize (>= 0.7.0)
|
159
|
+
net-scp (>= 1.1.2)
|
160
|
+
net-ssh (>= 2.8.0)
|
161
|
+
xml-simple (1.1.5)
|
162
|
+
|
163
|
+
PLATFORMS
|
164
|
+
ruby
|
165
|
+
|
166
|
+
DEPENDENCIES
|
167
|
+
bundler (~> 1.10)
|
168
|
+
capistrano
|
169
|
+
capistrano-rack!
|
170
|
+
fog
|
171
|
+
rake (~> 10.0)
|
172
|
+
rspec (~> 3.3)
|
173
|
+
|
174
|
+
BUNDLED WITH
|
175
|
+
1.10.6
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Faissal Elamraoui
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 TODO: Write your name
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# capistrano-rack [![Build Status](https://travis-ci.org/amrfaissal/capistrano-rack.svg?branch=master)](https://travis-ci.org/amrfaissal/capistrano-rack)
|
2
|
+
|
3
|
+
Capistrano recipe to be served with Rackspace
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your `Gemfile`:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'capistrano-rack'
|
11
|
+
```
|
12
|
+
|
13
|
+
and in your `Capfile`:
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'capistrano/rack'
|
17
|
+
```
|
18
|
+
|
19
|
+
And then execute:
|
20
|
+
|
21
|
+
$ bundle && bundle exec rake
|
22
|
+
|
23
|
+
Make sure to have a `~/.rack/config` in your `$HOME` directory with these properties:
|
24
|
+
|
25
|
+
```text
|
26
|
+
region = rackspace_region (e.g LON)
|
27
|
+
username = your_username
|
28
|
+
api-key = your_api_key
|
29
|
+
```
|
30
|
+
|
31
|
+
If you are already a [**Rackspace CLI**](https://developer.rackspace.com/docs/rack-cli/) user, you can skip the step above.
|
32
|
+
|
33
|
+
## Usage
|
34
|
+
|
35
|
+
You can use `capistrano-rack` recipe in your deployment script like this:
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
rackspace_servers(:roles, '^regex')
|
39
|
+
```
|
40
|
+
|
41
|
+
where `regex` is a regular expression to filter throught the names of your servers.
|
42
|
+
|
43
|
+
If you want to use a different configuration file for Rackspace, `rackspace_servers()` have an additional parameter:
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
rackspace_servers(:roles, '^regex', '/path/to/my/config/file')
|
47
|
+
```
|
48
|
+
|
49
|
+
## Contributing
|
50
|
+
|
51
|
+
Bug reports and pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
52
|
+
|
53
|
+
|
54
|
+
## License
|
55
|
+
|
56
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require 'capistrano/rack/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "capistrano-rack"
|
9
|
+
spec.version = Capistrano::Rack::VERSION
|
10
|
+
spec.version = "#{spec.version}-alpha-#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
|
11
|
+
spec.authors = ["Faissal Elamraoui"]
|
12
|
+
spec.email = ["amr.faissal@gmail.com"]
|
13
|
+
|
14
|
+
spec.summary = %q{Capistrano with Rackspace}
|
15
|
+
spec.description = %q{Capistrano recipe to be served with Rackspace}
|
16
|
+
spec.homepage = "https://amrfaissal.github.io/capistrano-rack/"
|
17
|
+
spec.license = "MIT"
|
18
|
+
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_runtime_dependency "capistrano", "~> 3.4", ">= 3.0.0"
|
24
|
+
spec.add_runtime_dependency "fog", "~> 1.35"
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
27
|
+
spec.add_development_dependency "rspec", "~> 3.3"
|
28
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'fog'
|
3
|
+
require 'capistrano'
|
4
|
+
require 'capistrano/rack/version'
|
5
|
+
|
6
|
+
#
|
7
|
+
# Properties Reader
|
8
|
+
#
|
9
|
+
class PropertiesReader
|
10
|
+
def initialize(file)
|
11
|
+
@file = file
|
12
|
+
@properties = {}
|
13
|
+
IO.foreach(file) do |line|
|
14
|
+
@properties[$1.strip] = $2 if line =~ /([^=]*)=(.*)\/\/(.*)/ || line =~ /([^=]*)=(.*)/
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def to_s
|
19
|
+
output = "File Name #{@file} \n"
|
20
|
+
@properties.each {|key,value| output += "#{key}= #{value} \n"}
|
21
|
+
output
|
22
|
+
end
|
23
|
+
|
24
|
+
def get(key)
|
25
|
+
@properties[key].strip
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
module Capistrano
|
31
|
+
module Rack
|
32
|
+
#
|
33
|
+
# Retrieves a list of Rackspace instances containing a tag list
|
34
|
+
# which matches a supplied hash. Matching instances are applied
|
35
|
+
# to the Cap server list.
|
36
|
+
#
|
37
|
+
# Usage: servers {'app' => 'zumba', 'stack' => 'web'}
|
38
|
+
#
|
39
|
+
def rackspace_servers(role=nil, regex_string='', config_file=nil)
|
40
|
+
props_reader = PropertiesReader.new(config_file || "#{ENV['HOME']}/.rack/config")
|
41
|
+
rackspace = Fog::Compute.new(
|
42
|
+
{
|
43
|
+
:provider => 'Rackspace',
|
44
|
+
:rackspace_api_key => props_reader.get("api-key"),
|
45
|
+
:rackspace_username => props_reader.get("username"),
|
46
|
+
:rackspace_region => props_reader.get("region"),
|
47
|
+
:version => :v2,
|
48
|
+
:connection_options => {}
|
49
|
+
})
|
50
|
+
response = rackspace.list_servers
|
51
|
+
response.body['servers'].select do |rackspace_server|
|
52
|
+
if !rackspace_server["name"].match(/#{regex_string}/).nil?
|
53
|
+
# Iterate over the list of private IP addresses
|
54
|
+
rackspace_server['addresses']['private'].select do |private_addr|
|
55
|
+
server (private_addr['addr']), %w{role || :app}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
|
65
|
+
self.extend Capistrano::Rack
|
data/tasks/rspec.rake
ADDED
metadata
ADDED
@@ -0,0 +1,134 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-rack
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Faissal Elamraoui
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.4'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.0.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.4'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.0.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: fog
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.35'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.35'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: bundler
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '1.10'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '1.10'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: rake
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '10.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '10.0'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rspec
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '3.3'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '3.3'
|
89
|
+
description: Capistrano recipe to be served with Rackspace
|
90
|
+
email:
|
91
|
+
- amr.faissal@gmail.com
|
92
|
+
executables: []
|
93
|
+
extensions: []
|
94
|
+
extra_rdoc_files: []
|
95
|
+
files:
|
96
|
+
- ".gitignore"
|
97
|
+
- ".travis.yml"
|
98
|
+
- CODE_OF_CONDUCT.md
|
99
|
+
- Gemfile
|
100
|
+
- Gemfile.lock
|
101
|
+
- LICENSE
|
102
|
+
- LICENSE.txt
|
103
|
+
- README.md
|
104
|
+
- Rakefile
|
105
|
+
- capistrano-rack.gemspec
|
106
|
+
- lib/capistrano/rack.rb
|
107
|
+
- lib/capistrano/rack/version.rb
|
108
|
+
- tasks/rspec.rake
|
109
|
+
homepage: https://amrfaissal.github.io/capistrano-rack/
|
110
|
+
licenses:
|
111
|
+
- MIT
|
112
|
+
metadata: {}
|
113
|
+
post_install_message:
|
114
|
+
rdoc_options: []
|
115
|
+
require_paths:
|
116
|
+
- lib
|
117
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
requirements: []
|
128
|
+
rubyforge_project:
|
129
|
+
rubygems_version: 2.4.5.1
|
130
|
+
signing_key:
|
131
|
+
specification_version: 4
|
132
|
+
summary: Capistrano with Rackspace
|
133
|
+
test_files: []
|
134
|
+
has_rdoc:
|