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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e36cff2bf9d0a4fbcc5ae27ce38f79f413395d8
4
- data.tar.gz: 980b29364e92c415bcb090dbb1431269aea5fce4
3
+ metadata.gz: 2440631a5857579e9aab9f07dd5b8ce0027a579c
4
+ data.tar.gz: 882d127197e2813e40602129b072af237b5e2402
5
5
  SHA512:
6
- metadata.gz: bd58fa3cfda8462e1bccd4fe6f5795c86662963299cf12c75775b466ce12d965774d41093fc4bf07e5719e283467025d3f3434737b3ad268c7f6912fe31a8c85
7
- data.tar.gz: b8fd0f5a3b24ad4db83377c554482ac0e36fb577b9415a9e121de981c12fe67e7075a2651678e68654689bb242bc21b9f03bf52f121d0fdbfe43f9571e231ffd
6
+ metadata.gz: 53d5407cce4b17e80f536aed61c300ee6e93a43eee859cc30d27d9140cd455439e0138bd6a40cc3c440e99df6db198b2b334c120d0ae6258706a79ab65622c12
7
+ data.tar.gz: b53f5fc9ba0196c9c315e40d1d089200408cdd1724e81ac92be40b60a573e2647ecbfe2bc2739a5a60dfba51b77bd1164b1ef4111e06ecd889a34219aa7cb341
data/.gitignore CHANGED
@@ -18,3 +18,4 @@ spec
18
18
  *.bak
19
19
  .box
20
20
  .box/**/*
21
+ *.gem
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
- #/ --install Install all compoments of a system
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
- if File.exists?(File.join(File.expand_path('../..', __FILE__), '.git'))
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
- begin
16
- require 'rmails/installer'
17
- rescue
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
@@ -1,8 +1,9 @@
1
- require "automateit"
2
- require "rails"
3
- require "rake"
4
- require "bundler"
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
- #Bundler.with_clean_env do
21
- # @interpreter.shell_manager.sh("bundle install --without development assets")
22
- #end
23
- #@interpreter.invoke '02_setup_database'
24
- #@interpreter.invoke '03_setup_postfix'
25
- #@interpreter.invoke '04_setup_dovecot'
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "rmails"
5
- s.version = '0.1.1' #Rmails::VERSION
5
+ s.version = '0.1.2' #Rmails::VERSION
6
6
  s.default_executable = "rmails"
7
7
  s.license = 'MIT'
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Novotny