Closed eliasbaixas closed 12 years ago
Sorry dude, but I am not changing the name of the GEM.
I am sorry, I'm still not very used to this pull-request thing... maybe if I send you the patch you would want to take a look at it ?
the patch without the changes in version or Rackfile.
its just this:
diff --git a/lib/cash/adapter/memcache_client.rb b/lib/cash/adapter/memcache_client.rb index 5003c0c..0dc04a7 100644 --- a/lib/cash/adapter/memcache_client.rb +++ b/lib/cash/adapter/memcache_client.rb @@ -10,11 +10,11 @@ module Cash end
def add(key, value, ttl=nil, raw=false)
@repository.add(key, value, ttl || @default_ttl, raw)
end
def set(key, value, ttl=nil, raw=false)
@repository.set(key, value, ttl || @default_ttl, raw)
end
def exception_classes @@ -33,4 +33,4 @@ module Cash
end end -end \ No newline at end of file +end
and then
diff --git a/lib/cash/query/abstract.rb b/lib/cash/query/abstract.rb index bcba8fb..5730452 100644 --- a/lib/cash/query/abstract.rb +++ b/lib/cash/query/abstract.rb @@ -211,7 +211,14 @@ module Cash order_sql = @options1[:order] || @options2[:order] options[:order] = order_sql if order_sql results = find_from_ids_without_cache(missing_ids, options)
@eliasbaixas the general deal with pull requests is to 1) create a feature branch for your change and 2) never touch the gemspec or any version information.
Make it painless for the maintainer to pull your change. Otherwise, while good intentioned and trying to be helpful, you end up creating work.
I made your changes to the files and pushed them up. I also published the new GEM.
a default value for ttl parameter was not being correctly provided in method memcache_client#add
def add(key, value, ttl=nil, raw=false) @repository.add(key, value || @default_ttl, ttl, raw)
recall that instead of doing || @default_ttl next to ttl, its done in value.
This caused an exception in memcache-client because not providing the TTL is a memcached network protocol error and memcaded returns ERROR.
thanks for this great work !!
Elias