irgat 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,22 +26,14 @@ module Irgat
26
26
  @config = irgat_process.config
27
27
  # load options for module
28
28
  @config_module = self.load_config
29
- # include modules?
30
- #case @config_module[:load_modules]
31
- # when 'all'
32
- # log("text", "Loading all activated modules")
33
- # # get modules
34
- # # @config
35
- # # TODO
36
- # when
37
- @log_to_stdout = true
29
+
38
30
  end
39
31
 
40
32
  def default(args = {})
41
33
  require 'irb'
42
34
  puts "\nLaunching irgat command line"
43
35
  puts "---------------------------"
44
- exec("irb -r #{IRGAT_ROOT}/lib/boot.rb -r #{IRGAT_ROOT}/lib/irgat.rb -r #{IRGAT_ROOT}/lib/irgat/console.rb -r irb/completion")
36
+ exec("irb -r #{IRGAT_ROOT}/lib/irgat.rb -r #{IRGAT_ROOT}/lib/irgat/console.rb -r irb/completion")
45
37
  end
46
38
 
47
39
  end
@@ -44,9 +44,9 @@ module Irgat
44
44
  need_programs = ["dcop", "gpg"]
45
45
 
46
46
  # get kwallet code at start
47
- @code ||= get_kwallet_int_code.strip
48
- # define module to log in console
49
- @log_to_stdout = true
47
+ @code ||= get_kwallet_int_code[:output].strip
48
+ @log_to_output = true # FIXME
49
+
50
50
  end
51
51
 
52
52
  def default(args)
@@ -56,7 +56,7 @@ module Irgat
56
56
  def do_petition(args)
57
57
  petition = args.shift
58
58
  if !petition or petition == ""
59
- log("text","No petition registered. Options are: ", 1)
59
+ log("text","No petition registered. Options are: list, show", 1)
60
60
  else
61
61
  if !args.empty?
62
62
  self.send(petition, (args))
@@ -83,7 +83,7 @@ module Irgat
83
83
  def list( args = [])
84
84
  option = args.first
85
85
  if !option
86
- return " List stored objects. Specify a folder from list: #{ show_folders.gsub(/\n/,' ') }"
86
+ return " List stored objects. Specify a folder from list: #{ show_folders[:output].gsub(/\n/,' ') }"
87
87
  else
88
88
  if option == "all"
89
89
  else
@@ -112,7 +112,7 @@ module Irgat
112
112
 
113
113
  def show_passwd_list(folder)
114
114
  petition = execute_command("dcop kded kwalletd entryList #{ @code } '#{ folder }'", "Get Password of #{ folder }")
115
- return "Avaible Entries in #{ folder }: #{ petition.gsub(/\n/,' ') } . Type $ @kwallet.show #{ folder } <entry> to see the key value"
115
+ return "Avaible Entries in #{ folder }: #{ petition[:output].gsub(/\n/,' ') } . Type $ @kwallet.show #{ folder } <entry> to see the key value"
116
116
  end
117
117
 
118
118
  def show_folders
@@ -127,7 +127,5 @@ module Irgat
127
127
  def update_kwallet_file
128
128
  execute_command("scp -P #{@config_module[:remote_path]["port"]} #{@config_module[:remote_path]["user"]}@#{@config_module[:remote_path]["server"]}:/#{@config_module[:remote_path]["folder"]}/#{@config_module[:kwallet_name]}.kwl #{@config_module[:local_path]}","Updating local kwallet file from server",1)
129
129
  end
130
-
131
130
  end
132
-
133
131
  end
@@ -19,7 +19,9 @@ number_backup_stored: 2
19
19
 
20
20
  # exclude folders from backup, absolute path without first slash
21
21
  # for example var/tmp
22
- exclude_folders: [ boot, etc, dev, home, initrd, lib, media, mnt, opt, proc, root, sbin, srv, sys, tmp, usr, var]
22
+ # IMPORTANT: data and restore irgat::backup folder if by definition excluded.
23
+ # You don't need to write it here.
24
+ exclude_folders: [ boot, cdrom, etc, dev, home, initrd, lib, lost+found, media, mnt, opt, proc, root, sbin, srv, sys, tmp, usr, var ]
23
25
 
24
26
  # extensions ommited inside backup files
25
27
  exclude_files: [ .dar ]
@@ -45,7 +47,7 @@ mysql_pass: ''
45
47
  distribute_backups: false
46
48
  # just in case needed
47
49
  # distribution_servers:
