Skip to content

Commit

Permalink
first draft of readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tulios committed Mar 17, 2012
1 parent cca7500 commit f6ab061
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 27 deletions.
52 changes: 52 additions & 0 deletions README.md
@@ -0,0 +1,52 @@
## StaleIfSlow
[![Build Status](https://secure.travis-ci.org/tulios/stale_if_slow.png)](http://travis-ci.org/tulios/stale_if_slow)

Is a quality assurance tool for methods that access external services or have slow operations that could rely on stale cache in case of problem.

## How it works

TODO

## Getting started

TODO

### With Rails

TODO

## Examples

```ruby
class Example1
include StaleIfSlow::API
stale_if_slow :save
stale_if_slow find: lambda {"key"}
stale_if_slow find_all: ::Generator

def save arg; end
def find arg=nil; end
def find_all; end
end
```

```ruby
class Example2
include StaleIfSlow::API
stale_if_slow :save, :save, :save, :save
end
```

```ruby
class Example3
include StaleIfSlow::API
stale_if_slow find_one: { timeout: 0.1, content_timeout: 30.seconds, stale_content_timeout: 5.minutes }
stale_if_slow find_two: { timeout: 0.1, key: ::Generator }
def find_one; end
def find_two; end
end
```

## License

MIT License. Copyright 2012 Túlio Ornelas
23 changes: 0 additions & 23 deletions README.rdoc

This file was deleted.

7 changes: 3 additions & 4 deletions stale_if_slow.gemspec
Expand Up @@ -7,9 +7,9 @@ Gem::Specification.new do |s|
s.version = StaleIfSlow::VERSION
s.authors = ["tulios"]
s.email = ["ornelas.tulio@gmail.com"]
s.homepage = ""
s.summary = %q{TODO: Write a gem summary}
s.description = %q{TODO: Write a gem description}
s.homepage = "https://github.com/tulios/stale_if_slow"
s.summary = %q{Is a quality assurance tool for methods that access external services or have slow operations that could rely on stale cache in case of problem}
s.description = %q{Is a quality assurance tool for methods that access external services or have slow operations that could rely on stale cache in case of problem}

s.required_ruby_version = ">= 1.9.2"
s.rubyforge_project = "stale_if_slow"
Expand All @@ -18,7 +18,6 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]


s.add_development_dependency "rspec", "~> 2.8.0"
s.add_development_dependency "ruby-debug19"
Expand Down

0 comments on commit f6ab061

Please sign in to comment.