deploy_mate 0.13 → 0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecff54aca5c2d8f35ce98fbfd84d318298d67e4b
4
- data.tar.gz: 1ab1844832d1b169399e08391d1359689e76ce55
3
+ metadata.gz: 15a9544626e2d3662f301c7739e88022fde3d2cd
4
+ data.tar.gz: cc4b0b975dd655a93e2e29374808e314ee4d5b88
5
5
  SHA512:
6
- metadata.gz: a671312408425d9c58d9493d2b875065dc8ea2b9193e663b6a36750dbc3b6edd682580568e856da694e91f93e7afe822e1f10dbd96a79b1b721a5e493762cf0e
7
- data.tar.gz: 739d9c612e3b5285dda0a4b52131efd85d5d559fe1df63dae8ebfd7015b0c36ab47c40306a6dc0c75bda08aee3619e8aa9f6efc063e15b88dbabe109a8008c41
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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "deploy_mate"
3
- s.version = "0.13"
3
+ s.version = "0.14"
4
4
 
5
5
  s.authors = ["Tim Adler"]
6
6
  s.date = %q{2015-06-23}
@@ -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")
@@ -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
- @stage_name = ask("Give the first stage a name", "prestage")
16
- @ssh_name = ask("SSH-Hostname for the server", "#{@app_name}-#{@stage_name}")
17
- @branch_name = ask("Branch to deploy '#{@stage_name}' from", "dev")
18
- @host_name = ask("Web-URL for '#{@stage_name}'", "#{@stage_name}.#{@app_name}")
19
- @environment = ask("#{@stage_name}'s environment (RACK_ENV/RAILS_ENV)", "#{@stage_name}")
20
- @db_engine = ask_until("What db are you using?", %w( postgresql mysql ), "mysql")
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
@@ -10,3 +10,5 @@ set :stages, %w(<%= @stage_name %>)
10
10
  set :default_stage, '<%= @stage_name %>'
11
11
  set :repo_url, '<%= @repo_url %>'
12
12
  set :db_engine, '<%= @db_engine %>'
13
+
14
+ set :imagemagick, '<%= @needs_imagemagick %>'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_mate
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.13'
4
+ version: '0.14'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Adler