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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97420bed4a2c7fdc518fd89b3080380f814d060c
4
- data.tar.gz: 251e81e8edec1c3f0bf88ff68f855e8eaf68ae7b
3
+ metadata.gz: fe07852820635d96113ac46d70341b88a25bc229
4
+ data.tar.gz: c269465db561170e62fbc72edfb39e056550b8dd
5
5
  SHA512:
6
- metadata.gz: 067b421dd968139aa4890d8adfc518d5955704afb8dfd52f5e574c75f06dc90d843d06b33c16ad87703cd44259f9c9d8c7fab684fe8e5eec5b091c2f252ab380
7
- data.tar.gz: 9340bcab9b71c622b95d3a73f1affa0abbf5b49d842c0d7081a138fc7ef7d6c295330db2624b40333e631f30dced71eea8459b037b93fbd9680861603848f2f6
6
+ metadata.gz: 2a4fabc3d94d9f355d523635cfa560413e487c05cee3422739ce353cbdc68bb1a6913a2cba5ab7e919c0d3b158fdf992f911d4fe850d8dcfa54e8c6d2d27a919
7
+ data.tar.gz: 407453e32124a922ae721c3cd543f13e335fe2e39b892f2b8888a40988b258d8a8fe8a95135d936580b0eb736af8d5080a6f61c1ef76de256766426eb17ee01c
@@ -1,3 +1,3 @@
1
1
  class AutoReloader
2
- VERSION = '0.2.5'
2
+ VERSION = '0.2.6'
3
3
  end
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
- fullpath = File.join File.dirname(caller.first), path
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, "Can only activate Autoreloader once" if @reloadable_paths
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.5
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-08 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler