capistrano-rack 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjdlOGJhYTQyMDgyOTlkYzJjODg4NWIxNjUyZmQ0ZGQxMDQ2OTlhYQ==
4
+ Mjg3N2ExZDg5YTBlYzk4NDYyY2Y1ODUxMjg3NTEzMDdlMGRjYzMxZg==
5
5
  data.tar.gz: !binary |-
6
- ZGUyZGE4OWUyZWM5MDhjNzcwZmQ4MGViN2EzZmM2ZGQ2Nzc2YjQ1Nw==
6
+ M2MxNTRjZGI1MzY1MmE5MzUwZjc3NzQ3Y2NkZDU2OTBjNDJkNzM2Yw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmNmNjA0NGM4Y2I5MGU0ODhmNzU4ODU1ZGIwYzI3ZWE4ZGMwYTY4ZjU3ZTMy
10
- MWU1ZGNmYjgzYTk4ZWUzNWJkN2VkYTE0ZGUxNjQ3ODQ2ZDNkMDY2ZmRkMTYz
11
- MTNiNjIwZGE5ZmM0MWNkMTYxNzViZWJmN2YzMzdlNmRlYWVlMGE=
9
+ NDI1YzRiYzI4YTA3MWMwZjA2ZGI2NWVhYjliZDUxZTZmODA5MTE3ZDdjYTgw
10
+ ZDVkYjRiNTljMDE5N2I3NDQ3MWJhNjI5NzJmYmRhZTk3NmVlNWEwMzFkMzE0
11
+ MzNmZTkwMDY5YTEzNjAxZWM5ODIyNmFkMmM2MDZiMDdjYmM1Zjk=
12
12
  data.tar.gz: !binary |-
13
- MDc1ZGE5ZjY0NTkzODQ0NTM2OGMwZjBmNTFkMzdmZmI2YzA0OTE2MTJmZjNm
14
- NWZiOTkyODk5Yjk2YTZiZWNmMzVjMzI2MWVjMWJkNDAwMWMxMWExNTRjODc5
15
- MWRkZjUyNjc3YzIxYTQyODQwOTVkY2Q1MjNkN2VmMWY5ZTVmMGE=
13
+ NzBhNmI0NGExMjgwN2Q5MjZmMWViOGViZDFkN2RiYTA2MDJjODM5MDVmZGZj
14
+ NjEwN2ExM2M2MmUxZjMxYjRjMDEyMTg3MGJmZTI3ZjFkYzhkMDZhY2EyYjc0
15
+ OGUxOTE0OGFkZjJiMjY1MGVlNGRkMDZiYzcwM2ExMWM1NWRmYWQ=
@@ -1,71 +1,49 @@
1
1
  # coding: utf-8
2
2
  require 'fog'
3
3
  require 'capistrano'
4
+ require 'capistrano/rack/config'
4
5
  require 'capistrano/rack/version'
5
-
6
- class PropertiesReader
7
- def initialize(file)
8
- @file = file
9
- @properties = {}
10
- IO.foreach(file) do |line|
11
- @properties[$1.strip] = $2 if line =~ /([^=]*)=(.*)\/\/(.*)/ || line =~ /([^=]*)=(.*)/
12
- end
13
- end
14
-
15
- def to_s
16
- output = "File Name #{@file} \n"
17
- @properties.each {|key,value| output += "#{key}= #{value} \n"}
18
- output
19
- end
20
-
21
- def get(key)
22
- @properties[key].strip
23
- end
24
-
25
- end
26
-
27
- class RackspaceOptions
28
- def self.get(config_file=nil)
29
- props_reader = PropertiesReader.new(config_file || "#{ENV['HOME']}/.rack/config")
30
- return {
31
- :rackspace_api_key => props_reader.get("api-key"),
32
- :rackspace_username => props_reader.get("username"),
33
- :rackspace_region => props_reader.get("region")
34
- }
35
- end
36
- end
6
+ require 'capistrano/rack/deprecated'
37
7
 
38
8
  module Capistrano
39
9
  module Rack
