dyntask-ruby 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/dyntask-init +1 -1
  3. data/bin/dyntask-server +18 -66
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9eb88661e88725a6470587e2e1df8041676ce490
4
- data.tar.gz: f04ff49f551959b2495fe9d90824c947ddc3f6bf
3
+ metadata.gz: 8b278cc5e43346d533da6483e3266a3ced5da7ce
4
+ data.tar.gz: f72452829232d225d89c8b50cb7e2ca27f44b684
5
5
  SHA512:
6
- metadata.gz: c66ba063704574fa0347160198ffef3731d959e67813c02ff1642ca43617bb46df9233842fd630b031a7b9fe5dd72efd5749a7c104bc24a7226fa15bf9ca6bc4
7
- data.tar.gz: 46449e38ffa2edcaa57a390e714bc5cd7c5d8d08f3a3e4ea310c6364cf4b0495aff0f990507c06a05c8a7e28a13ce5d903ae6a31fc6baa7608a9c02c47bed9ba
6
+ metadata.gz: c487d77d6a425d64b357dbb6106fa8ff839c3863d13ba136f8c742d4475ee64c622f16f0c6d445cbb3c0db449520fb1820936777ae7ed20543d29c3245972f3b
7
+ data.tar.gz: 3572af87b51ce097ae91e96c939bb5163792e0a6f4281a16231841891abd9c384cacd90048fc5d127ad57de6e88e6c131e2fe7c9f22a2582af45a987acdb65b0
data/bin/dyntask-init CHANGED
@@ -21,7 +21,7 @@ EOS
21
21
  opt :rm, "remove an existing file", :type => :boolean, :default => false
22
22
  end
23
23
 
24
- Trollop::die Trollop::educate if(ARGV.size == 0)
24
+ ## Trollop::die Trollop::educate if(ARGV.size == 0)
25
25
 
26
26
  case ARGV[0] || "first"
27
27
  when "first"
data/bin/dyntask-server CHANGED
@@ -25,40 +25,6 @@ end
25
25
 
26
26
  tasks_to_watch = DynTask::TaskMngr::TASKS
27
27
 
28
- # ARGV[0..-1].each do |a|
29
- # if !(a.include? ",") and File.exists? (etc_tasks=File.join(DynTask.cfg_dir[:etc],"tasks",a))
30
- # tasks_to_watch += File.read(etc_tasks).strip.split(/\s+/)
31
- # else
32
- # tasks_to_watch << a
33
- # end
34
- # end
35
-
36
-
37
- # root working directory
38
- # dyntask_root=nil
39
- # if options[:workdir] != ""
40
- # dyntask_root=options[:workdir].sub("~",ENV["HOME"])
41
- # else
42
- # etc_work_dir=File.join(DynTask.cfg_dir[:etc],"workdir")
43
- # dyntask_root=File.read(etc_work_dir).strip.sub("~",ENV["HOME"]) if File.exists? etc_work_dir
44
- # end
45
-
46
- # unless dyntask_root
47
- # puts "Working directory unset!\n Use: option -w with dyntask-server\n or\n Launch: dyntask-init -w <WORKING DIRECTORY> to set default working directory!"
48
- # exit
49
- # end
50
- # unless File.exists? dyntask_root
51
- # puts "Stop: #{dyntask_root} is not a directory!"
52
- # exit
53
- # end
54
-
55
- #puts "Root directory is #{dyntask_root}"
56
-
57
- # if tasks_to_watch.empty?
58
- # puts "Stop: no tasks to serve!\n Launch: dyntask-init <NAME> <WORKDIR>:<LIST OF COMMA SEPARATED TASKS> to set of tasks to be called by <NAME>!"
59
- # exit
60
- # end
61
-
62
28
  files_to_watch=[]
63
29
  rundir=DynTask.cfg_dir[:run]
64
30
  tasks_to_watch.each do |e|
@@ -69,37 +35,23 @@ files_to_watch.uniq!
69
35
 
70
36
  puts "Tasks watched: #{files_to_watch}"
71
37
 
72
- # def restart(child_pid, env, cmd)
73
- # Process.kill(9,child_pid)
74
- # Process.wait(child_pid)
75
- # rescue Errno::ESRCH
76
- # # already killed
77
- # ensure
78
- # child_pid = Process.spawn({}, cmd)
79
- # end
80
-
81
- # if(options[:restart])
82
- # rd, wr = IO.pipe
83
- # child_pid = nil
84
- # end
85
-
86
- if RUBY_PLATFORM =~ /mingw/
87
- begin
88
- require 'win32/dirmonitor'
89
- include Win32
90
-
91
- # Wait for a change in your home directory and report any changes.
92
-
93
- monitor = Win32::DirMonitor.new(DynTask.cfg_dir[:run])
94
-
95
- monitor.wait(){ |struct|
96
- path = Pathname.new(struct.file).realpath.to_s
97
- DynTask.read_tasks path
98
- }
99
- rescue SystemExit, Interrupt
100
- puts "leaving win32-dirmonitor"
101
- end
102
- else
38
+ # if RUBY_PLATFORM =~ /mingw/
39
+ # begin
40
+ # require 'win32/dirmonitor'
41
+ # include Win32
42
+ #
43
+ # # Wait for a change in your home directory and report any changes.
44
+ #
45
+ # monitor = Win32::DirMonitor.new(DynTask.cfg_dir[:run])
46
+ #
47
+ # monitor.wait(){ |struct|
48
+ # path = Pathname.new(struct.file).realpath.to_s
49
+ # DynTask.read_tasks path
50
+ # }
51
+ # rescue SystemExit, Interrupt
52
+ # puts "leaving win32-dirmonitor"
53
+ # end
54
+ # else
103
55
  begin
104
56
 
105
57
  ##p files
@@ -115,4 +67,4 @@ else
115
67
  rescue SystemExit, Interrupt
116
68
  fw.finalize
117
69
  end
118
- end
70
+ # end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dyntask-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CQLS