deploy_mate 0.13 → 0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/deploy-mate.gemspec +1 -1
- data/lib/capistrano/tasks/machine.rake +7 -0
- data/lib/deploy_mate/tasks.rake +16 -11
- data/lib/deploy_mate/templates/deploy.rb.erb +2 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15a9544626e2d3662f301c7739e88022fde3d2cd
|
4
|
+
data.tar.gz: cc4b0b975dd655a93e2e29374808e314ee4d5b88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 383702d8e2a8ca71022b6342d8667a603aea52387cea5054582b06a7e1d9efb59c70b353799c798caeb9cb0d4c4dc66a68ca5bc67873d78f2b42ae038a7e978e
|
7
|
+
data.tar.gz: 1a0b558d4bd030b35f4343ddc61bab97e00eb03eb63d4f1012066fe46566a9265127aaf5a77ea80e2b86091dacb753bf61206fd7294b16faae2351588256b257
|
data/README.md
CHANGED
@@ -15,11 +15,14 @@ Other stuff taken care of:
|
|
15
15
|
- Automatic updates
|
16
16
|
- NTP
|
17
17
|
|
18
|
-
You can choose Database:
|
18
|
+
You can choose a Database-Engine:
|
19
19
|
- MySQL
|
20
20
|
- Postgres
|
21
21
|
|
22
|
+
**If you are not using Amazon AWS as a host:** The GEM needs a working Amazon AWS-style `ubuntu`-user on the system in order to work properly. It will create one, if needed.
|
23
|
+
|
22
24
|
## Changelog
|
25
|
+
* **2015-06-23**: Support for optional `imagemagick`
|
23
26
|
* **2015-06-23**: Support creation of working `ubuntu` user. Error out if another user than `ubuntu` is used.
|
24
27
|
* **2015-06-22**: Support for choosing your Ruby-version when creating the `Capfile`. Suggestions come from `.ruby-version` and `Gemfile`.
|
25
28
|
* **2015-04-29**: Load custom rake tasks from lib/capistrano/tasks directory.
|
data/deploy-mate.gemspec
CHANGED
@@ -19,6 +19,7 @@ namespace :machine do
|
|
19
19
|
invoke "machine:install:bluepill"
|
20
20
|
invoke "machine:install:bundler"
|
21
21
|
invoke "machine:install:nodejs"
|
22
|
+
invoke "machine:install:imagemagick" if fetch(:imagemagick)
|
22
23
|
invoke "machine:install:mysql_dev" if fetch(:db_engine) == "mysql"
|
23
24
|
invoke "machine:install:postgres_dev" if fetch(:db_engine) == "postgresql"
|
24
25
|
end
|
@@ -98,6 +99,12 @@ namespace :machine do
|
|
98
99
|
end
|
99
100
|
end
|
100
101
|
|
102
|
+
task :imagemagick do
|
103
|
+
on roles(:app) do
|
104
|
+
apt_get_install("imagemagick") unless is_package_installed?("imagemagick")
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
101
108
|
task :mysql_dev do
|
102
109
|
on roles(:app) do
|
103
110
|
apt_get_install("libmysqlclient-dev") unless is_package_installed?("libmysqlclient-dev")
|
data/lib/deploy_mate/tasks.rake
CHANGED
@@ -7,17 +7,18 @@ namespace :deploy_mate do
|
|
7
7
|
puts "I'm your DEPLOY_MATE."
|
8
8
|
puts "We will setting up your deployment now."
|
9
9
|
|
10
|
-
@ruby_version = ask("Ruby-Version (the RVM-way, e.g. ruby-2.2.0)", guess_ruby_version)
|
11
|
-
@app_name = ask("App-Name (for nginx, servers, etc.)", guess_app_name)
|
12
|
-
@repo_url = ask("Url-Location of git-repo", "git@github.com:hanseventures/#{@app_name}.git")
|
13
|
-
@is_rails = yes_or_no?("Is this a RAILS project ?", (rails_present? ? "yes" : "no"))
|
14
|
-
|
15
|
-
|
16
|
-
@
|
17
|
-
@
|
18
|
-
@
|
19
|
-
@
|
20
|
-
@
|
10
|
+
@ruby_version = ask("[01/11] Ruby-Version (the RVM-way, e.g. ruby-2.2.0)", guess_ruby_version)
|
11
|
+
@app_name = ask("[02/11] App-Name (for nginx, servers, etc.)", guess_app_name)
|
12
|
+
@repo_url = ask("[03/11] Url-Location of git-repo", "git@github.com:hanseventures/#{@app_name}.git")
|
13
|
+
@is_rails = yes_or_no?("[04/11] Is this a RAILS project ?", (rails_present? ? "yes" : "no"))
|
14
|
+
@needs_imagemagick = yes_or_no?("[05/11] Does this project need ImageMagick ?", (needs_imagemagick? ? "yes" : "no"))
|
15
|
+
|
16
|
+
@stage_name = ask("[06/11] Give the first stage a name", "prestage")
|
17
|
+
@ssh_name = ask("[07/11] SSH-Hostname for the server", "#{@app_name}-#{@stage_name}")
|
18
|
+
@branch_name = ask("[08/11] Branch to deploy '#{@stage_name}' from", "dev")
|
19
|
+
@host_name = ask("[09/11] Web-URL for '#{@stage_name}'", "#{@stage_name}.#{@app_name}")
|
20
|
+
@environment = ask("[10/11] #{@stage_name}'s environment (RACK_ENV/RAILS_ENV)", "#{@stage_name}")
|
21
|
+
@db_engine = ask_until("[11/11] What db are you using?", %w( postgresql mysql ), "mysql")
|
21
22
|
|
22
23
|
puts "Aye!"
|
23
24
|
puts "Worrrrking..."
|
@@ -42,6 +43,10 @@ def config_template(from, to)
|
|
42
43
|
puts "'#{to}'"
|
43
44
|
end
|
44
45
|
|
46
|
+
def needs_imagemagick?
|
47
|
+
defined? RMagick || defined? MiniMagick
|
48
|
+
end
|
49
|
+
|
45
50
|
def rails_present?
|
46
51
|
defined? Rails
|
47
52
|
end
|