irgat 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.0.6 2008-12-05
2
+
3
+ * ChangeLog:
4
+ * Fixed incorrect chdir
5
+
1
6
  == 0.0.5 2008-11-21
2
7
 
3
8
  * ChangeLog:
data/lib/irgat/execs.rb CHANGED
@@ -12,13 +12,22 @@ module Irgat
12
12
  command_data[:exec] = command.to_s
13
13
  command_data[:pre_time] = Time.now
14
14
 
15
-
16
- Open3.popen3 "#{ command_data[:exec] }" do |stdin, stdout, stderr|
17
- command_data[:status] = $?
15
+ # No status is retuned, append at exit
16
+ Open3.popen3 "#{ command_data[:exec] }; echo \"_irgat_data_exit_command|\"$?" do |stdin, stdout, stderr|
18
17
  command_data[:errors] = stderr.readlines.join('')
19
18
  command_data[:output] = stdout.readlines.join('')
20
19
  end
21
-
20
+ tmp = ''
21
+ command_data[:output].each_line {|l|
22
+ # exit status?
23
+ if l =~ /^_irgat_data_exit_command/
24
+ command_data[:status] = l.split('|').last.to_i
25
+ else
26
+ tmp << l
27
+ end
28
+ }
29
+
30
+ command_data[:output] = tmp
22
31
 
23
32
  #changes in output
24
33
  #command_data[:output] = %x[ #{command_data[:exec] } 2> /tmp/error_out ]
@@ -70,7 +79,7 @@ module Irgat
70
79
 
71
80
  # output unless irgat is not running a module
72
81
  output_log(self,
73
- { :main_msj => "[IRGAT] [#{ self.config_module[:subsystem_name].capitalize }] [ERROR] #{ self.action } process in #{ @config[:server_name] }",
82
+ { :main_msj => "[IRGAT] [#{ self.config_module[:subsystem_name].upcase }] [ERROR] #{ self.action } process in #{ @config[:server_name] }",
74
83
  :fatal => true }) unless self.class.to_s == "Irgat::Irgat"
75
84
 
76
85
  exit (options[:exit_level] ? options[:exit_level] : 1)
data/lib/irgat/version.rb CHANGED
@@ -2,7 +2,7 @@ module Irgat
2
2
  module Version #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 5
5
+ TINY = 6
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
 
@@ -215,6 +215,8 @@ module Irgat
215
215
 
216
216
  end
217
217
  end
218
+ # return to current
219
+ Dir.chdir(@folders[:data_local_current])
218
220
  end
219
221
 
220
222
  def change_path_in_catalog(new_path, backup_pattern, options = {})
@@ -54,7 +54,9 @@ module Irgat
54
54
  end
55
55
 
56
56
  def kk(args)
57
- execute_command("su - \n\n\n","kk de lavaka")
57
+ execute_command("ls /med","kk")
58
+ exit
59
+ # execute_command("su - \n\n\n","kk de lavaka")
58
60
  end
59
61
 
60
62
  def do_petition(args)
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.5
4
+ version: 0.0.6
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-11-21 00:00:00 +00:00
12
+ date: 2008-12-05 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency