guard-compat 1.2.0 → 1.2.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 +8 -4
- data/lib/guard/compat/plugin.rb +10 -6
- data/lib/guard/compat/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: c8740158b091cdc81c4853a000baa4704b7518fb
|
4
|
+
data.tar.gz: a4b25909123ca5366b50e46d4cd07cec6cc481f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1ce7dedee0d599f2ae22d956ed2297a0bf135bf267a1310bdd087cf311ce60af9c7c04e6745d3345d4e87fca1497d7ddae39466ac7fcec6f45b9477d4091391
|
7
|
+
data.tar.gz: d64396e24c497fb6e6609916fcc576dc0963351658d81623916b1e894bea8bec1540c21aad627a631dc67689ee0652b196bf1840866d3693e36a1fcefb9ff196
|
data/README.md
CHANGED
@@ -27,9 +27,10 @@ end
|
|
27
27
|
|
28
28
|
### IMPORTANT
|
29
29
|
|
30
|
-
1
|
31
|
-
2
|
32
|
-
3
|
30
|
+
1. Do not include *any* files from Guard directly (if you need something from Guard which Guard::Compat doesn't provide, file an issue)
|
31
|
+
2. Include 'guard/compat/plugin' is *all* your files which use `Guard::Plugin`
|
32
|
+
3. Make sure you include the `< Plugin` part in *every* file which add classes or methods to your plugin class (important if your plugin consists of multiple files/sub class)
|
33
|
+
4. Remove requires from your spec_helper and explicitly add them to each test/file
|
33
34
|
|
34
35
|
|
35
36
|
And in your plugin tests (e.g. `spec/lib/guard/myplugin_spec.rb`):
|
@@ -39,9 +40,12 @@ require 'guard/compat/test/helper'
|
|
39
40
|
require 'guard/myplugin'
|
40
41
|
|
41
42
|
# And your tests instantiating your plugin go here...
|
43
|
+
RSpec.describe Guard::Myplugin do
|
42
44
|
```
|
43
45
|
|
44
|
-
|
46
|
+
|
47
|
+
|
48
|
+
|
45
49
|
|
46
50
|
### Migrating your API calls
|
47
51
|
|
data/lib/guard/compat/plugin.rb
CHANGED
@@ -108,12 +108,16 @@ module Guard
|
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
111
|
-
def self.notify(
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
111
|
+
def self.notify(msg, options = {})
|
112
|
+
return $stdout.puts(msg) unless Guard.const_defined?(:UI)
|
113
|
+
return Notifier.notify(msg, options) if Notifier.respond_to?(:notify)
|
114
|
+
|
115
|
+
# test helper was included
|
116
|
+
note = 'NOTE: Notification is disabled when testing Guard plugins'\
|
117
|
+
' (it makes no sense)'
|
118
|
+
|
119
|
+
$stderr.puts(note)
|
120
|
+
$stdout.puts(msg)
|
117
121
|
end
|
118
122
|
end
|
119
123
|
end
|
data/lib/guard/compat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-compat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cezary Baginski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|