Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

add gzip compressor #303

Merged
merged 1 commit into from Dec 11, 2012

Conversation

Projects
None yet
2 participants
Contributor

tkellen commented Dec 10, 2012

added for ease-of-use with nginx serving gzipped data directly from memcached

Collaborator

mperham commented Dec 10, 2012

Tests?

Contributor

tkellen commented Dec 10, 2012

Added. I believe the test is set up correctly, can you confirm?

@mperham mperham commented on the diff Dec 11, 2012

test/test_compressor.rb
@@ -34,3 +34,15 @@ def self.decompress(data)
end
end
end
+
+describe 'GzipCompressor' do
+
+ should 'compress and uncompress data using Zlib::GzipWriter/Reader' do
+ memcached(19127,nil,{:compress=>true,:compressor=>Dalli::GzipCompressor}) do |dc|
@mperham

mperham Dec 11, 2012

Collaborator

Change :compressor to :compessor and watch the spec still pass. You need to set some expectations to verify your methods are being called.

Contributor

tkellen commented Dec 11, 2012

Roger that, please see the test now.

Collaborator

mperham commented Dec 11, 2012

Did you forget to push? There's no new commit.

Contributor

tkellen commented Dec 11, 2012

To be more precise, I force pushed over my existing branch to update the PR.

@mperham mperham added a commit that referenced this pull request Dec 11, 2012

@mperham mperham Merge pull request #303 from tkellen/gzipcompressor
add gzip compressor
4252f98

@mperham mperham merged commit 4252f98 into petergoldstein:master Dec 11, 2012

1 check passed

default The Travis build passed
Details
Collaborator

mperham commented Dec 11, 2012

Got it, thank you!

Collaborator

mperham commented Dec 11, 2012

Oh, if you want to update the changelog with a note about nginx / gzip compatibility, I bet some people would find that useful.

Contributor

tkellen commented Dec 11, 2012

Roger that, coming up.

Contributor

tkellen commented Dec 11, 2012

Do you want it listed in History.md under 2.6.0?

Collaborator

mperham commented Dec 11, 2012

That would be fine.

Contributor

tkellen commented Dec 11, 2012

Not sure why, but the PR button isn't showing up for this, feel free to grab it manually!
https://github.com/tkellen/dalli/tree/docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment