Commits on Jul 10, 2013
  1. @fredjean

    Merge pull request #7 from fredjean/master

    Brining changes into the main repo...
    fredjean committed Jul 9, 2013
Commits on Jan 28, 2013
  1. @betarelease

    adding development gems to gemfile marks them as dependencies - this …

    …breaks applications that have conflicts with these gems. Putting the development dependencies in a different group so that jeweler does not pick them up
    betarelease committed Jan 28, 2013
Commits on Jan 25, 2013
  1. @fredjean
  2. @fredjean

    Version bump to 1.7.1

    fredjean committed Jan 24, 2013
  3. @fredjean

    Getting a release of 1.7.1 ready.

    Minimal changes to get the gem to load without warnings and the specs to run using
    current versions of JRuby.
    fredjean committed Jan 24, 2013
Commits on Nov 4, 2010
  1. Fix for gemspec pointing at the wrong jar

    Jon Bettcher committed Nov 3, 2010
Commits on Sep 6, 2010
  1. @fredjean
  2. @fredjean
Commits on Jun 30, 2010
  1. @fredjean

    Re-indented the code.

    fredjean committed Jun 30, 2010
  2. @fredjean

    - Added support for selecting the hashing algorithm through :pool_has…

    …hing_algorithm
    
    - Memcache#incr and Memcache#decr used get that defaults to marshaling. This should not happen. Code now calls the Java clients incr() and decr().
    Wouter de Bie committed with fredjean Jun 15, 2010
  3. @fredjean
Commits on Jun 16, 2010
  1. @fredjean
Commits on Jun 15, 2010
  1. @fredjean

    Moved logger up, so that initializations can be debugged

    Wouter de Bie committed with fredjean Jun 15, 2010
Commits on Jan 21, 2010
  1. @fredjean
  2. @fredjean
  3. @fredjean
  4. @fredjean
  5. @fredjean

    Updating how the IO pool is initialized.

    Fixing a few spec errors.
    fredjean committed Jan 21, 2010
  6. @ttilley @fredjean
  7. @brynary @fredjean
Commits on Nov 23, 2009
  1. Fixing the Rakefile Jeweler related tasks.

    Frederic Jean committed Nov 22, 2009
  2. Regenerated gemspec for version 1.6.1

    Frederic Jean committed Nov 22, 2009
  3. Version bump to 1.6.1

    Frederic Jean committed Nov 22, 2009
  4. Version bump to 1.6.1

    Frederic Jean committed Nov 22, 2009
  5. @fredjean
  6. @fredjean

    Base64 encode/decode strings Marshaled strings

    There is a nasty bug I tripped over because Marshal, contrary to popular
    belief, does not emit only printable characters. In fact, some of the
    sequences it emits are *totally invalid as UTF-8* (UTF-8 does not
    magically take care of converting a stream of bytes).
    
    This is essentially what the code *was* doing:
    
    >> marshal_str = Marshal.dump(:foo => 900)
    => "\004\b{\006:\bfooi\002\204\003"
    >> marshal_bytes = marshal_str.to_java_bytes
    => #<#<Class:01x525dc268>:0x9866417>
    >> java_str = java.lang.String.new(marshal_bytes, 'UTF-8')
    => #<Java::JavaLang::String:0x74d175ff>
    >> unpacked_marshal_str = String.from_java_bytes(java_str.getBytes('UTF-8'))
    => "\004\b{\006:\bfooi\002\357\277\275\003"
    >> marshal_str == unpacked_marshal_str
    => false
    >> Marshal.load(unpacked_marshal_str)
    => {:foo=>49135}
    
    Version 1.5.1 of the library produces this exact result:
    
    >> gem 'ikai-jruby-memcache-client', '1.5.1'
    => true
    >> require 'memcache'
    => true
    >> mc = MemCache.new(%w[localhost:11211]); nil
    => nil
    >> mc.set('fargo', {:foo => 900})
    => true
    >> mc.get('fargo')
    => {:foo=>49135}
    
    Interestingly enough, on my Solaris system, using 64 bit java, going
    through the MemCachedClient corrupts the data even further, preventing
    marshal from loading it at all.
    
    If you take the intermediate step of Base64 encoding the marshalled
    string, thereby ensuring that all characters are printable, conversion
    to/from UTF-8 is much more likely to succeed:
    
    >> marshal_str = Marshal.dump(:foo => 900)
    => "\004\b{\006:\bfooi\002\204\003"
    >> b64_marshal_str = Base64.encode64(marshal_str)
    => "BAh7BjoIZm9vaQKEAw==\n"
    >> b64_marshal_bytes = b64_marshal_str.to_java_bytes
    => #<#<Class:01x525dc268>:0x40930120>
    >> java_str = java.lang.String.new(b64_marshal_bytes, 'UTF-8')
    => #<Java::JavaLang::String:0x521d590d>
    >> unpacked_b64_marshal_str = String.from_java_bytes(java_str.getBytes('UTF-8'))
    => "BAh7BjoIZm9vaQKEAw==\n"
    >> unb64_marshal_str = Base64.decode64(unpacked_b64_marshal_str)
    => "\004\b{\006:\bfooi\002\204\003"
    >> Marshal.load(unb64_marshal_str)
    => {:foo=>900}
    
    And this is how the client now behaves:
    
    >> mc = MemCache.new(%w[localhost:11211]); nil
    => nil
    >> mc.set('fargo', {:foo => 900})
    => true
    >> mc.get('fargo')
    => {:foo=>900}
    slyphon committed with fredjean Nov 19, 2009
Commits on Nov 15, 2009
  1. Added jruby -S to the start of the command to install the gem since i…

    …t is only useful under JRuby.
    Frederic Jean committed Nov 15, 2009
  2. Updated README to point to the gemcutter.org gem instead of the githu…

    …b location.
    Frederic Jean committed Nov 15, 2009
Commits on Oct 5, 2009
  1. Ok.. So delete does take 2 params after all...

    Frederic Jean committed Oct 4, 2009
  2. Forgot version file.

    Frederic Jean committed Oct 4, 2009
  3. Modified the servers method so it attaches whether the server connect…

    …ion is alive to each of the strings representing a server. This will allow the client to work with Rails 2.3.x MemCacheStore session store class.
    Frederic Jean committed Oct 4, 2009
Commits on Oct 4, 2009
  1. Bumping the version to 1.6.0.

    Getting the specs to work by requiring java when the library or the specs are loaded.
    Frederic Jean committed Oct 4, 2009
Commits on Aug 4, 2009