firefly_server 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 +4 -4
- data/README.md +5 -1
- data/lib/firefly_server/file_watcher.rb +11 -12
- data/lib/firefly_server/version.rb +1 -1
- 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: f50c557978e091f2f3c4a82e59074c0781e5b2db
|
4
|
+
data.tar.gz: ec3825777dbb4e1065d3bc47ffb071f7adebbf42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20ccdefe2cd77cbb0cd14781d32c351e580d352f76ff4a42bbdfdc6c76ff67f6e76ca0fba8d634d6a5e0435abfd8435a5b7f5d7b9d14ec71cb9377c1abbeab81
|
7
|
+
data.tar.gz: 89edda3f6bfc57e214d788fb9b136edb678c3e3df2bc24bea31bc4afbf3fbf69edd0e3082eff0f9cf2332fe7a03f4f15b76f58958ed12214b04523d87818e79d
|
data/README.md
CHANGED
@@ -24,11 +24,15 @@ Create script `bin/firefly_server`
|
|
24
24
|
|
25
25
|
```ruby
|
26
26
|
#!/usr/bin/env ruby
|
27
|
+
|
28
|
+
# load gems
|
29
|
+
rails_root = File.expand_path("../..", __FILE__)
|
30
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("#{rails_root}/Gemfile", __FILE__)
|
27
31
|
require "bundler/setup"
|
28
32
|
require "firefly_server"
|
29
33
|
|
34
|
+
# configure server
|
30
35
|
server = FireflyServer.new.configure do |config|
|
31
|
-
rails_root = File.expand_path("../..", __FILE__)
|
32
36
|
# file watcher
|
33
37
|
config.watch_paths = %w[ app lib config vendor db/schemas bin ].map do |rails_dir|
|
34
38
|
"#{rails_root}/#{rails_dir}"
|
@@ -28,18 +28,17 @@ class FireflyServer
|
|
28
28
|
# remove ignored paths
|
29
29
|
paths.reject! do |path|
|
30
30
|
configuration.ignore_paths.any? do |ignore_path|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
31
|
+
is_ignored =
|
32
|
+
case ignore_path
|
33
|
+
when String then path.start_with?(ignore_path)
|
34
|
+
when Regexp then path =~ ignore_path
|
35
|
+
else
|
36
|
+
raise(
|
37
|
+
ArgumentError,
|
38
|
+
"unknown ignore path (expected string or regex): #{ignore_path.class} - #{ignore_path.inspect}"
|
39
|
+
)
|
40
|
+
end
|
41
|
+
ignored << path if is_ignored
|
43
42
|
end
|
44
43
|
end
|
45
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firefly_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Griffith Chaffee
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: listen
|