dyntask-ruby 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/dyntask-init +1 -1
- data/bin/dyntask-server +18 -66
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b278cc5e43346d533da6483e3266a3ced5da7ce
|
4
|
+
data.tar.gz: f72452829232d225d89c8b50cb7e2ca27f44b684
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c487d77d6a425d64b357dbb6106fa8ff839c3863d13ba136f8c742d4475ee64c622f16f0c6d445cbb3c0db449520fb1820936777ae7ed20543d29c3245972f3b
|
7
|
+
data.tar.gz: 3572af87b51ce097ae91e96c939bb5163792e0a6f4281a16231841891abd9c384cacd90048fc5d127ad57de6e88e6c131e2fe7c9f22a2582af45a987acdb65b0
|
data/bin/dyntask-init
CHANGED
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
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
78
|
-
#
|
79
|
-
#
|
80
|
-
|
81
|
-
#
|
82
|
-
#
|
83
|
-
#
|
84
|
-
#
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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
|