filewatcher 2.0.0.beta4 → 2.0.0.beta5
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/lib/filewatcher/spec_helper.rb +12 -7
- data/lib/filewatcher/spec_helper/watch_run.rb +1 -5
- data/lib/filewatcher/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4552a19cac521012fb0cca2c232a14f501530262e02639ed017c0897e5f985f
|
4
|
+
data.tar.gz: f3d98c14badcbd439a9dca5ce289b40cc80aecb1c377d8ec08f80e76c398aaf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85e030c3e12237aff4dffddfb80fdf4b288b462a35e21a63d254e1aea4ca40cd2d5ba27cb21e39e3847f16936d4291398a106bd55a3ef40205f35d75c401603c
|
7
|
+
data.tar.gz: 7cec237639d7c760b963fe42b7c7d6ef40b989dde617308434e7d29037f73aad3f6fc87f971f60b4e47f420aec779e36ab76e5a6a2f27cf4f1c0849719b0b286
|
@@ -13,18 +13,18 @@ require_relative 'spec_helper/watch_run'
|
|
13
13
|
class Filewatcher
|
14
14
|
## Helper for common spec features between plugins
|
15
15
|
module SpecHelper
|
16
|
-
|
16
|
+
ENVIRONMENT_SPECS_COEFFICIENTS = {
|
17
|
+
-> { ENV['CI'] } => 1,
|
18
|
+
-> { RUBY_PLATFORM == 'java' } => 1,
|
19
|
+
-> { Gem::Platform.local.os == 'darwin' } => 1
|
20
|
+
}.freeze
|
17
21
|
|
18
22
|
def logger
|
19
23
|
@logger ||= Logger.new($stdout, level: :debug)
|
20
24
|
end
|
21
25
|
|
22
26
|
def environment_specs_coefficients
|
23
|
-
|
24
|
-
-> { ENV['CI'] } => 1,
|
25
|
-
-> { RUBY_PLATFORM == 'java' } => 1,
|
26
|
-
-> { Gem::Platform.local.os == 'darwin' } => 1
|
27
|
-
}
|
27
|
+
ENVIRONMENT_SPECS_COEFFICIENTS
|
28
28
|
end
|
29
29
|
|
30
30
|
def wait(seconds: 1, interval: 1, &block)
|
@@ -62,7 +62,7 @@ class Filewatcher
|
|
62
62
|
|
63
63
|
def system_stat(filename)
|
64
64
|
case (host_os = RbConfig::CONFIG['host_os'])
|
65
|
-
when
|
65
|
+
when /linux(-gnu)?/
|
66
66
|
`stat --printf 'Modification: %y, Change: %z\n' #{filename}`
|
67
67
|
when /darwin\d*/
|
68
68
|
`stat #{filename}`
|
@@ -80,5 +80,10 @@ class Filewatcher
|
|
80
80
|
# debug command
|
81
81
|
`#{command}`
|
82
82
|
end
|
83
|
+
|
84
|
+
## https://github.com/rubocop/ruby-style-guide/issues/556#issuecomment-828672008
|
85
|
+
# rubocop:disable Style/ModuleFunction
|
86
|
+
extend self
|
87
|
+
# rubocop:enable Style/ModuleFunction
|
83
88
|
end
|
84
89
|
end
|
@@ -1,17 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'forwardable'
|
4
|
-
|
5
3
|
class Filewatcher
|
6
4
|
module SpecHelper
|
7
5
|
## Base class for Filewatcher runners in specs
|
8
6
|
class WatchRun
|
9
|
-
|
7
|
+
include Filewatcher::SpecHelper
|
10
8
|
|
11
9
|
TMP_DIR = "#{Dir.getwd}/spec/tmp"
|
12
10
|
|
13
|
-
def_delegators Filewatcher::SpecHelper, :debug, :wait, :system_stat
|
14
|
-
|
15
11
|
attr_reader :filename
|
16
12
|
|
17
13
|
def initialize(filename:, action:, directory:)
|
data/lib/filewatcher/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filewatcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.
|
4
|
+
version: 2.0.0.beta5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Flemming
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-04-
|
12
|
+
date: 2021-04-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|