Skip to content

Commit

Permalink
Updated docs, added coverage check
Browse files Browse the repository at this point in the history
  • Loading branch information
dim committed May 13, 2013
1 parent 28b76f5 commit c49ea66
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*.gem
.yardoc/
coverage/
doc/
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
language: ruby

script: rake coverage
rvm:
- 1.9.3
- 2.0.0

gemfile:
- Gemfile
6 changes: 5 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
source "http://rubygems.org"
gemspec
gemspec

gem 'coveralls', require: false, group: :test
gem 'json', '>= 1.7.7', require: false, group: :test

21 changes: 21 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,21 @@ PATH
GEM
remote: http://rubygems.org/
specs:
colorize (0.5.8)
coveralls (0.6.7)
colorize
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
thor
diff-lcs (1.2.1)
json (1.7.7)
mime-types (1.23)
multi_json (1.7.3)
rake (10.0.3)
redcarpet (2.2.2)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
Expand All @@ -16,14 +29,22 @@ GEM
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.0)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
thor (0.18.1)
yard (0.8.5.2)

PLATFORMS
ruby

DEPENDENCIES
bundler
coveralls
json (>= 1.7.7)
rake
redcarpet
rspec
timed_lru!
yard
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Timed LRU
=========

[![Build Status](https://secure.travis-ci.org/bsm/timed_lru.png)](http://travis-ci.org/bsm/timed_lru)
[![Dependency Status](https://gemnasium.com/bsm/timed_lru.png)](https://gemnasium.com/bsm/timed_lru)
[![Coverage Status](https://coveralls.io/repos/bsm/timed_lru/badge.png)](https://coveralls.io/r/bsm/timed_lru)

My implementation of a simple, thread-safe LRU with (optional) TTLs
and constant time operations. There are many LRUs for Ruby available but
I was unable to find one that matches all three requirements.
Expand Down
6 changes: 4 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
require 'rake'
require 'bundler/setup'

require 'rspec/mocks/version'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:coverage) do |c|
c.ruby_opts = '-r ./spec/coverage_helper'
end

require 'yard'
YARD::Rake::YardocTask.new
Expand Down
5 changes: 5 additions & 0 deletions spec/coverage_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
require 'coveralls'

# Enable coverage
Coveralls.wear!

1 change: 1 addition & 0 deletions timed_lru.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ Gem::Specification.new do |s|
s.add_development_dependency "bundler"
s.add_development_dependency "rspec"
s.add_development_dependency "yard"
s.add_development_dependency "redcarpet"
end

0 comments on commit c49ea66

Please sign in to comment.