snoop 0.9.0 → 0.9.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/Gemfile.lock +1 -1
- data/README.md +7 -7
- data/lib/snoop/{http.rb → http_notifier.rb} +1 -1
- data/lib/snoop/version.rb +1 -1
- data/lib/snoop.rb +1 -1
- data/spec/acceptance/{http_spec.rb → http_notifier_spec.rb} +1 -1
- data/spec/unit/{http_spec.rb → http_notifier_spec.rb} +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 152dcead9bbc1c28201f4f6a6b31390759f54d7a
|
4
|
+
data.tar.gz: 5fa17a9900573cd5433ae63f33c57e2d315d6ed4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea4885f7414a9e3bc3f7ed837cca2af50e7965dba65d431ad9c605eebcdf4fe05c05e56f3748af604a80d4763d9eef53179f2b281391ad7fb7ae7d0a9b8675cf
|
7
|
+
data.tar.gz: 8215f8beba3f4f679e0d57fbcb5c9d97b5739e5c7b649e234c9cf5038e8664b472c789e353be26732787315c719e47f34dc10a526fa403e9f78a674879e52be8
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -15,7 +15,7 @@ version has been posted. In this example, we'll check
|
|
15
15
|
```ruby
|
16
16
|
require 'snoop'
|
17
17
|
|
18
|
-
snoop = Snoop::
|
18
|
+
snoop = Snoop::HttpNotifier.new(
|
19
19
|
url: 'http://jruby.org',
|
20
20
|
css: '#latest_release strong'
|
21
21
|
)
|
@@ -45,7 +45,7 @@ require 'snoop'
|
|
45
45
|
|
46
46
|
video = '2291-larubyconf2013-impressive-ruby-productivity-with-vim-and-tmux'
|
47
47
|
|
48
|
-
snoop = Snoop::
|
48
|
+
snoop = Snoop::HttpNotifier.new(
|
49
49
|
url: "http://www.confreaks.com/videos/#{video}",
|
50
50
|
css: '.video-rating'
|
51
51
|
)
|
@@ -77,12 +77,12 @@ required.
|
|
77
77
|
require 'snoop'
|
78
78
|
|
79
79
|
# Receive notifications if any part of the page changes
|
80
|
-
snoop = Snoop::
|
80
|
+
snoop = Snoop::HttpNotifier.new(
|
81
81
|
url: 'http://jruby.org'
|
82
82
|
)
|
83
83
|
|
84
84
|
# Receive notifications if just the latest JRuby release changes
|
85
|
-
snoop = Snoop::
|
85
|
+
snoop = Snoop::HttpNotifier.new(
|
86
86
|
url: 'http://jruby.org',
|
87
87
|
css: '#latest_release strong'
|
88
88
|
)
|
@@ -98,7 +98,7 @@ The `count` option is most useful for timeboxing a `Snoop`.
|
|
98
98
|
|
99
99
|
```ruby
|
100
100
|
require 'snoop'
|
101
|
-
snoop = Snoop::
|
101
|
+
snoop = Snoop::HttpNotifier.new(url: 'http://jruby.org')
|
102
102
|
|
103
103
|
# Check JRuby for updates, every minute for 10 minutes
|
104
104
|
snoop.notify count: 10, delay: 60 do |content|
|
@@ -121,7 +121,7 @@ homepage every minute for changes.
|
|
121
121
|
```ruby
|
122
122
|
require 'snoop'
|
123
123
|
|
124
|
-
snoop = Snoop::
|
124
|
+
snoop = Snoop::HttpNotifier.new(url: 'http://jruby.org')
|
125
125
|
|
126
126
|
snoop.notify while: -> { true }, delay: 60 do |content|
|
127
127
|
puts content
|
@@ -137,7 +137,7 @@ the `Snoop` will stop checking.
|
|
137
137
|
```ruby
|
138
138
|
require 'snoop'
|
139
139
|
|
140
|
-
snoop = Snoop::
|
140
|
+
snoop = Snoop::HttpNotifier.new(
|
141
141
|
url: 'https://twitter.com/chrishunt',
|
142
142
|
css: '[data-element-term="follower_stats"]'
|
143
143
|
)
|
data/lib/snoop/version.rb
CHANGED
data/lib/snoop.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'snoop/notifier'
|
3
|
-
require 'snoop/
|
3
|
+
require 'snoop/http_notifier'
|
4
4
|
|
5
|
-
describe Snoop::
|
5
|
+
describe Snoop::HttpNotifier do
|
6
6
|
subject { described_class.new(url: url, css: css) }
|
7
7
|
|
8
8
|
let(:url) { 'http://example.com' }
|
@@ -19,7 +19,7 @@ describe Snoop::Http do
|
|
19
19
|
it 'raises an exception' do
|
20
20
|
expect {
|
21
21
|
subject
|
22
|
-
}.to raise_error Snoop::
|
22
|
+
}.to raise_error Snoop::HttpNotifier::UrlRequiredException
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snoop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Hunt
|
@@ -137,14 +137,14 @@ files:
|
|
137
137
|
- README.md
|
138
138
|
- Rakefile
|
139
139
|
- lib/snoop.rb
|
140
|
-
- lib/snoop/
|
140
|
+
- lib/snoop/http_notifier.rb
|
141
141
|
- lib/snoop/notifier.rb
|
142
142
|
- lib/snoop/version.rb
|
143
143
|
- snoop.gemspec
|
144
|
-
- spec/acceptance/
|
144
|
+
- spec/acceptance/http_notifier_spec.rb
|
145
145
|
- spec/spec_helper.rb
|
146
146
|
- spec/support/http_server.rb
|
147
|
-
- spec/unit/
|
147
|
+
- spec/unit/http_notifier_spec.rb
|
148
148
|
- spec/unit/notifier_spec.rb
|
149
149
|
homepage: https://github.com/chrishunt/snoop
|
150
150
|
licenses:
|
@@ -171,8 +171,8 @@ signing_key:
|
|
171
171
|
specification_version: 4
|
172
172
|
summary: Snoop on content, be notified when it changes.
|
173
173
|
test_files:
|
174
|
-
- spec/acceptance/
|
174
|
+
- spec/acceptance/http_notifier_spec.rb
|
175
175
|
- spec/spec_helper.rb
|
176
176
|
- spec/support/http_server.rb
|
177
|
-
- spec/unit/
|
177
|
+
- spec/unit/http_notifier_spec.rb
|
178
178
|
- spec/unit/notifier_spec.rb
|