auto_reloader 0.1.1 → 0.1.2

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: 10d211ee236cf788def54e33a156ea5e7c6d7ba0
4
- data.tar.gz: 0f4e6c959bcaa7d4ff5a097370dc2938d3e1598a
3
+ metadata.gz: 10beff4b13c065b8d6c20336b1046c0786590c70
4
+ data.tar.gz: eee5bfb397efaa8846dfe155d81a657b8e2f56d7
5
5
  SHA512:
6
- metadata.gz: a7204e0efb27b81beb4790fdf36f105766816e791ec450dc6f7d076aafb1e76fd1ac2e941394d9f03ac687f48d335c8b8441ba3770144a2b353324c173dfd6ec
7
- data.tar.gz: 8b79ba4dfdf0365b652b1eaa0dcb18cb1991c1ec7034819da7b6ebfc020b6fd933a8bb526d1ec01579e6e3b6a2feab65e57d40546148e5cb847922b694566067
6
+ metadata.gz: 5c3e98205d8ff2c48e73fd4a6c8e6046cec6c296de3388dc8df3d17ad6f924970b380075f30f43ee2389a6f28f57de343b0d36ec1f21b6f7b6352e388d5917c3
7
+ data.tar.gz: 5520c5208041eaff4b9c23d33b0b290150f72cb9c2340b1f80264309d06a485ee84acd6b71469f8269e1e28cc3bd205f55fd6abed35dc4d60bc03bf018821157
@@ -1,3 +1,3 @@
1
1
  class AutoReloader
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
data/lib/auto_reloader.rb CHANGED
@@ -147,14 +147,18 @@ class AutoReloader
147
147
  def changed?
148
148
  return true unless @last_mtime_by_path
149
149
  @reload_lock.synchronize do
150
- return @unload_files.any?{|f| @last_mtime_by_path[f] != File.mtime(f) }
150
+ return @unload_files.any?{|f| @last_mtime_by_path[f] != safe_mtime(f) }
151
151
  end
152
152
  end
153
153
 
154
+ def safe_mtime(path)
155
+ File.mtime(path) if File.exist?(path)
156
+ end
157
+
154
158
  def find_mtime
155
159
  @reload_lock.synchronize do
156
160
  @last_mtime_by_path = {}
157
- @unload_files.each{|f| @last_mtime_by_path[f] = File.mtime f }
161
+ @unload_files.each{|f| @last_mtime_by_path[f] = safe_mtime f }
158
162
  end
159
163
  @last_mtime_by_path
160
164
  end
metadata CHANGED
@@ -1,58 +1,58 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_reloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Rosenfeld Rosas
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-16 00:00:00.000000000 Z
11
+ date: 2016-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: bundler
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
18
  version: '1.11'
20
- type: :development
19
+ name: bundler
21
20
  prerelease: false
21
+ type: :development
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.11'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - "~>"
32
31
  - !ruby/object:Gem::Version
33
32
  version: '10.0'
34
- type: :development
33
+ name: rake
35
34
  prerelease: false
35
+ type: :development
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - "~>"
46
45
  - !ruby/object:Gem::Version
47
46
  version: '3.0'
48
- type: :development
47
+ name: rspec
49
48
  prerelease: false
49
+ type: :development
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
- description:
55
+ description:
56
56
  email:
57
57
  - rr.rosas@gmail.com
58
58
  executables: []
@@ -75,7 +75,7 @@ homepage: https://github.com/rosenfeld/auto_reloader
75
75
  licenses:
76
76
  - MIT
77
77
  metadata: {}
78
- post_install_message:
78
+ post_install_message:
79
79
  rdoc_options: []
80
80
  require_paths:
81
81
  - lib
@@ -90,9 +90,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubyforge_project:
94
- rubygems_version: 2.5.1
95
- signing_key:
93
+ rubyforge_project:
94
+ rubygems_version: 2.6.4
95
+ signing_key:
96
96
  specification_version: 4
97
97
  summary: A transparent code reloader.
98
98
  test_files: []