rdoc-view 0.0.9 → 0.1.0

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.
@@ -1,3 +1,3 @@
1
1
  module RDocView
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/rdoc-view.rb CHANGED
@@ -93,12 +93,14 @@ module RDocView
93
93
  end
94
94
 
95
95
  # ファイル監視
96
- listener = Listen::Listener.new(File.dirname(settings.target_file)) do |modified, added, removed|
97
- if modified.include?(settings.target_file) || added.include?(settings.target_file) then
96
+ callback = Proc.new do |modified, added, removed|
97
+ if modified.include?(settings.target_file) || added.include?(settings.target_file) then
98
98
  send_func.call()
99
99
  end
100
100
  end
101
- listener.start(false)
101
+ listener = Listen.to(File.dirname(settings.target_file), :relative_paths => false)
102
+ .change(&callback)
103
+ .start
102
104
 
103
105
  # 簡易的なTimer。定期的にPingを飛ばす。
104
106
  th_timer = Thread.new() do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc-view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: