snoop 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa3e46c444207c14e901618fd4dcebda2d071a6d
4
- data.tar.gz: c618dcb9b9ee2df1e0132160b9e29271e3d36cf5
3
+ metadata.gz: 152dcead9bbc1c28201f4f6a6b31390759f54d7a
4
+ data.tar.gz: 5fa17a9900573cd5433ae63f33c57e2d315d6ed4
5
5
  SHA512:
6
- metadata.gz: 4a9c16933727dce0b5f51136766655b05879f7b6788d55b785f890574ef9863fd57690a84317565d0124c6002eac7ff93f65caf61478515ac140151d7eb17aa9
7
- data.tar.gz: f353f036f82730ca2969d0b4c1fd8dd0d72ea6d69b6dd0ce0a6ede4edeac576a76b7f78d61b2e9fe620157d76f4469ed0a3173158f2f247e4f5b1883dcdf261e
6
+ metadata.gz: ea4885f7414a9e3bc3f7ed837cca2af50e7965dba65d431ad9c605eebcdf4fe05c05e56f3748af604a80d4763d9eef53179f2b281391ad7fb7ae7d0a9b8675cf
7
+ data.tar.gz: 8215f8beba3f4f679e0d57fbcb5c9d97b5739e5c7b649e234c9cf5038e8664b472c789e353be26732787315c719e47f34dc10a526fa403e9f78a674879e52be8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snoop (0.9.0)
4
+ snoop (0.9.1)
5
5
  httparty
6
6
  nokogiri
7
7
 
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::Http.new(
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::Http.new(
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::Http.new(
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::Http.new(
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::Http.new(url: 'http://jruby.org')
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::Http.new(url: 'http://jruby.org')
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::Http.new(
140
+ snoop = Snoop::HttpNotifier.new(
141
141
  url: 'https://twitter.com/chrishunt',
142
142
  css: '[data-element-term="follower_stats"]'
143
143
  )
@@ -2,7 +2,7 @@ require 'httparty'
2
2
  require 'nokogiri'
3
3
 
4
4
  module Snoop
5
- class Http < Notifier
5
+ class HttpNotifier < Notifier
6
6
  UrlRequiredException = Class.new(StandardError)
7
7
 
8
8
  DEFAULT_INIT_OPTIONS = {
data/lib/snoop/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Snoop
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
data/lib/snoop.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  require 'snoop/version'
2
2
  require 'snoop/notifier'
3
- require 'snoop/http'
3
+ require 'snoop/http_notifier'
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
  require 'support/http_server'
3
3
  require 'snoop'
4
4
 
5
- describe Snoop::Http do
5
+ describe Snoop::HttpNotifier do
6
6
  with_http_server do |url|
7
7
  it 'notifies when content has changed' do
8
8
  snoop = described_class.new(url: "#{url}/dynamic-content")
@@ -1,8 +1,8 @@
1
1
  require 'spec_helper'
2
2
  require 'snoop/notifier'
3
- require 'snoop/http'
3
+ require 'snoop/http_notifier'
4
4
 
5
- describe Snoop::Http do
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::Http::UrlRequiredException
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.0
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/http.rb
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/http_spec.rb
144
+ - spec/acceptance/http_notifier_spec.rb
145
145
  - spec/spec_helper.rb
146
146
  - spec/support/http_server.rb
147
- - spec/unit/http_spec.rb
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/http_spec.rb
174
+ - spec/acceptance/http_notifier_spec.rb
175
175
  - spec/spec_helper.rb
176
176
  - spec/support/http_server.rb
177
- - spec/unit/http_spec.rb
177
+ - spec/unit/http_notifier_spec.rb
178
178
  - spec/unit/notifier_spec.rb