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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e0a06731eb7350156212cfbfac72977fdc93c8a
4
- data.tar.gz: 490d0ec9f0865aaee80208615c4a246569ba9daa
3
+ metadata.gz: f50c557978e091f2f3c4a82e59074c0781e5b2db
4
+ data.tar.gz: ec3825777dbb4e1065d3bc47ffb071f7adebbf42
5
5
  SHA512:
6
- metadata.gz: 0c673ae856d5bde00687f0646233e7f1ff70b101615c3842a9aa3f9adf2176604579a508755cb76d4349844046953403a24ece12ac4f0e66765e697afec11160
7
- data.tar.gz: 4e2565bd400bd88b6e00e2a14709bd2c4ae6b70e4951d4d1b573207ec6e01240ad0e1ab6c3d7e74d656fe023708c852914aec6fe64ba2a329a5fc70a315e9309
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
- if ignore_path.is_a?(String)
32
- ignored << path if path.start_with?(ignore_path)
33
- true
34
- elsif ignore_path.is_a?(Regexp)
35
- ignored << path if path =~ ignore_path
36
- true
37
- else
38
- raise(
39
- ArgumentError,
40
- "unknown ignore path (expected string or regex): #{ignore_path.class} - #{ignore_path.inspect}"
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
@@ -1,3 +1,3 @@
1
1
  class FireflyServer
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  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.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-05-12 00:00:00.000000000 Z
11
+ date: 2018-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: listen