dalli 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of dalli might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e59130640d863e72dcd5d332f744319e6420066326732b7dff6a9ccfe66fd7b
4
- data.tar.gz: 9ccd429326d6c4de6e8d8876619943206eb58cefdf78863e4e16e5fe6ebfa86b
3
+ metadata.gz: 3fadd6651330b2d8455d781253451bd4e47d6caaaad9c12002284c6541727adb
4
+ data.tar.gz: ea65f2d7199c5dea247c2909ac90775240bd3da1ccfaebcebc916788a8b0ebf2
5
5
  SHA512:
6
- metadata.gz: 432e07fbfa6c1d7b5bd10c8c1c665eb9e2455da2eaf71dcd7917dab04d2454fbb756f0a64d599e71a8547fd4215de105f090fe5a79e5f69b3802d441d4b49698
7
- data.tar.gz: 7bf4a97dbc8ddbfd48aa2fdc82805438d665e335a6b43c50ae96ea55bc2a11b92cb6b65f203981f4c067b3dd67fdd5091a55df591b6e4b154bb4914950baa35a
6
+ metadata.gz: 368db20ef7ceb7a8301e8e027107ce90b238295f59aa8e1412f1e34a30a0e903ae56b6a07b2963eee0bc1a540fded0cacd3092a02f25ad1c17a21a05320baaf3
7
+ data.tar.gz: 32cc139bc122233910dddb62e1e3a6e1efec95e19d181dab04c8ced725806e238e1e6a62797cbbd8336e6e16b4a4a394c2f937bcaf8fffa63f66149d9f598e8c
data/History.md CHANGED
@@ -1,6 +1,13 @@
1
1
  Dalli Changelog
2
2
  =====================
3
3
 
4
+ 3.0.2
5
+ ==========
6
+
7
+ - Restore Windows compatibility (petergoldstein)
8
+ - Add JRuby to CI and make requisite changes (petergoldstein)
9
+ - Clarify documentation for supported rubies (petergoldstein)
10
+
4
11
  3.0.1
5
12
  ==========
6
13
 
@@ -11,18 +18,18 @@ Dalli Changelog
11
18
  ==========
12
19
  - BREAKING CHANGES:
13
20
 
14
- - Removes :dalli_store.
15
- Use Rails' official :mem_cache_store instead.
16
- https://guides.rubyonrails.org/caching_with_rails.html
17
- - Attempting to store a larger value than allowed by memcached used to
18
- print a warning and truncate the value. This now raises an error to
19
- prevent silent data corruption.
20
- - Compression now defaults to `true` for large values (greater than 4KB).
21
- This is intended to minimize errors due to the previous note.
22
- - Errors marshalling values now raise rather than just printing an error.
23
- - The Rack session adapter has been refactored to remove support for thread-unsafe
24
- configurations. You will need to include the `connection_pool` gem in
25
- your Gemfile to ensure session operations are thread-safe.
21
+ * Removes :dalli_store.
22
+ Use Rails' official :mem_cache_store instead.
23
+ https://guides.rubyonrails.org/caching_with_rails.html
24
+ * Attempting to store a larger value than allowed by memcached used to
25
+ print a warning and truncate the value. This now raises an error to
26
+ prevent silent data corruption.
27
+ * Compression now defaults to `true` for large values (greater than 4KB).
28
+ This is intended to minimize errors due to the previous note.
29
+ * Errors marshalling values now raise rather than just printing an error.
30
+ * The Rack session adapter has been refactored to remove support for thread-unsafe
31
+ configurations. You will need to include the `connection_pool` gem in
32
+ your Gemfile to ensure session operations are thread-safe.
26
33
 