48
- # balrog:
50
+ # foo_server:
49
51
  # host: example.com
50
52
  # port: 22
51
53
  # user: foo
@@ -56,7 +58,7 @@ distribute_backups: false
56
58
  distribute_method: scp
57
59
  # Options for the scp distributed method
58
60
  scp_distribute_method:
59
- local_user: nogates # local user to perform the copy and querys
61
+ local_user: user # local user to perform the copy and querys
60
62
  with_keys: true # if its true, the scp and ssh commans are maked without pass
61
63
  needed_programs: [ scp, ssh ] # programs needed by scp distributed method
62
64
  # Options for ftp distributed method
@@ -76,8 +78,8 @@ subsystem_name: backups
76
78
  subsystem_description: 'Irgat backup module'
77
79
  run_as_user: root
78
80
  # output notification
79
- output_log: true # log will be stored in <irgat_log_path>/backup/
80
- output_email: true # log will be sended to email
81
+ log_file_actions: [ launch ] # Write irgat log to a log file
82
+ log_mail_actions: [ launch ] # Email the irgat log to the irgat admin
81
83
 
82
84
 
83
85
  # Folders Tree (change if you known what are you doing!!!)
@@ -90,6 +92,7 @@ folders_tree:
90
92
  - catalog
91
93
  - extras
92
94
  - extras/mysql
95
+ - restore
93
96
 
94
97
 
95
98
  # Dar variables
@@ -3,17 +3,17 @@
3
3
 
4
4
  # Server Variables
5
5
  # server_name: my server
6
- server_name: llopart
7
- server_domain: litura.gnoxys.net
6
+ server_name: my_server
7
+ server_domain: foo.example.net
8
8
 
9
9
  # Email notifications
10
- mail_to: maquinas@gnoxys.net
11
-
10
+ mail_to: foo@example.net
12
11
 
13
12
  # Enable subsystem
14
13
  enable_subsystem:
15
14
  console : true
16
15
  backup: true
16
+ kwallet: true
17
17
 
18
18
  # Languaje
19
19
  # avaible en
@@ -31,7 +31,7 @@ debug_level: 1
31
31
  smtp_mode: sendmail
32
32
  # if smtp
33
33
  smtp_values:
34
- server: smtp.gnoxys.net
34
+ server: foo.example.net
35
35
  port: 25
36
- user: foo
37
- password: bar
36
+ user: sender@example
37
+ password: password
@@ -2,7 +2,7 @@
2
2
  # Look <your irgat path>/README for more information
3
3
 
4
4
  # Name of your Def Kwallet
5
- kwallet_name: my_wallet
5
+ kwallet_name: gnoxys
6
6
 
7
7
  # path to the files
8
8
  local_path: /home/user/.kde/share/apps/kwallet/
@@ -14,5 +14,16 @@ remote_path:
14
14
  user: nogates
15
15
  folder: /home/nogates/
16
16
 
17
+ #----------------------------
18
+ # Non common change variables
19
+ #----------------------------
20
+ # Subsystem variable
21
+ subsystem_name: kwallet
22
+ subsystem_description: 'Irgat kwallet module'
23
+
24
+ # output notification
25
+ log_file_actions: [ ] # Write irgat log to a log file
26
+ log_mail_actions: [ ] # Email the irgat log to the irgat admin
27
+
17
28
 
18
29
 
@@ -51,9 +51,12 @@
51
51
  <p><span class="caps">OOOORRRR</span></p>
52
52
  <p>You can fetch the source from either:</p>
53
53
  <ul>
54
- <li>rubyforge: <a href="http://rubyforge.org/scm/?group_id=7188">http://rubyforge.org/scm/?group_id=7188</a></li>
54
+ <li>rubyforge: <span class="caps">MISSING</span> IN <span class="caps">ACTION</span></li>
55
55
  </ul>
56
- <pre>git clone git://rubyforge.org/irgat.git</pre>
56
+ <p><span class="caps">TODO</span> &#8211; You can not created a RubyForge project, OR have not run <code>rubyforge config</code><br />
57
+ yet to refresh your local rubyforge data with this projects&#8217; id information.</p>
58
+ <p>When you do this, this message will magically disappear!</p>
59
+ <p>Or you can hack website/index.txt and make it all go away!!</p>
57
60
  <ul>
58
61
  <li>github: <a href="http://github.com/GITHUB_USERNAME/irgat/tree/master">http://github.com/GITHUB_USERNAME/irgat/tree/master</a></li>
