Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Version 2.0.3

* Bump version to 2.0.3
* Update documentation for `:reverse => false` option
* Update license for 2012
* Added .rdb files to .gitignore
  • Loading branch information...
commit 0caed3e3a4aa0d5e70016bc294b66ea31cde3bc5 1 parent b62a000
David Czarnecki czarneckid authored
1  .gitignore
@@ -7,3 +7,4 @@ doc
7 7 pkg
8 8 Gemfile.lock
9 9 test/db/*
  10 +*.rdb
4 CHANGELOG.markdown
Source Rendered
... ... @@ -1,5 +1,9 @@
1 1 # CHANGELOG
2 2
  3 +## leaderboard 2.0.3 (2012-02-22)
  4 +
  5 + * Added `:reverse => false` to `Leaderboard::DEFAULT_OPTIONS` to support leaderboards sorted from lowest to highest score instead of highest to lowest score. (Thanks @siuying)
  6 +
3 7 ## leaderboard 2.0.2 (2012-02-03)
4 8
5 9 * Fix for checking to see if a member actually exists in the leaderboard for the `around_me` calls
2  LICENSE.txt
... ... @@ -1,4 +1,4 @@
1   -Copyright (c) 2011 David Czarnecki
  1 +Copyright (c) 2011-2012 David Czarnecki
2 2
3 3 Permission is hereby granted, free of charge, to any person obtaining
4 4 a copy of this software and associated documentation files (the
13 README.markdown
Source Rendered
@@ -37,6 +37,17 @@ If you need to pass in options for Redis, you can do this in the initializer:
37 37 => #<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)>>
38 38 ```
39 39
  40 +The `Leaderboard::DEFAULT_OPTIONS` are as follows:
  41 +
  42 +```ruby
  43 +DEFAULT_OPTIONS = {
  44 + :page_size => DEFAULT_PAGE_SIZE,
  45 + :reverse => false
  46 +}
  47 +```
  48 +
  49 +You would use the option, `:reverse => true`, if you wanted a leaderboard sorted from lowest to highest score.
  50 +
40 51 You can pass in an existing connection to Redis using :redis_connection in the Redis options hash:
41 52
42 53 ```ruby
@@ -240,5 +251,5 @@ The following ports have been made of the leaderboard gem.
240 251
241 252 ## Copyright
242 253
243   -Copyright (c) 2011 David Czarnecki. See LICENSE.txt for further details.
  254 +Copyright (c) 2011-2012 David Czarnecki. See LICENSE.txt for further details.
244 255
2  lib/leaderboard/version.rb
... ... @@ -1,3 +1,3 @@
1 1 class Leaderboard
2   - VERSION = '2.0.2'.freeze
  2 + VERSION = '2.0.3'.freeze
3 3 end
2  test/test_leaderboard.rb
@@ -13,7 +13,7 @@ def teardown
13 13 end
14 14
15 15 def test_version
16   - assert_equal '2.0.2', Leaderboard::VERSION
  16 + assert_equal '2.0.3', Leaderboard::VERSION
17 17 end
18 18
19 19 def test_initialize_with_defaults
2  test/test_rev_leaderboard.rb
@@ -13,7 +13,7 @@ def teardown
13 13 end
14 14
15 15 def test_version
16   - assert_equal '2.0.2', Leaderboard::VERSION
  16 + assert_equal '2.0.3', Leaderboard::VERSION
17 17 end
18 18
19 19 def test_initialize_with_defaults

0 comments on commit 0caed3e

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