27
34
  - Raise NetworkError when multi response gets into corrupt state (mervync, #783)
28
35
  - Validate servers argument (semaperepelitsa, petergoldstein, #776)
data/README.md CHANGED
@@ -12,11 +12,10 @@ Dalli's initial development was sponsored by [CouchBase](http://www.couchbase.co
12
12
  Supported Ruby versions and implementations
13
13
  ------------------------------------------------
14
14
 
15
- Dalli should work identically on:
15
+ As of Dalli version 3.0 the following Ruby versions are supported:
16
16
 
17
- * JRuby 1.6+
18
- * Ruby 1.9.3+
19
- * Rubinius 2.0
17
+ * Ruby 2.5.x, 2.6.x, 2.7.x, 3.0.x
18
+ * JRuby 9.2.x, 9.3.x
20
19
 
21
20
  If you have problems, please enter an issue.
22
21
 
@@ -24,7 +23,7 @@ If you have problems, please enter an issue.
24
23
  Installation and Usage
25
24
  ------------------------
26
25
 
27
- Remember, Dalli **requires** memcached 1.4+. You can check the version with `memcached -h`. Please note that the memcached version that *Mac OS X Snow Leopard* ships with is 1.2.8 and it won't work. Install memcached 1.4.x using Homebrew with
26
+ Remember, Dalli **requires** memcached 1.4+. You can check the version with `memcached -h`. Please note that the memcached version that *Mac OS X Snow Leopard* ships with is 1.2.8 and it won't work. Install the most recent version of memcached using Homebrew with
28
27
 
29
28
  brew install memcached
30
29
 
@@ -40,7 +39,7 @@ gem install dalli
40
39
 
41
40
  ```ruby
42
41
  require 'dalli'
43
- options = { :namespace => "app_v1", :compress => true }
42
+ options = { namespace: "app_v1", compress: true }
44
43
  dc = Dalli::Client.new('localhost:11211', options)
45
44
  dc.set('abc', 123)
46
45
  value = dc.get('abc')
@@ -52,10 +51,10 @@ require 'dalli'
52
51
  ssl_context = OpenSSL::SSL::SSLContext.new
53
52
  ssl_context.ca_file = "./myCA.pem"
54
53
  ssl_context.ssl_version = :SSLv23
55
- ssl_context.verify_hostname = true
54
+ ssl_context.verify_hostname = true if ssl_context.respond_to?(:verify_hostname=)
56
55
  ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER
57
56
 
58
- dc = Dalli::Client.new("memcached:11212", :ssl_context => ssl_context)
57
+ dc = Dalli::Client.new("memcached:11212", ssl_context: ssl_context)
59
58
  dc.set("abc", 123)
60
59
  value = dc.get("abc")
61
60
  ```
@@ -82,12 +81,10 @@ Dalli::Client accepts the following options. All times are in seconds.
82
81
  **serializer**: The serializer to use for objects being stored (ex. JSON).
83
82
  Default is Marshal.
84
83
 
85
- **compress**: Boolean, if true Dalli will gzip-compress values larger than 1K. Default is false.
84
+ **compress**: Boolean, if true Dalli will gzip-compress values larger than compression_min_size. Default is true.
86
85
 
87
86
  **compression_min_size**: Minimum value byte size for which to attempt compression. Default is 1K.
88
87
 
89
- **compression_max_size**: Maximum value byte size for which to attempt compression. Default is unlimited.
90
-
91
88
  **compressor**: The compressor to use for objects being stored.
92
89
  Default is zlib, implemented under `Dalli::Compressor`.
93
90
  If serving compressed data using nginx's HttpMemcachedModule, set `memcached_gzip_flag 2` and use `Dalli::GzipCompressor`
data/lib/dalli/socket.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'openssl'
4
+ require 'rbconfig'
4
5
 
5
6
  module Dalli
6
7
  module Socket
@@ -77,8 +78,16 @@ module Dalli
77
78
  end
78
79
  end
79
80
  end
81
+ end
80
82
 
81
- class UNIX < UNIXSocket
83
+ if RbConfig::CONFIG['host_os'] =~ /mingw|mswin/
84
+ class Dalli::Socket::UNIX
85
+ def initialize(*args)
86
+ raise Dalli::DalliError, 'Unix sockets are not supported on Windows platform.'
87
+ end
88
+ end
89
+ else
90
+ class Dalli::Socket::UNIX < UNIXSocket
82
91
  include Dalli::Socket::InstanceMethods
83
92
  attr_accessor :options, :server
84
93
 
data/lib/dalli/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dalli
4
- VERSION = "3.0.1"
4
+ VERSION = "3.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dalli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter M. Goldstein
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-10-14 00:00:00.000000000 Z
12
+ date: 2021-10-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack