alki-reload 0.3.2 → 0.3.3
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.
- checksums.yaml +4 -4
- data/README.adoc +32 -0
- data/alki-reload.gemspec +1 -1
- data/lib/alki/reload/assembly_delegator.rb +2 -1
- data/lib/alki/reload/listen_watcher.rb +2 -2
- data/lib/alki/reload/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f5ba8066bdca7a668ada39dce7efb5c47795578
|
4
|
+
data.tar.gz: cd3e3dbb13c21703215f2cd264fc5d70f847eabb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90a4a2e06115368471dc474dbf2088553a20f6b8d396a30bc2448f8afa6b67ca0c9c01fc90f8ad33ae55b1ce134a5816d6375de9325b29e65c8983a1bc606aca
|
7
|
+
data.tar.gz: dc0e560d4a0e5c40a14e4a5bfebb27caff2f54e5b9c43e5f4071a63b1b281a3e64bdd9d85b16e0a105b62cbc8f0bdff165055072e80fb17f56f11b8ee038b65b
|
data/README.adoc
CHANGED
@@ -39,6 +39,38 @@ Alki do
|
|
39
39
|
end
|
40
40
|
```
|
41
41
|
|
42
|
+
### Naming Pitfalls
|
43
|
+
|
44
|
+
Alki::Reload attempts to be conservative in what it reloads.
|
45
|
+
By default, it will only reload files which are in your project,
|
46
|
+
and are either in the ruby load path
|
47
|
+
or registered with https://github.com/alki-project/alki-loader[Alki::Loader].
|
48
|
+
|
49
|
+
Additionally, Alki::Reload will only reload files where it can find a
|
50
|
+
corresponding constant.
|
51
|
+
This is done via a straightforward "classify" method which does *not* take
|
52
|
+
abbreviations into account.
|
53
|
+
|
54
|
+
#### Examples of Classes that Alki::Reload will not reload
|
55
|
+
|
56
|
+
.lib/my_project/foo.rb
|
57
|
+
```ruby
|
58
|
+
class Foo
|
59
|
+
end
|
60
|
+
```
|
61
|
+
|
62
|
+
Expects `Foo` to be in the module `MyProject`.
|
63
|
+
|
64
|
+
.lib/my_project/http_client.rb
|
65
|
+
```ruby
|
66
|
+
module MyProject
|
67
|
+
class HTTPClient
|
68
|
+
end
|
69
|
+
end
|
70
|
+
```
|
71
|
+
|
72
|
+
Doesn't know that "HTTP" is an acronym, so it expects class to be `HttpClient`.
|
73
|
+
|
42
74
|
### Conditional usage
|
43
75
|
|
44
76
|
Because enabling reload can have a performance impact, typically it's only enabled when in some sort
|
data/alki-reload.gemspec
CHANGED
@@ -32,8 +32,8 @@ module Alki
|
|
32
32
|
class Listener
|
33
33
|
def initialize(dirs,reloader)
|
34
34
|
@count = 0
|
35
|
-
@listen = Listen.to(*dirs) do |modified,
|
36
|
-
if @count > 0 && modified
|
35
|
+
@listen = Listen.to(*dirs) do |modified, added, removed|
|
36
|
+
if @count > 0 && (modified || added || removed)
|
37
37
|
reloader.reload
|
38
38
|
end
|
39
39
|
end
|
data/lib/alki/reload/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alki-reload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Edlefsen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: listen
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.13.
|
33
|
+
version: 0.13.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.13.
|
40
|
+
version: 0.13.3
|
41
41
|
description:
|
42
42
|
email:
|
43
43
|
- matt.edlefsen@gmail.com
|