rupi 0.2.0 → 0.2.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.
- data/bin/rupi_service +4 -1
- data/lib/rupi/pin.rb +5 -2
- data/lib/rupi/version.rb +1 -1
- metadata +1 -1
data/bin/rupi_service
CHANGED
@@ -56,7 +56,10 @@ Daemons.run_proc('rupi_service', :dir_mode => :system, :log_output => true, :bac
|
|
56
56
|
Rupi::Pin.join_watch_thread
|
57
57
|
run_thread.terminate if run_thread
|
58
58
|
|
59
|
-
run_thread = Thread.new
|
59
|
+
run_thread = Thread.new do
|
60
|
+
puts "loading rupi program from #{file_name}"
|
61
|
+
load(file_name)
|
62
|
+
end
|
60
63
|
|
61
64
|
update_at = new_updated_at
|
62
65
|
end
|
data/lib/rupi/pin.rb
CHANGED
@@ -75,8 +75,10 @@ module Rupi
|
|
75
75
|
def self.unwatch(pin)
|
76
76
|
return unless @watched_pins
|
77
77
|
if pin == :all
|
78
|
-
@watched_pins.
|
78
|
+
@watched_pins.keys.each { |p| unwatch(p) }
|
79
79
|
else
|
80
|
+
pin.down_handlers.clear
|
81
|
+
pin.up_handlers.clear
|
80
82
|
@watched_pins.delete(pin)
|
81
83
|
end
|
82
84
|
end
|
@@ -98,14 +100,15 @@ module Rupi
|
|
98
100
|
@watched_pins[pin] = value
|
99
101
|
end
|
100
102
|
sleep(0.1)
|
101
|
-
|
102
103
|
end
|
104
|
+
|
103
105
|
end
|
104
106
|
end
|
105
107
|
|
106
108
|
def self.stop_watching
|
107
109
|
@watching = false
|
108
110
|
join_watch_thread
|
111
|
+
@watch_thread = nil
|
109
112
|
end
|
110
113
|
|
111
114
|
def self.watching?
|
data/lib/rupi/version.rb
CHANGED