59
62
  </ul>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irgat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gnoxys
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-27 00:00:00 +01:00
12
+ date: 2008-11-04 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -22,16 +22,6 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: 2.0.4
24
24
  version:
25
- - !ruby/object:Gem::Dependency
26
- name: rdoc
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 2.2.1
34
- version:
35
25
  - !ruby/object:Gem::Dependency
36
26
  name: termios
37
27
  type: :runtime
@@ -60,7 +50,7 @@ dependencies:
60
50
  requirements:
61
51
  - - ">="
62
52
  - !ruby/object:Gem::Version
63
- version: 1.8.1
53
+ version: 1.8.2
64
54
  version:
65
55
  description: Intuitive Ruby for Gnoxys Administration Tools
66
56
  email:
@@ -68,6 +58,7 @@ email:
68
58
  executables:
69
59
  - irgat
70
60
  - irgat_setup
61
+ - irgat_updater
71
62
  extensions: []
72
63
 
73
64
  extra_rdoc_files:
@@ -84,6 +75,7 @@ files:
84
75
  - TODO
85
76
  - bin/irgat
86
77
  - bin/irgat_setup
78
+ - bin/irgat_updater
87
79
  - config/hoe.rb
88
80
  - config/requirements.rb
89
81
  - lib/irgat.rb
@@ -104,11 +96,8 @@ files:
104
96
  - setup.rb
105
97
  - setup/etc/backup.yml.example
106
98
  - setup/etc/chroot.yml.example
107
- - setup/etc/console.yml.default
108
99
  - setup/etc/cron.yml.example
109
- - setup/etc/dar.yml.example
110
100
  - setup/etc/irgat.yml.example
111
- - setup/etc/kwallet.yml.default
112
101
  - setup/etc/kwallet.yml.example
113
102
  - setup/etc/ssh.yml.example
114
103
  - tasks/deployment.rake
@@ -123,11 +112,21 @@ files:
123
112
  - website/template.html.erb
124
113
  has_rdoc: true
125
114
  homepage: http://irgat.rubyforge.org
126
- post_install_message: |+
115
+ post_install_message: |
116
+ New Install:
117
+ ------------
118
+
127
119
  Run irgat_setup to setup Irgat
128
120
 
129
- For more information on Irgat, see http://irgat.rubyforge.org
121
+ For more information on Irgat read the rdoc documentation or see http://irgat.rubyforge.org
130
122
 
123
+ Updater: (0.0.1 => 0.0.2)
124
+ -------------------------
125
+
126
+ If you have already installed run irgat_updater. These script checks your config files and show posible difference between older and new config files.
127
+
128
+ The program only marks these changes. You have to do it manually.
129
+
131
130
  rdoc_options:
132
131
  - --main
133
132
  - README.txt
@@ -148,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
147
  requirements: []
149
148
 
150
149
  rubyforge_project: irgat
151
- rubygems_version: 1.2.0
150
+ rubygems_version: 1.3.1
152
151
  signing_key:
153
152
  specification_version: 2
154
153
  summary: Intuitive Ruby for Gnoxys Administration Tools
@@ -1,11 +0,0 @@
1
- # load the following modules
2
- load_modules: all # [ array ] || all || none
3
-
4
- #----------------------------
5
- # Non common change variables
6
- #----------------------------
7
- # Subsystem variable
8
- subsystem_name: console
9
- subsystem_description: 'Irgat console module'
10
- run_as_root: false
11
- report_email: false
@@ -1,16 +0,0 @@
1
- command: dar
2
- description: Disk Archiver
3
- alias:
4
- options:
5
- 1:
6
- name: create
7
- description: creates a backup
8
- ci_parameter: [ '-c', '--create']
9
- arguments:
10
- 1: %file_url
11
- 2:
12
- name: extract
13
- description: extrac file from the given backup
14
- ci_parameter: [ '-x', '--extract']
15
- arguments:
16
- 1: %file_url
@@ -1,18 +0,0 @@
1
- # IRGAT config kwallet file:
2
- # Look <your irgat path>/README for more information
3
-
4
- # Name of your Def Kwallet
5
- kwallet_name: gnoxys
6
-
7
- # path to the files
8
- local_path: /home/user/.kde/share/apps/kwallet/
9
- # remote path is checked by ssh connections agains the especified server.
10
- # No other methods (svn will be great) are implemented yet.
11
- remote_path:
12
- server: litura.gnoxys.net
13
- port: 22229
14
- user: nogates
15
- folder: /home/nogates/
16
-
17
-
18
-