auto_reloader 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/auto_reloader/version.rb +1 -1
- data/lib/auto_reloader.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe07852820635d96113ac46d70341b88a25bc229
|
4
|
+
data.tar.gz: c269465db561170e62fbc72edfb39e056550b8dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a4fabc3d94d9f355d523635cfa560413e487c05cee3422739ce353cbdc68bb1a6913a2cba5ab7e919c0d3b158fdf992f911d4fe850d8dcfa54e8c6d2d27a919
|
7
|
+
data.tar.gz: 407453e32124a922ae721c3cd543f13e335fe2e39b892f2b8888a40988b258d8a8fe8a95135d936580b0eb736af8d5080a6f61c1ef76de256766426eb17ee01c
|
data/lib/auto_reloader.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen-string-literal: true
|
2
|
+
|
1
3
|
require 'auto_reloader/version'
|
2
4
|
require 'singleton'
|
3
5
|
require 'forwardable'
|
@@ -21,7 +23,8 @@ class AutoReloader
|
|
21
23
|
end
|
22
24
|
|
23
25
|
def require_relative(path)
|
24
|
-
|
26
|
+
from = caller.first.split(':', 2)[0]
|
27
|
+
fullpath = File.expand_path File.join File.dirname(caller.first), path
|
25
28
|
AutoReloader.instance.require_relative path, fullpath
|
26
29
|
end
|
27
30
|
end
|
@@ -34,7 +37,7 @@ class AutoReloader
|
|
34
37
|
def activate(reloadable_paths: [], onchange: true, delay: nil, watch_paths: nil,
|
35
38
|
watch_latency: 1)
|
36
39
|
@activate_lock.synchronize do
|
37
|
-
raise ActivatedMoreThanOnce,
|
40
|
+
raise ActivatedMoreThanOnce, 'Can only activate Autoreloader once' if @reloadable_paths
|
38
41
|
@default_delay = delay
|
39
42
|
@default_onchange = onchange
|
40
43
|
@watch_latency = watch_latency
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto_reloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Rosenfeld Rosas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|