Permalink
Commits on Nov 8, 2013
  1. @yaauie
  2. @yaauie

    Provide support for Redis 2.8's SCAN family of commands

    SCAN, HSCAN, SSCAN, and ZSCAN have been implemented in the redis gem as:
    
     - scan(cursor, match: optional_glob_string, count: optional_integer)
     - hscan(key, cursor, match: optional_glob_string, count: optional_integer)
     - sscan(key, cursor, match: optional_glob_string, count: optional_integer)
     - zscan(key, cursor, match: optional_glob_string, count: optional_integer)
    
    Each has been implemented with a helper *_each method that either returns
    an enumerator or yields to the given block; support for both has been added.
    
     - scan_each(match: optional_glob_string, count: optional_integer, &optional_block)
     - hscan_each(key, match: optional_glob_string, count: optional_integer, &optional_block)
     - sscan_each(key, match: optional_glob_string, count: optional_integer, &optional_block)
     - zscan_each(key, match: optional_glob_string, count: optional_integer, &optional_block)
    
    Unfortunately, the tests will be skipped in Travis until a >= 2.7.105 version
    of the redis-server is installed.
    yaauie committed Nov 6, 2013
Commits on Nov 6, 2013
  1. @yaauie
Commits on Nov 3, 2013
  1. @yaauie
Commits on Oct 30, 2013
  1. @yaauie
  2. @yaauie
  3. @yaauie

    Merge branch 'issue-67/nested-namespace-vs-eval'

    Similar to 6d83951, in which the private method `exec` command
    was resolved instead of Redis::Namespace#method_missing, the private
    method `eval` is equally dangerous, especially in nested namespaces.
    
    HT to @rgraff for the report and patch.
    yaauie committed Oct 30, 2013
  4. @yaauie
  5. @yaauie

    remove stray puts in specs

    yaauie committed Oct 30, 2013
  6. @yaauie

    Merge branch 'version-constant'

    yaauie committed Oct 30, 2013
Commits on Oct 21, 2013
  1. @yaauie
Commits on Sep 29, 2013
  1. @rgraff
Commits on Aug 8, 2013
  1. @steveklabnik

    Merge pull request #66 from guitsaru/require-redis-3-0-4

    Upgrade redis dependency to 3.0.4.
    steveklabnik committed Aug 8, 2013
  2. @guitsaru

    Upgrade redis dependency to 3.0.4.

    Fixes #65
    guitsaru committed Aug 8, 2013
Commits on Aug 3, 2013
  1. @steveklabnik

    Don't proxy `#exec` through `#method_missing`. 😢

    Redis has an EXEC command. We handle commands through `method_missing`.
    This works great, normally:
    
      r = Redis::Namespace.new("foo")
      r.exec # => error, not in a transaction, whatever
    
    Here's the problem: `Kernel#exec`. Since this is on every object, when
    you use `#send`, it skips the normal visibility, and calls the private
    but defined `Kernel#exec` rather than the `method_missing` verison:
    
      r = Redis::Namespace.new("foo")
      r.send(:exec, "ls") # => prints out your current directory
    
    We fix this by not proxying `exec` through `method_missing`.
    
    You are only vulnerable if you do the always-dangerous 'send random
    input to an object through `send`.' And you probably don't. A cursory
    search through GitHub didn't find anything that looked vulnerable.
    
    However, if you write code that wraps or proxies Redis in some way, you
    may do something like this.
    
    The official Redis gem does not use `method_missing`, so it should not
    have any issues:
    https://github.com/redis/redis-rb/blob/master/lib/redis.rb#L2133-L2147
    
    I plan on removing the `method_missing` implementation in a further
    patch, but since this is an immediate issue, I wanted to make minimal
    changes.
    
    Testing this is hard, `#exec` replaces the current running process. I
    have verified this fix by hand, but writing an automated test seems
    difficult.
    
    ❤️ 😢
    steveklabnik committed Aug 3, 2013
Commits on Jul 2, 2013
  1. @steveklabnik

    Merge pull request #62 from j-wilkins/multi_fix

    don't try to remove namespace from a redis future
    steveklabnik committed Jul 2, 2013
Commits on Jul 1, 2013
  1. don't try to remove namespace from a redis future

    j-wilkins committed Jul 1, 2013
Commits on Jun 25, 2013
  1. @steveklabnik

    Merge pull request #61 from madebymany/multi-without-block

    multi calls can now be made without a block.
    steveklabnik committed Jun 25, 2013
Commits on Jun 24, 2013
  1. @dwb

    multi calls can now be made without a block.

    In the redis gem, a multi call made without a block simply calls the
    command directly, leaving you to call exec yourself. This is now allowed
    through Namespace.
    dwb committed Jun 24, 2013
Commits on Jun 17, 2013
  1. @steveklabnik

    Merge pull request #58 from iliabylich/missing-commands

    Add ECHO, EXEC, STRLEN commands.
    steveklabnik committed Jun 17, 2013
Commits on Jun 9, 2013
  1. @iliabylich
Commits on May 3, 2013
  1. @steveklabnik

    add pkg to the .gitignore

    steveklabnik committed May 3, 2013
  2. @steveklabnik

    bumping version to 1.3.0

    steveklabnik committed May 3, 2013
  3. @steveklabnik
  4. @steveklabnik

    Fix homepage link

    steveklabnik committed May 3, 2013
  5. @steveklabnik

    Adding myself to authors.

    steveklabnik committed May 3, 2013
Commits on May 1, 2013
  1. @steveklabnik

    Merge pull request #55 from simplymeasured/mapped_msetnx

    add namespace support to mapped_msetnx commands
    steveklabnik committed May 1, 2013
  2. @steveklabnik

    Merge pull request #52 from j-wilkins/mapped_mset

    add namespace to mapped_mset calls
    
    Conflicts:
    	spec/redis_spec.rb
    
    Yay more eq stuff!
    steveklabnik committed May 1, 2013
  3. @steveklabnik

    make temporary namespace threadsafe

    j-wilkins committed with steveklabnik Feb 19, 2013
  4. @steveklabnik

    Merge pull request #49 from bitterb/add-warning-for-missing-commands

    Add warning against unknown commands
    steveklabnik committed May 1, 2013
  5. @steveklabnik

    Merge pull request #54 from kyanny/bundler-gemtasks

    Add `bundler/gem_tasks` tasks for easy building/releasing gem
    steveklabnik committed May 1, 2013
  6. @steveklabnik

    Merge pull request #51 from strzalek/remove_warnings

    Remove warnings
    steveklabnik committed May 1, 2013
Commits on Apr 12, 2013
  1. @steveklabnik

    Merge pull request #57 from tundal45/master

    Remove warning about ambiguous first argument
    steveklabnik committed Apr 12, 2013
  2. @tundal45
Commits on Apr 10, 2013
  1. @yaauie