guard-compat 0.1.0 → 0.1.1
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.md +7 -0
- data/lib/guard/compat/plugin.rb +6 -1
- data/lib/guard/compat/test/helper.rb +30 -22
- data/lib/guard/compat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e97e53dd8b3d4582312361dd2c7742cd9435d88
|
4
|
+
data.tar.gz: 11c0eee7fc9a872e8b09ba65299088db5adf433e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 039ff7b7750fa578c7c485a8e13bb3c71e151d46959de17f2d8adacc6914dcf103370fab49c5f9c7b9f3dba39188dba0a118a9c625eae9512e98c6ab247c2025
|
7
|
+
data.tar.gz: 9fdbbee0c1ecdf32540a9aac987c5d46e0b7bd05e1d94038f3f8face35176af634e7f3bc60ca16da1dc09ada49fe42774f6aa8ecdf5e01045d6e33a44c222d38
|
data/README.md
CHANGED
@@ -32,6 +32,13 @@ end
|
|
32
32
|
|
33
33
|
```
|
34
34
|
|
35
|
+
In your gemspec:
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
s.add_dependency('guard-compat', '~> 0.1')
|
39
|
+
```
|
40
|
+
|
41
|
+
|
35
42
|
### IMPORTANT
|
36
43
|
|
37
44
|
1) Do not include *any* files from Guard directly (if you need something from Guard which Guard::Compat doesn't provide, file an issue)
|
data/lib/guard/compat/plugin.rb
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
unless Object.const_defined?('Guard
|
1
|
+
unless Object.const_defined?('Guard')
|
2
|
+
module Guard
|
3
|
+
end
|
4
|
+
end
|
5
|
+
|
6
|
+
unless Guard.const_defined?('Plugin')
|
2
7
|
# Provided empty definition so requiring the plugin without Guard won't crash
|
3
8
|
# (e.g. when added to a Gemfile without `require: false`)
|
4
9
|
module Guard
|
@@ -11,31 +11,39 @@ module Guard
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
# Stub, but allow real Notifier to be used, because e.g. guard-minitest uses
|
15
|
+
# is while guard-process is being tested
|
16
|
+
unless Guard.const_defined?('Notifier')
|
17
|
+
module Notifier
|
18
|
+
def self.notify(_msg, _options = {})
|
19
|
+
fail NotImplementedError, 'stub this method in your tests'
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
19
23
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
24
|
+
# Stub, but allow real UI to be used, because e.g. guard-minitest uses it
|
25
|
+
# through using Guard::Notifier
|
26
|
+
unless Guard.const_defined?('UI')
|
27
|
+
module UI
|
28
|
+
def self.info(_msg, _options = {})
|
29
|
+
fail NotImplementedError, 'stub this method in your tests'
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.warning(_msg, _options = {})
|
33
|
+
fail NotImplementedError, 'stub this method in your tests'
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.error(_msg, _options = {})
|
37
|
+
fail NotImplementedError, 'stub this method in your tests'
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.debug(_msg, _options = {})
|
41
|
+
fail NotImplementedError, 'stub this method in your tests'
|
42
|
+
end
|
43
|
+
|
44
|
+
def self.deprecation(_msg, _options = {})
|
45
|
+
fail NotImplementedError, 'stub this method in your tests'
|
46
|
+
end
|
39
47
|
end
|
40
48
|
end
|
41
49
|
end
|
data/lib/guard/compat/version.rb
CHANGED