lens 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9832b9e9d921f59bf9a46776e523c6d020f572a6
4
- data.tar.gz: e328be7d6b3763760d75a510d128010b2e941a34
3
+ metadata.gz: f53e7ccbbdcf3542df1c431b9b2828a0b0cddf0f
4
+ data.tar.gz: 4db30bce59f39de4ec90c001a1fd5d2daa440600
5
5
  SHA512:
6
- metadata.gz: 5f8df18f130382daa10fa8e5abbe20f3d456ad8cb67fbfe2caffff1a8a9dbb597ae07a5f816ed447df840257e886c9ee846a16ac15d44841e02eb6a5f141cd54
7
- data.tar.gz: 1accd8c65979e589951b7d4de4f1f1c3c5b9086dec8ef4d1c58173248e2388a9ce1cb94b4f7efb1006e3d0a18ab6e58d96e97ef2d43c9965f27a650198149d66
6
+ metadata.gz: 3d976fb595a8841b07e831ec104f6996e6a2bba697e8c5eb35f776b2b4df0f6519110235313d6283a4c8496e16a37509f45b8f2868c853505043b21a97d233ad
7
+ data.tar.gz: 16e632fe26c3bff34d85bb0bfd03722e1e4a38c8aef76e931fef8a4ea6ef48d2cf2054ffd9894cbe06e712caeecf5b2769fc38a0a1b648a1077562062666c1b7
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ *.gem
1
2
  *.swp
2
3
  *.swo
3
4
  coverage
data/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  Add to your Gemfile
10
10
 
11
11
  ```ruby
12
- gem 'lens'
12
+ gem 'lens', '~> 0.0.7'
13
13
  ```
14
14
 
15
15
  or, if you want bleeding edge,
data/lens.gemspec CHANGED
@@ -17,6 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ['lib']
19
19
 
20
+ spec.add_runtime_dependency 'lz4-ruby'
21
+
20
22
  spec.add_development_dependency 'bundler', '~> 1.6'
21
23
  spec.add_development_dependency 'rails', '>= 3.0'
22
24
  spec.add_development_dependency 'rake', '~> 0'
@@ -1,3 +1,5 @@
1
+ require 'lz4-ruby'
2
+
1
3
  module Lens
2
4
  module Compression
3
5
  module Gzip
@@ -9,5 +11,25 @@ module Lens
9
11
  { 'Content-Type' => 'gzip/json' }
10
12
  end
11
13
  end
14
+
15
+ module LZ4
16
+ def self.compress(data)
17
+ ::LZ4::compress(data)
18
+ end
19
+
20
+ def self.headers
21
+ { 'Content-Type' => 'lz4/json' }
22
+ end
23
+ end
24
+
25
+ module LZ4HC
26
+ def self.compress(data)
27
+ ::LZ4::compressHC(data)
28
+ end
29
+
30
+ def self.headers
31
+ { 'Content-Type' => 'lz4hc/json' }
32
+ end
33
+ end
12
34
  end
13
35
  end
@@ -33,7 +33,7 @@ module Lens
33
33
  end
34
34
 
35
35
  def default_compressor
36
- Compression::Gzip
36
+ Compression::LZ4
37
37
  end
38
38
  end
39
39
  end
data/lib/lens/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lens
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -26,7 +26,7 @@ describe Lens do
26
26
  subject { described_class.configuration.compressor }
27
27
 
28
28
  it { is_expected.to respond_to :compress }
29
- it { is_expected.to be Lens::Compression::Gzip }
29
+ it { is_expected.to be Lens::Compression::LZ4 }
30
30
  end
31
31
 
32
32
  describe 'configuration' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lens
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - kgorin
@@ -10,8 +10,22 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-11-10 00:00:00.000000000 Z
13
+ date: 2015-11-19 00:00:00.000000000 Z
14
14
  dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: lz4-ruby
17
+ requirement: !ruby/object:Gem::Requirement
18
+ requirements:
19
+ - - '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - '>='
27
+ - !ruby/object:Gem::Version
28
+ version: '0'
15
29
  - !ruby/object:Gem::Dependency
16
30
  name: bundler
17
31
  requirement: !ruby/object:Gem::Requirement