40
- def rackspace_servers(roles=nil, regex_str='', addr_type=:private, config_file=nil, connection_options={})
41
- @compute_service = Fog::Compute.new(RackspaceOptions.get(config_file)
42
- .merge({
43
- :provider => 'Rackspace',
44
- :version => :v2,
45
- :connection_options => connection_options
46
- }))
10
+ extend Deprecated
11
+
12
+ def rack_servers(roles=nil, regex_str='')
13
+ @compute_service = Fog::Compute.new(RackspaceConfig.load()
14
+ .merge({
15
+ :provider => 'Rackspace',
16
+ :version => :v2,
17
+ :connection_options => fetch(:rack_connection_options) || {}
18
+ }))
19
+ addr_type = fetch(:rack_addr_type) || :private
47
20
  # List all servers and filter them based on the passed 'regex_str' parameter
48
21
  @compute_service.list_servers.body['servers']
49
22
  .select { |server| !server['name'].match(/#{regex_str}/).nil? }
50
23
  .flat_map { |s| s["addresses"][addr_type.to_s] }
51
24
  .select { |iface| iface['version'] == 4 }
52
25
  .map { |iface| iface['addr'] }
53
- .each { |server_addr| server server_addr,
54
- { :roles => (roles || %w{app}) } }
26
+ .each { |server_addr| server server_addr, { :roles => (roles || %w{app}) } }
55
27
  end
56
28
 
57
- def rackspace_autoscale(roles=nil, group_name='', addr_type=:private, config_file=nil, connection_options={})
58
- rackspace_options = RackspaceOptions.get(config_file)
59
-
29
+ def rackspace_servers(roles=nil, regex_str='', addr_type=:private, config_file=nil, connection_options={})
30
+ # DEPRECATED: Please use #rack_servers instead
31
+ end
32
+
33
+ def rack_autoscale(roles=nil, group_name='')
34
+ rackspace_config = RackspaceConfig.load()
35
+ connection_options = fetch(:rack_connection_options) || {}
36
+ addr_type = fetch(:rack_addr_type) || :private
37
+
60
38
  if !connection_options.empty? then
61
- rackspace_options.merge!({:connection_options => connection_options})
39
+ rackspace_config.merge!({:connection_options => connection_options})
62
40
  end
63
-
64
- @compute_service = Fog::Compute.new(rackspace_options.merge({
41
+
42
+ @compute_service = Fog::Compute.new(rackspace_config.merge({
65
43
  :provider => 'Rackspace',
66
- :version => :v2
44
+ :version => :v2,
67
45
  }))
68
- @autoscale_service = Fog::Rackspace::AutoScale.new(rackspace_options)
46
+ @autoscale_service = Fog::Rackspace::AutoScale.new(rackspace_config)
69
47
 
70
48
  # Get the servers Ids inside the specified group name
71
49
  @autoscale_service.groups.find { |g| g.group_config.name == group_name }.state['active']
@@ -74,10 +52,15 @@ module Capistrano
74
52
  .flat_map { |h| h.addresses[addr_type.to_s] }
75
53
  .select { |iface| iface['version'] == 4 }
76
54
  .map { |iface| iface['addr'] }
77
- .each { |server_addr| server server_addr,
78
- { :roles => (roles || %w{app}) } }
55
+ .each { |server_addr| server server_addr, { :roles => (roles || %w{app}) } }
79
56
  end
80
-
57
+
58
+ def rackspace_autoscale(roles=nil, group_name='', addr_type=:private, config_file=nil, connection_options={})
59
+ # DEPRECATED: Please use #rack_autoscale instead
60
+ end
61
+
62
+ deprecated_alias :rackspace_servers, :rack_servers
63
+ deprecated_alias :rackspace_autoscale, :rack_autoscale
81
64
  end
82
65
  end
83
66
 
@@ -0,0 +1,23 @@
1
+ class String
2
+ def black; "\e[30m#{self}\e[0m" end
3
+ def red; "\e[31m#{self}\e[0m" end
4
+ def green; "\e[32m#{self}\e[0m" end
5
+ def brown; "\e[33m#{self}\e[0m" end
6
+ def blue; "\e[34m#{self}\e[0m" end
7
+ def magenta; "\e[35m#{self}\e[0m" end
8
+ def cyan; "\e[36m#{self}\e[0m" end
9
+ def gray; "\e[37m#{self}\e[0m" end
10
+ def bg_black; "\e[40m#{self}\e[0m" end
11
+ def bg_red; "\e[41m#{self}\e[0m" end
12
+ def bg_green; "\e[42m#{self}\e[0m" end
13
+ def bg_brown; "\e[43m#{self}\e[0m" end
14
+ def bg_blue; "\e[44m#{self}\e[0m" end
15
+ def bg_magenta; "\e[45m#{self}\e[0m" end
16
+ def bg_cyan; "\e[46m#{self}\e[0m" end
17
+ def bg_gray; "\e[47m#{self}\e[0m" end
18
+ def bold; "\e[1m#{self}\e[22m" end
19
+ def italic; "\e[3m#{self}\e[23m" end
20
+ def underline; "\e[4m#{self}\e[24m" end
21
+ def blink; "\e[5m#{self}\e[25m" end
22
+ def reverse_color; "\e[7m#{self}\e[27m" end
23
+ end
@@ -0,0 +1,20 @@
1
+ require 'capistrano/rack/props_reader'
2
+ require 'capistrano/rack/errors'
3
+ require 'capistrano/rack/colorize'
4
+
5
+ class RackspaceConfig
6
+ def self.load()
7
+ config_path = fetch(:rack_config) || "#{ENV['HOME']}/.rack/config"
8
+
9
+ if !File.exist?(config_path)
10
+ raise FileNotFoundError, "Rackspace configuration file not found".bold.red
11
+ end
12
+
13
+ props_reader = PropertiesReader.new(config_path)
14
+ return {
15
+ :rackspace_api_key => props_reader.get("api-key"),
16
+ :rackspace_username => props_reader.get("username"),
17
+ :rackspace_region => props_reader.get("region")
18
+ }
19
+ end
20
+ end
@@ -0,0 +1,24 @@
1
+ require 'capistrano/rack/colorize'
2
+
3
+ module Deprecated
4
+ def deprecated_alias(name, replacement)
5
+ define_method(name) do |*args, &block|
6
+ warn "[DEPRECATION]".bold.red + " `#{name}` is deprecated. Please use `#{replacement}` instead.".bold.blue
7
+ send replacement, *args, &block
8
+ end
9
+ end
10
+
11
+ def deprecated(name, replacement=nil)
12
+ # Replace old method with a wrapped version
13
+ old_name = :"#{name}_without_deprecation"
14
+ alias_method old_name, name
15
+ define_method(name) do |*args, &block|
16
+ if replacement
17
+ warn "[DEPRECATION]".bold.red + " `#{name}` is deprecated. Please use `#{replacement}` instead.".bold.blue
18
+ else
19
+ warn "[DEPRECATION]".bold.red + " `#{name}` is deprecated.".bold.blue
20
+ end
21
+ send old_name, *args, &block
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,2 @@
1
+ class FileNotFoundError < StandardError
2
+ end
@@ -0,0 +1,19 @@
1
+ class PropertiesReader
2
+ def initialize(file)
3
+ @file = file
4
+ @properties = {}
5
+ IO.foreach(file) do |line|
6
+ @properties[$1.strip] = $2 if line =~ /([^=]*)=(.*)\/\/(.*)/ || line =~ /([^=]*)=(.*)/
7
+ end
8
+ end
9
+
10
+ def to_s
11
+ output = "File Name #{@file} \n"
12
+ @properties.each {|key,value| output += "#{key}= #{value} \n"}
13
+ output
14
+ end
15
+
16
+ def get(key)
17
+ @properties[key].strip
18
+ end
19
+ end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Rack
3
- VERSION = "0.2.1"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Faissal Elamraoui
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-02 00:00:00.000000000 Z
11
+ date: 2016-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -93,19 +93,13 @@ executables: []
93
93
  extensions: []
94
94
  extra_rdoc_files: []
95
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
96
  - lib/capistrano/rack.rb
97
+ - lib/capistrano/rack/colorize.rb
98
+ - lib/capistrano/rack/config.rb
99
+ - lib/capistrano/rack/deprecated.rb
100
+ - lib/capistrano/rack/errors.rb
101
+ - lib/capistrano/rack/props_reader.rb
107
102
  - lib/capistrano/rack/version.rb
108
- - tasks/rspec.rake
109
103
  homepage: https://amrfaissal.github.io/capistrano-rack/
110
104
  licenses:
111
105
  - MIT
data/.gitignore DELETED
@@ -1,35 +0,0 @@
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
@@ -1,11 +0,0 @@
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
@@ -1,13 +0,0 @@
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 DELETED
@@ -1,7 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in capistrano-rack.gemspec
4
- gemspec
5
-
6
- gem 'capistrano'
7
- gem 'fog'
@@ -1,175 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- capistrano-rack (0.2.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.1.0)
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 DELETED
@@ -1,22 +0,0 @@
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
-
@@ -1,21 +0,0 @@
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 DELETED
@@ -1,106 +0,0 @@
1
- # capistrano-rack [![Build Status](https://travis-ci.org/amrfaissal/capistrano-rack.svg?branch=master)](https://travis-ci.org/amrfaissal/capistrano-rack) [![Gem Version](https://badge.fury.io/rb/capistrano-rack.svg)](https://badge.fury.io/rb/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
- `capistrano-rack` recipe supports two Rackspace Cloud services:
36
-
37
- ### Next Generation Cloud Servers&trade;
38
-
39
- To deploy to your Next Gen Cloud servers:
40
-
41
- ```ruby
42
- rackspace_servers(roles=[], regex_str='^myservers-', addr_type=:private, config_file=nil, connection_options={})
43
- ```
44
-
45
- Where:
46
- * `roles`: your [Capistrano Roles](http://capistranorb.com/).
47
- * `regex_str`: a regular expression to filter throught your Next Gen Cloud servers.
48
- * `addr_type`: type of IP addresses (`:public` or `:private`).
49
- * `config_file`: Rackspace configuration file.
50
- * `connection_options`: Optional connection parameters.
51
-
52
- ### Auto Scale
53
-
54
- To deploy to your Scaling Group:
55
-
56
- ```ruby
57
- rackspace_autoscale(roles=[], group_name='', addr_type=:private, config_file=nil, connection_options={})
58
- ```
59
-
60
- Where:
61
- * `roles`: your [Capistrano Roles](http://capistranorb.com/).
62
- * `group_name`: Name of your Scaling Group.
63
- * `addr_type`: type of IP addresses (`:public` or `:private`).
64
- * `config_file`: Rackspace configuration file.
65
- * `connection_options`: Optional connection parameters.
66
-
67
- ### Optional Connection Parameters
68
-
69
- <table>
70
- <tr><th>Key</th><th>Description</th></tr>
71
- <tr>
72
- <td>:connect_timeout</td>
73
- <td>Connection timeout (default: 60 seconds)</td>
74
- </tr>
75
- <tr>
76
- <td>:read_timeout</td>
77
- <td>Read timeout for connection (default: 60 seconds)</td> </tr>
78
- <tr>
79
- <td>:write_timeout</td>
80
- <td>Write timeout for connection (default: 60 seconds)</td>
81
- </tr>
82
- <tr>
83
- <td>:proxy</td>
84
- <td>Proxy for HTTP and HTTPS connections</td>
85
- </tr>
86
- <tr>
87
- <td>:ssl_ca_path</td>
88
- <td>Path to SSL certificate authorities</td>
89
- </tr>
90
- <tr>
91
- <td>:ssl_ca_file</td>
92
- <td>SSL certificate authority file</td>
93
- </tr>
94
- <tr>
95
- <td>:ssl_verify_peer</td>
96
- <td>SSL verify peer (default: true)</td>
97
- </tr>
98
- </table>
99
-
100
- ## Contributing
101
-
102
- 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.
103
-
104
- ## License
105
-
106
- This gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile DELETED
@@ -1,5 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
3
- Dir.glob('tasks/**/*.rake').each(&method(:import))
4
-
5
- task :default => :spec
@@ -1,27 +0,0 @@
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.authors = ["Faissal Elamraoui"]
11
- spec.email = ["amr.faissal@gmail.com"]
12
-
13
- spec.summary = %q{Capistrano with Rackspace}
14
- spec.description = %q{Capistrano recipe to be served with Rackspace}
15
- spec.homepage = "https://amrfaissal.github.io/capistrano-rack/"
16
- spec.license = "MIT"
17
-
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- spec.executables = spec.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
20
- spec.require_paths = ["lib"]
21
-
22
- spec.add_runtime_dependency "capistrano", "~> 3.4", ">= 3.0.0"
23
- spec.add_runtime_dependency "fog", "~> 1.35"
24
- spec.add_development_dependency "bundler", "~> 1.10"
25
- spec.add_development_dependency "rake", "~> 10.0"
26
- spec.add_development_dependency "rspec", "~> 3.3"
27
- end
@@ -1,3 +0,0 @@
1
- require 'rspec/core/rake_task'
2
-
3
- RSpec::Core::RakeTask.new(:spec)