rmails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Rakefile +0 -15
- data/bin/rmails +8 -22
- data/lib/rmails/installer.rb +12 -14
- data/rmails.gemspec +1 -1
- 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: 2440631a5857579e9aab9f07dd5b8ce0027a579c
|
4
|
+
data.tar.gz: 882d127197e2813e40602129b072af237b5e2402
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53d5407cce4b17e80f536aed61c300ee6e93a43eee859cc30d27d9140cd455439e0138bd6a40cc3c440e99df6db198b2b334c120d0ae6258706a79ab65622c12
|
7
|
+
data.tar.gz: b53f5fc9ba0196c9c315e40d1d089200408cdd1724e81ac92be40b60a573e2647ecbfe2bc2739a5a60dfba51b77bd1164b1ef4111e06ecd889a34219aa7cb341
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
@@ -5,27 +5,12 @@ require 'rake/dsl_definition'
|
|
5
5
|
require File.expand_path('../config/application', __FILE__)
|
6
6
|
Rmails::Application.load_tasks
|
7
7
|
|
8
|
-
|
9
8
|
require "rmails/installer"
|
10
9
|
|
11
|
-
|
12
|
-
=begin
|
13
|
-
desc "Interactive AutomateIt shell"
|
14
|
-
task :automateit do
|
15
|
-
@interpreter = AutomateIt.new(:project => "system")
|
16
|
-
@interpreter.include_in(self)
|
17
|
-
AutomateIt::CLI.run
|
18
|
-
=end
|
19
|
-
|
20
10
|
namespace :system do
|
21
11
|
desc "Prepare server by installing required software"
|
22
12
|
task :install do
|
23
13
|
setup = Rmails::Installer.new
|
24
14
|
setup.run
|
25
|
-
#@interpreter = AutomateIt.new(:project => "system")
|
26
|
-
#@interpreter.include_in(self)
|
27
|
-
#@interpreter.set :rake_task, Rake::Task
|
28
|
-
#@interpreter.set :rails_root, Rails.root
|
29
|
-
#invoke '01_prepare_server'
|
30
15
|
end
|
31
16
|
end
|
data/bin/rmails
CHANGED
@@ -1,23 +1,14 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#/ Usage: rmails --install
|
3
|
-
#/
|
3
|
+
#/ Install all compoments of the system.
|
4
|
+
#/ You must be root to run this.
|
4
5
|
# ** Tip: use #/ lines to define the --help usage message.
|
5
|
-
$stderr.sync = true
|
6
|
-
require 'optparse'
|
7
6
|
|
8
|
-
|
9
|
-
rmails_path = File.expand_path('../../lib', __FILE__)
|
10
|
-
$:.unshift(rmails_path)
|
11
|
-
end
|
12
|
-
puts rmails_path
|
13
|
-
puts $:
|
7
|
+
$stderr.sync = true
|
14
8
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
require 'rubygems'
|
19
|
-
require 'rmails/installer'
|
20
|
-
end
|
9
|
+
require 'optparse'
|
10
|
+
require File.expand_path('../../config/application', __FILE__)
|
11
|
+
require 'rmails/installer'
|
21
12
|
|
22
13
|
# default options
|
23
14
|
install = false
|
@@ -30,14 +21,9 @@ ARGV.options do |opts|
|
|
30
21
|
opts.parse!
|
31
22
|
end
|
32
23
|
|
33
|
-
# do your thing
|
34
|
-
warn "action: #{install.inspect}"
|
35
|
-
|
36
24
|
if install
|
37
|
-
# 1. 00_prepare_server
|
38
|
-
# 2. bundle install
|
39
|
-
# 3. 01_ ...
|
40
25
|
setup = Rmails::Installer.new
|
41
26
|
setup.run
|
42
|
-
|
27
|
+
else
|
28
|
+
exec "grep ^#/<'#{file}'|cut -c4-"
|
43
29
|
end
|
data/lib/rmails/installer.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
|
2
|
-
require "
|
3
|
-
require "
|
4
|
-
require "
|
5
|
-
|
1
|
+
unless defined?(Bundler)
|
2
|
+
require "automateit"
|
3
|
+
require "rails"
|
4
|
+
require "rake"
|
5
|
+
require "bundler"
|
6
|
+
end
|
6
7
|
|
7
8
|
module Rmails
|
8
9
|
class Installer
|
@@ -17,12 +18,12 @@ module Rmails
|
|
17
18
|
|
18
19
|
def run
|
19
20
|
@interpreter.invoke '01_prepare_server'
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
21
|
+
Bundler.with_clean_env do
|
22
|
+
@interpreter.shell_manager.sh("bundle install --without development assets")
|
23
|
+
end
|
24
|
+
@interpreter.invoke '02_setup_database'
|
25
|
+
@interpreter.invoke '03_setup_postfix'
|
26
|
+
@interpreter.invoke '04_setup_dovecot'
|
26
27
|
@interpreter.invoke '05_setup_nginx'
|
27
28
|
@interpreter.invoke '06_setup_dspam'
|
28
29
|
@interpreter.invoke '07_setup_amavis'
|
@@ -30,8 +31,5 @@ module Rmails
|
|
30
31
|
@interpreter.invoke '09_setup_awstats'
|
31
32
|
@interpreter.invoke 'XX_start_services'
|
32
33
|
end
|
33
|
-
|
34
|
-
|
35
|
-
|
36
34
|
end
|
37
35
|
end
|
data/rmails.gemspec
CHANGED