Skip to content

Commit

Permalink
Version 2.0.3
Browse files Browse the repository at this point in the history
* Bump version to 2.0.3
* Update documentation for `:reverse => false` option
* Update license for 2012
* Added .rdb files to .gitignore
  • Loading branch information
David Czarnecki committed Feb 22, 2012
1 parent b62a000 commit 0caed3e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ doc
pkg pkg
Gemfile.lock Gemfile.lock
test/db/* test/db/*
*.rdb
4 changes: 4 additions & 0 deletions CHANGELOG.markdown
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG # CHANGELOG


## leaderboard 2.0.3 (2012-02-22)

* Added `:reverse => false` to `Leaderboard::DEFAULT_OPTIONS` to support leaderboards sorted from lowest to highest score instead of highest to lowest score. (Thanks @siuying)

## leaderboard 2.0.2 (2012-02-03) ## leaderboard 2.0.2 (2012-02-03)


* Fix for checking to see if a member actually exists in the leaderboard for the `around_me` calls * Fix for checking to see if a member actually exists in the leaderboard for the `around_me` calls
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011 David Czarnecki Copyright (c) 2011-2012 David Czarnecki


Permission is hereby granted, free of charge, to any person obtaining Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the a copy of this software and associated documentation files (the
Expand Down
13 changes: 12 additions & 1 deletion README.markdown
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ If you need to pass in options for Redis, you can do this in the initializer:
=> #<Leaderboard:0x00000103095200 @leaderboard_name="highscores", @page_size=25, @redis_connection=#<Redis client v2.2.2 connected to redis://localhost:6379/1 (Redis v2.2.5)>> => #<Leaderboard:0x00000103095200 @leaderboard_name="highscores", @page_size=25, @redis_connection=#<Redis client v2.2.2 connected to redis://localhost:6379/1 (Redis v2.2.5)>>
``` ```


The `Leaderboard::DEFAULT_OPTIONS` are as follows:

```ruby
DEFAULT_OPTIONS = {
:page_size => DEFAULT_PAGE_SIZE,
:reverse => false
}
```

You would use the option, `:reverse => true`, if you wanted a leaderboard sorted from lowest to highest score.

You can pass in an existing connection to Redis using :redis_connection in the Redis options hash: You can pass in an existing connection to Redis using :redis_connection in the Redis options hash:


```ruby ```ruby
Expand Down Expand Up @@ -240,5 +251,5 @@ The following ports have been made of the leaderboard gem.


## Copyright ## Copyright


Copyright (c) 2011 David Czarnecki. See LICENSE.txt for further details. Copyright (c) 2011-2012 David Czarnecki. See LICENSE.txt for further details.


2 changes: 1 addition & 1 deletion lib/leaderboard/version.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,3 +1,3 @@
class Leaderboard class Leaderboard
VERSION = '2.0.2'.freeze VERSION = '2.0.3'.freeze
end end
2 changes: 1 addition & 1 deletion test/test_leaderboard.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def teardown
end end


def test_version def test_version
assert_equal '2.0.2', Leaderboard::VERSION assert_equal '2.0.3', Leaderboard::VERSION
end end


def test_initialize_with_defaults def test_initialize_with_defaults
Expand Down
2 changes: 1 addition & 1 deletion test/test_rev_leaderboard.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def teardown
end end


def test_version def test_version
assert_equal '2.0.2', Leaderboard::VERSION assert_equal '2.0.3', Leaderboard::VERSION
end end


def test_initialize_with_defaults def test_initialize_with_defaults
Expand Down

0 comments on commit 0caed3e

Please sign in to comment.