Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renamed tests folder.

  • Loading branch information...
commit af47b3e4911e773fdf890ee211d22083f49cfa04 1 parent 028ad23
@carlo authored
View
12 README.markdown
@@ -1,6 +1,6 @@
# Kernel#retryable
-## Description
+### Description
Runs a code block, and retries it when an exception occurs. It's great when
working with flakey webservices (for example).
@@ -12,7 +12,7 @@ Should the number of retries be reached without success, the last exception
will be raised.
-## Examples
+### Examples
Open an URL, retry up to two times when an `OpenURI::HTTPError` occurs.
@@ -28,24 +28,24 @@ Do _something_, retry up to four times for either `ArgumentError` or
end
-## Defaults
+### Defaults
:tries => 1, :on => Exception
-## Installation
+### Installation
First, [make sure GitHub is a gem source](http://gems.github.com/). Then, install the gem:
sudo gem install carlo-retryable
-## Todo
+### Todo
* Unit tests
-## Thanks
+### Thanks
Many thanks to [Chu Yeow for this nifty piece of code](http://blog.codefront.net/2008/01/14/retrying-code-blocks-in-ruby-on-exceptions-whatever/). Look, I liked it
enough to enhance it a little bit and build a gem from it! :)
View
25 Rakefile
@@ -1,25 +0,0 @@
-require 'rubygems'
-Gem::manage_gems
-require 'rake/gempackagetask'
-
-spec = Gem::Specification.new do |s|
- s.platform = Gem::Platform::RUBY
- s.name = "retryable"
- s.version = "1.0"
- s.author = "Carlo Zottmann, Chu Yeow"
- s.email = "carlo@zottmann.org"
- s.homepage = "http://github.com/carlo/retryable/tree/master"
- s.summary = "Kernel#retryable, allow for retrying of code blocks."
- s.files = FileList['lib/*.rb', 'tests/*'].to_a
- s.require_path = "lib"
- s.test_files = Dir.glob('tests/*.rb')
- s.has_rdoc = false
-end
-
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.need_tar = true
-end
-
-task :default => "pkg/#{spec.name}-#{spec.version}.gem" do
- puts "Generated latest version"
-end
View
4 retryable.gemspec
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
s.email = "carlo@zottmann.org"
s.homepage = "http://github.com/carlo/retryable/tree/master"
s.summary = "Kernel#retryable, allow for retrying of code blocks."
- s.files = FileList['lib/*.rb', 'tests/*'].to_a
+ s.files = FileList['lib/*.rb', 'test/*'].to_a
s.require_path = "lib"
- s.test_files = Dir.glob('tests/*.rb')
+ s.test_files = Dir.glob('test/*.rb')
s.has_rdoc = false
end
View
1  test/tests.rb
@@ -0,0 +1 @@
+# nothing to see here yet, move along
View
0  tests/tests.rb
No changes.

0 comments on commit af47b3e

Please sign in to comment.
Something went wrong with that request. Please try again.