escualo 0.7.1 → 0.8.0

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: 5c8062beb1eb515d0f90c7b7ad838d4f2912a66a
4
- data.tar.gz: 2791e2a0121d9a524623724be5abf77d75afbfa2
3
+ metadata.gz: 2311d5bcbd817cbed4b83e76cbf0186a48d10854
4
+ data.tar.gz: 51835791f32711753d833276c54c11ebc1bf700c
5
5
  SHA512:
6
- metadata.gz: 892619da0ffbe9787a3a0f58ced1b8fcccd3684fda000b03afc14520ac3c46d5c2cd8d2f98044edb4e95d6ec05e02ef21169d0d689d8e386aee3c391e37751b4
7
- data.tar.gz: de2dcebeabf13f51501f730dd1177ec231b45973bdec3d431f8964b2f46d533a8ccac81d2e66e47821a5555e4a5d450dcf82029b01b6f3134a9090fb0cfc784c
6
+ metadata.gz: 13c4f2ee302e8f8f1c61ce235d5df7e9a2661e230f07c24f527452c9c7057cce2cd7071062057ca9e66100f3eb1a9be792c80c711836bf45c60ba4d11396911e
7
+ data.tar.gz: b6c2495418d878d3f722316acbe8710f92ea264eb44c497fd8ed84449c1366580ae4b79d64fc07000215ce286835744978f21f8dbd700a75e3d0534741fc02db
@@ -3,15 +3,18 @@ command 'plugin install' do |c|
3
3
  c.description = "Install plugin on host. Valid plugins are #{Escualo::Plugin::PLUGINS.join(', ')}"
4
4
  c.option '--nginx-conf FILENAME', String, 'ningix config file, only for nginx plugin'
5
5
  c.option '--rabbit-admin-password PASSWORD', String, 'rabbitmq admin password, only for rabbit plugin'
6
- c.option '-f', '--force', TrueClass, 'Force reinstalling even if already done'
6
+ c.option '--pg-version VERSION', String, 'PostgreSQL major and minor version. Default is 9.3, only for postgre plugin'
7
7
 
8
+ c.option '-f', '--force', TrueClass, 'Force reinstalling even if already done'
8
9
  c.ssh_action do |args, options, ssh|
10
+ options.default pg_version: '9.3'
11
+
9
12
  plugin = args.first
10
13
  say "Installing #{plugin}"
11
14
 
12
15
  installer = Escualo::Plugin.load plugin
13
16
 
14
- do_unless installer.check(ssh),
17
+ do_unless installer.check(ssh, options),
15
18
  "Plugin #{plugin} is already installed",
16
19
  options do
17
20
 
@@ -19,10 +22,10 @@ command 'plugin install' do |c|
19
22
  log = installer.run ssh, options
20
23
  end
21
24
 
22
- if installer.check ssh
25
+ if installer.check ssh, options
23
26
  say 'Installed successfully!'
24
27
  else
25
- say "Something went wrong. Last output was: \n#{log}"
28
+ say "Something went wrong"
26
29
  end
27
30
  end
28
31
  end
@@ -4,7 +4,7 @@ module Escualo::Plugin
4
4
  ssh.perform! 'apt-get install -y docker.io', options
5
5
  end
6
6
 
7
- def check(ssh)
7
+ def check(ssh, _options)
8
8
  ssh.exec!('docker -v').include? 'Docker version'
9
9
  end
10
10
  end
@@ -4,7 +4,7 @@ module Escualo::Plugin
4
4
  ssh.perform! 'apt-get install -y haskell-platform', options
5
5
  end
6
6
 
7
- def check(ssh)
7
+ def check(ssh, _options)
8
8
  ssh.exec!('ghc --version').include? 'The Glorious Glasgow Haskell Compilation System'
9
9
  end
10
10
  end
@@ -10,7 +10,7 @@ module Escualo::Plugin
10
10
  }, options
11
11
  end
12
12
 
13
- def check(ssh)
13
+ def check(ssh, _options)
14
14
  ssh.shell.exec!('mongod --version').include? 'db version v3.2'
15
15
  end
16
16
  end
@@ -12,7 +12,7 @@ module Escualo::Plugin
12
12
  }, options
13
13
  end
14
14
 
15
- def check(ssh)
15
+ def check(ssh, _options)
16
16
  ssh.exec!('nginx -v').include? 'nginx version: nginx/1'
17
17
  end
18
18
  end
@@ -8,7 +8,7 @@ module Escualo::Plugin
8
8
  }, options
9
9
  end
10
10
 
11
- def check(ssh)
11
+ def check(ssh, _options)
12
12
  ssh.shell.exec!('nvm use node').include? 'Now using node v4.2.4'
13
13
  end
14
14
  end
@@ -1,7 +1,7 @@
1
1
  module Escualo::Plugin
2
2
  class Postgre
3
3
  def run(ssh, options)
4
- pg_hba_conf = '/etc/postgresql/9.3/main/pg_hba.conf'
4
+ pg_hba_conf = "/etc/postgresql/#{options.pg_version}/main/pg_hba.conf"
5
5
 
6
6
  ssh.shell.perform! %Q{
7
7
  apt-get install postgresql libpq-dev -y &&
@@ -16,8 +16,8 @@ EOF
16
16
  }, options
17
17
  end
18
18
 
19
- def check(ssh)
20
- ssh.shell.exec!('psql --version').include? 'psql (PostgreSQL) 9.3'
19
+ def check(ssh, options)
20
+ ssh.shell.exec!('psql --version').include? "psql (PostgreSQL) #{options.pg_version}"
21
21
  end
22
22
  end
23
23
  end
@@ -15,7 +15,7 @@ module Escualo::Plugin
15
15
  }, options
16
16
  end
17
17
 
18
- def check(ssh)
18
+ def check(ssh, _options)
19
19
  ssh.exec!('rabbitmq-server').include? 'node with name "rabbit" already running'
20
20
  end
21
21
  end
@@ -1,4 +1,4 @@
1
1
  module Escualo
2
- VERSION = '0.7.1'
2
+ VERSION = '0.8.0'
3
3
  BASE_VERSION = '3.2'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: escualo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli