gat 0.2.13 → 0.2.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ == 0.2.14 2010-04-23
2
+ * Improved sending of mails from synchronization gatget
3
+
1
4
  == 0.2.13 2010-04-23
2
5
  * Improved sending of mails from synchronization gatget
3
6
 
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Gat
19
19
 
20
- VERSION = '0.2.13'
20
+ VERSION = '0.2.14'
21
21
 
22
22
  end
@@ -39,7 +39,7 @@ class GatgetSynchronization < Gat::Base
39
39
 
40
40
  def notify_start
41
41
  st_notify_email_started = get_dependence_value("static", "notify_email_started")
42
- if st_notify_email_started && st_notify_email_started["sent_to"]
42
+ if st_notify_email_started && st_notify_email_started["send_to"]
43
43
  to = st_notify_email_started
44
44
  end
45
45
  subject = st_notify_email_started["subject"]
@@ -48,7 +48,7 @@ class GatgetSynchronization < Gat::Base
48
48
  if self.config["email_config"]
49
49
  to = self.config["email_config"]["send_to"]
50
50
  else
51
- raise Gat::GatgetConfigException.new("Default email config[to] is empty at gatget.config['email_config']", "run_output_email")
51
+ raise Gat::GatgetConfigException.new("Default email config[send_to] is empty at gatget.config['email_config']", "run_output_email")
52
52
  end
53
53
  end
54
54
  subject = "Rsync started" if subject.nil?
@@ -65,7 +65,7 @@ class GatgetSynchronization < Gat::Base
65
65
 
66
66
  def notify_end
67
67
  st_notify_email_ended = get_dependence_value("static", "notify_email_ended")
68
- if st_notify_email_ended && st_notify_email_ended["sent_to"]
68
+ if st_notify_email_ended && st_notify_email_ended["send_to"]
69
69
  to = st_notify_email_ended
70
70
  end
71
71
  subject = st_notify_email_ended["subject"]
@@ -74,7 +74,7 @@ class GatgetSynchronization < Gat::Base
74
74
  if self.config["email_config"]
75
75
  to = self.config["email_config"]["send_to"]
76
76
  else
77
- raise Gat::GatgetConfigException.new("Default email config[to] is empty at gatget.config['email_config']", "run_output_email")
77
+ raise Gat::GatgetConfigException.new("Default email config[send_to] is empty at gatget.config['email_config']", "run_output_email")
78
78
  end
79
79
  end
80
80
  subject = "Rsync ended" if subject.nil?
@@ -114,7 +114,7 @@ class GatgetSynchronization < Gat::Base
114
114
 
115
115
  end
116
116
 
117
- def exec_sync_oyw
117
+ def exec_sync_mutiple_hosts
118
118
  hosts = get_dependence_value("static", "all_hosts")
119
119
  while hosts.any?
120
120
  hosts.each do |host|
@@ -122,7 +122,7 @@ class GatgetSynchronization < Gat::Base
122
122
  begin
123
123
  a = Gat::Operation.new(opname, self.config['operations'][opname], self)
124
124
  rescue
125
- raise Gat::GatgetConfigException.new("Operation '#{opname}' not defined in yml", "exec_sync_oyw")
125
+ raise Gat::GatgetConfigException.new("Operation '#{opname}' not defined in yml", "exec_sync_mutiple_hosts")
126
126
  end
127
127
  a.execute
128
128
  backup_was_running = self.get_flag("flag_remote_backup_running")
@@ -11,11 +11,9 @@ static:
11
11
  notify_email_started:
12
12
  subject: Rsync started
13
13
  body: You will receive an email when the rsync is ended
14
- to: sandraantolin@lopez-brea.com
15
14
  notify_email_ended:
16
15
  subject: Rsync finished
17
16
  body: Rsync finished OK
18
- to: sandraantolin@lopez-brea.com
19
17
  my_host_remote_folder: /home/backup/
20
18
  my_host_remote_host: my_host
21
19
  my_host_remote_user: backup
@@ -96,19 +94,6 @@ operations:
96
94
  verbose: 1
97
95
  debug: true
98
96
 
99
- sync_oyw:
100
- description: 'Sincronización de datos de openyourweb'
101
- users: [ root ]
102
- programs: [ rsync, ssh ]
103
- arguments: [ ]
104
- helpers: [ exit_if_i_am_running ]
105
- actions: [ exec_sync_oyw ]
106
- outputs: [ email ]
107
- onfail: [ ]
108
- options:
109
- verbose: 1
110
- debug: true
111
-
112
97
  sync_my_host:
113
98
  description: 'Synchronize my_host'
114
99
  users: [ root ]
@@ -146,6 +131,4 @@ actions:
146
131
  type: shell_command
147
132
  syntax: "rsync -az --delete {{remote_user}}@{{remote_host}}:{{remote_folder}} {{local_folder}}"
148
133
  flags: [ "!flag_remote_backup_running" ]
149
- exec_sync_oyw:
150
- type: ruby_method
151
134
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.13
4
+ version: 0.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - gnoxys
@@ -40,17 +40,7 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: 2.0.3
44
- version:
45
- - !ruby/object:Gem::Dependency
46
- name: gemcutter
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: 0.3.0
43
+ version: 2.0.4
54
44
  version:
55
45
  - !ruby/object:Gem::Dependency
56
46
  name: hoe
@@ -60,7 +50,7 @@ dependencies:
60
50
  requirements:
61
51
  - - ">="
62
52
  - !ruby/object:Gem::Version
63
- version: 2.5.0
53
+ version: 2.6.0
64
54
  version:
65
55
  description: |-
66
56
  GAT is a Ruby gem that tries to provide a script fast development framework.