rails-brotli-cache 0.3.8 → 0.3.9

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
  SHA256:
3
- metadata.gz: 3bb8214df1fb2d155f5ae121938b65e447206dba8480066ce6fe0ae3224a18f5
4
- data.tar.gz: 9831643f175b1e5b7d8904ca696302640bd7fc5f3216f93575795ee4192d1fd1
3
+ metadata.gz: 4d2d42ab4cc77a7965e7d04b70b07a672b657d9b4b54be4814f8716595254d8e
4
+ data.tar.gz: f81c51e38be663e108538b138fecc80ed726fa701f00e98b658ec028a49528ba
5
5
  SHA512:
6
- metadata.gz: 0c8297ac281da41e9923721bc24984aa5f795eede3748ee93aa4a47c2d614dfbfe5641255217b010d126852723c69858f27b58f985125fd1b024472641ac46ff
7
- data.tar.gz: 7ad44d4c2c4f1a9411d13fa44d11cbea56b262328e1a62b72f6b14ad8d397f6a53cc09542d5b918d80b504bcd4df6f27c08cec8ae4467a26ab494f1644ab1159
6
+ metadata.gz: cd18abde6498cd2fd982deb14eac6150c6cddbad7ec418a24fe5bf8dca78458354b5b5419f572311652369ff0f1c20e9d398c7b340195e48028ef6f3ce39a517
7
+ data.tar.gz: a5b278df40d8afd4f48e0bf3f1e2c0487b2b3e66e75ecb2c6c937aac483426ea3309081cce6af946e94a88dd984160b5b91ee318129d8b1c92b3a3e41a33d29f
@@ -171,7 +171,7 @@ module RailsBrotliCache
171
171
  end
172
172
 
173
173
  def source_cache_key(name)
174
- name.remove(@prefix)
174
+ name.delete_prefix(@prefix.to_s)
175
175
  end
176
176
 
177
177
  class BrotliCompressor
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsBrotliCache
4
- VERSION = "0.3.8"
4
+ VERSION = "0.3.9"
5
5
  end
@@ -62,38 +62,38 @@ describe RailsBrotliCache do
62
62
  end
63
63
 
64
64
  it "for #write_multi and #read_multi" do
65
- values = {
66
- "key_1" => "val_1",
67
- "key_2" => "val_2"
68
- }
65
+ values = {
66
+ "key_1" => "val_1",
67
+ "key_2" => "val_2"
68
+ }
69
69
 
70
- brotli_store.write_multi(values)
71
- standard_cache.write_multi(values)
70
+ brotli_store.write_multi(values)
71
+ standard_cache.write_multi(values)
72
72
 
73
- expect(brotli_store.read("key_1")).to eq standard_cache.read("key_1")
74
- expect(brotli_store.read("key_2")).to eq standard_cache.read("key_2")
73
+ expect(brotli_store.read("key_1")).to eq standard_cache.read("key_1")
74
+ expect(brotli_store.read("key_2")).to eq standard_cache.read("key_2")
75
75
 
76
- expect(brotli_store.read_multi("key_1", "key_2")).to eq(standard_cache.read_multi("key_1", "key_2"))
76
+ expect(brotli_store.read_multi("key_1", "key_2")).to eq(standard_cache.read_multi("key_1", "key_2"))
77
77
  end
78
78
 
79
79
  it "for #fetch_multi" do
80
- values = {
81
- "key_1" => "val_1",
82
- "key_2" => "val_2"
83
- }
80
+ values = {
81
+ "key_1" => "val_1",
82
+ "key_2" => "val_2"
83
+ }
84
84
 
85
- brotli_store.fetch_multi("key_1", "key_2") do |key|
86
- "val_#{key.split('_').last}"
87
- end
85
+ brotli_store.fetch_multi("key_1", "key_2") do |key|
86
+ "val_#{key.split('_').last}"
87
+ end
88
88
 
89
- standard_cache.fetch_multi("key_1", "key_2") do |key|
90
- "val_#{key.split('_').last}"
91
- end
89
+ standard_cache.fetch_multi("key_1", "key_2") do |key|
90
+ "val_#{key.split('_').last}"
91
+ end
92
92
 
93
- expect(brotli_store.read("key_1")).to eq standard_cache.read("key_1")
94
- expect(brotli_store.read("key_2")).to eq standard_cache.read("key_2")
93
+ expect(brotli_store.read("key_1")).to eq standard_cache.read("key_1")
94
+ expect(brotli_store.read("key_2")).to eq standard_cache.read("key_2")
95
95
 
96
- expect(brotli_store.read_multi("key_1", "key_2")).to eq(standard_cache.read_multi("key_1", "key_2"))
96
+ expect(brotli_store.read_multi("key_1", "key_2")).to eq(standard_cache.read_multi("key_1", "key_2"))
97
97
  end
98
98
  end
99
99
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-brotli-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb