smart_polling 0.0.1 → 0.0.2
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 +40 -0
- data/lib/smart_polling/version.rb +1 -1
- data/smart_polling.gemspec +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13d030532c95a22fea292dc26f2ce9bca268af3f
|
4
|
+
data.tar.gz: 089fc646bc0c4763b70f24481f770b3d3bb3a86f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9390b2f2bb12981600a67676ed519d4afe0373f00bd1a996c2b46ec983120a2a71deb2111fb99c42a975bec5fd3bce62e9ab76d1fce40d3f686173505472e615
|
7
|
+
data.tar.gz: 4ca56eaf7b541f467c2fd703e4b8e749441cc4a6ed46fb37429f51a29a5c190e95ee4063755c4e5020e9a9a51801514c82420d2d6396d6c70f4fa7c9cf8d257e
|
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# SmartPolling
|
2
|
+
|
3
|
+
SmartPolling is the smartest way to poll something. It keeps polling something, for a limited time, until it gets a response.
|
4
|
+
|
5
|
+
[](https://travis-ci.org/mateusdelbianco/smart_polling)
|
6
|
+
[](https://codeclimate.com/github/mateusdelbianco/smart_polling)
|
7
|
+
[](https://coveralls.io/r/mateusdelbianco/smart_polling?branch=master)
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
gem 'smart_polling'
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install smart_polling
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
It will call the external service until the response is "done":
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
SmartPolling.poll(seconds: 60, delay: 5) do
|
29
|
+
response = ExternalService.call
|
30
|
+
response == "done"
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
## Contributing
|
35
|
+
|
36
|
+
1. Fork it ( http://github.com/mateusdelbianco/smart_polling/fork )
|
37
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
38
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
39
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
40
|
+
5. Create new Pull Request
|
data/smart_polling.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = SmartPolling::VERSION
|
9
9
|
spec.authors = ["Mateus Del Bianco"]
|
10
10
|
spec.email = ["mateus@delbianco.net.br"]
|
11
|
-
spec.summary = %q{SmartPolling is
|
12
|
-
spec.description = %q{SmartPolling
|
11
|
+
spec.summary = %q{SmartPolling is the smartest way to poll something.}
|
12
|
+
spec.description = %q{SmartPolling keeps polling something, for a limited time, until it gets a response.}
|
13
13
|
spec.homepage = "https://github.com/mateusdelbianco/smart_polling"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smart_polling
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mateus Del Bianco
|
@@ -52,8 +52,8 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: SmartPolling
|
56
|
-
|
55
|
+
description: SmartPolling keeps polling something, for a limited time, until it gets
|
56
|
+
a response.
|
57
57
|
email:
|
58
58
|
- mateus@delbianco.net.br
|
59
59
|
executables: []
|
@@ -67,6 +67,7 @@ files:
|
|
67
67
|
- ".travis.yml"
|
68
68
|
- Gemfile
|
69
69
|
- LICENSE.txt
|
70
|
+
- README.md
|
70
71
|
- Rakefile
|
71
72
|
- lib/smart_polling.rb
|
72
73
|
- lib/smart_polling/version.rb
|
@@ -96,7 +97,7 @@ rubyforge_project:
|
|
96
97
|
rubygems_version: 2.4.8
|
97
98
|
signing_key:
|
98
99
|
specification_version: 4
|
99
|
-
summary: SmartPolling is
|
100
|
+
summary: SmartPolling is the smartest way to poll something.
|
100
101
|
test_files:
|
101
102
|
- spec/smart_polling_spec.rb
|
102
103
|
- spec/spec_helper.rb
|