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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8bea3b0b5cc442c2c5b10976c87ad36407e5066d
4
- data.tar.gz: df406a03c512afab623264e68c8fba0f926a9ceb
3
+ metadata.gz: c8740158b091cdc81c4853a000baa4704b7518fb
4
+ data.tar.gz: a4b25909123ca5366b50e46d4cd07cec6cc481f4
5
5
  SHA512:
6
- metadata.gz: 01036358dd3830011dbeceac79ecdc19ef6a7788369d8f20f1314445bf187627b7214f23cde5330fa0bce6977431bdedee3e6f1ea5bc6a8dc2df2f5f2461c239
7
- data.tar.gz: 32bf5202d15a4480394311cc5799e231ac9c3bf37b20e288507f609cc0159b8806090e48eb8723903cea6d9a709625dee0e0a643fbc073e01a5e533b128d40a7
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) 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)
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
- (OPTIONAL: if your plugin consists of many files, you may prefer to add the two above requires to your `spec/spec_helper.rb` or test setup files)
46
+
47
+
48
+
45
49
 
46
50
  ### Migrating your API calls
47
51
 
@@ -108,12 +108,16 @@ module Guard
108
108
  end
109
109
  end
110
110
 
111
- def self.notify(message, options = {})
112
- if Guard.const_defined?(:UI)
113
- Guard::Notifier.notify(message, options)
114
- else
115
- $stdout.puts(message)
116
- end
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
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module Compat
3
- VERSION = '1.2.0'
3
+ VERSION = '1.2.1'
4
4
  end
5
5
  end
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.0
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: 2014-12-21 00:00:00.000000000 Z
11
+ date: 2015-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler