large_object_store 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f11e8dd54268874539335ca07d5a8cc1dfa2910e14bb81f6b1a506233727a4f
4
- data.tar.gz: b2b5f7bf4610df371b4ca424e8efa5cc0d0c632c28e83fb6c083a45ccbb83ec3
3
+ metadata.gz: 991a82771b528072842d95ba6acb4f5562e98099f6c4ae5b03b300be89767409
4
+ data.tar.gz: 8570533b7043c0f9f82adb4749d4ba8bc3712d49eb575eb5c437bcb1c7c70404
5
5
  SHA512:
6
- metadata.gz: 0e73adada15c374cef708d10ceb0829dca94c3251461735ef57ac2d707e7dd8b6eb1d6da1158d93510715b4763c63b4e679046e2313bff10a915bca4e8704475
7
- data.tar.gz: e3b09f3345f4d090cfa33a73909769aa649a46bd7c75409e58d9e722a5ff354630f3bab98b3e27c64a7002755d3ff5c6cf86598903f0f885f23110a4789f7922
6
+ metadata.gz: cac55dd99aa8c420ff29b79342ad42f7dbc856dfd34b6f2edad66031e9a7e52f586a05e6982e32d9e5da66b8a2205ae17d1b0b8295d3e3c4097b64ae3bf7d19b
7
+ data.tar.gz: db2e9422583defa902586a32bcaaa3e7a1e23cbfe9e40ed10c5314f13f57440652a116c3524056fa9ff1f51122cf14b15e576bf448b4a079e9ba51d123884cd4
data/Readme.md CHANGED
@@ -41,9 +41,25 @@ zstd decompression is used when the zstd magic number is detected at the beginni
41
41
 
42
42
  Author
43
43
  ======
44
- [Ana Martinez](https://github.com/anamartinez)<br/>
45
- acemacu@gmail.com<br/>
46
- [Michael Grosser](https://github.com/grosser)<br/>
47
- michael@grosser.it<br/>
48
- License: MIT<br/>
44
+
45
+ [Ana Martinez](https://github.com/anamartinez)
46
+ acemacu@gmail.com
47
+ [Michael Grosser](https://github.com/grosser)
48
+ michael@grosser.it
49
+ License: MIT
49
50
  [![CI](https://github.com/anamartinez/large_object_store/actions/workflows/actions.yml/badge.svg)](https://github.com/anamartinez/large_object_store/actions/workflows/actions.yml)
51
+
52
+ ### Releasing a new version
53
+ A new version is published to RubyGems.org every time a change to `version.rb` is pushed to the `main` branch.
54
+ In short, follow these steps:
55
+ 1. Update `version.rb`,
56
+ 2. update version in all `Gemfile.lock` files,
57
+ 3. merge this change into `main`, and
58
+ 4. look at [the action](https://github.com/zendesk/large_object_store/actions/workflows/publish.yml) for output.
59
+
60
+ To create a pre-release from a non-main branch:
61
+ 1. change the version in `version.rb` to something like `1.2.0.pre.1` or `2.0.0.beta.2`,
62
+ 2. push this change to your branch,
63
+ 3. go to [Actions → “Publish to RubyGems.org” on GitHub](https://github.com/zendesk/large_object_store/actions/workflows/publish.yml),
64
+ 4. click the “Run workflow” button,
65
+ 5. pick your branch from a dropdown.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module LargeObjectStore
2
- VERSION = "1.8.0"
4
+ VERSION = "1.9.0"
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "large_object_store/version"
2
4
  require "zlib"
3
5
  require "zstd-ruby"
@@ -9,12 +11,12 @@ module LargeObjectStore
9
11
  CACHE_VERSION = 4
10
12
  MAX_OBJECT_SIZE = 1024**2
11
13
  ITEM_HEADER_SIZE = 100
12
- DEFAULT_COMPRESS_LIMIT = 16*1024
14
+ DEFAULT_COMPRESS_LIMIT = 16 * 1024
13
15
  NORMAL = 0
14
16
  COMPRESSED = 1
15
17
  RAW = 2
16
18
  FLAG_RADIX = 32 # we can store 32 different states
17
- ZSTD_MAGIC = "\x28\xB5\x2F\xFD".force_encoding('ASCII-8BIT')
19
+ ZSTD_MAGIC = (+"\x28\xB5\x2F\xFD").force_encoding("ASCII-8BIT")
18
20
  ZSTD_COMPRESS_LEVEL = 3 # Default level recommended by zstd authors
19
21
 
20
22
  def self.wrap(*args)
@@ -137,12 +139,12 @@ module LargeObjectStore
137
139
  value = compress(value, options)
138
140
  end
139
141
 
140
- value.prepend(flag.to_s(FLAG_RADIX))
142
+ "#{flag.to_s(FLAG_RADIX)}#{value}"
141
143
  end
142
144
 
143
145
  def compress(value, options)
144
146
  if options[:zstd]
145
- Zstd.compress(value, ZSTD_COMPRESS_LEVEL)
147
+ Zstd.compress(value, level: ZSTD_COMPRESS_LEVEL)
146
148
  else
147
149
  Zlib::Deflate.deflate(value)
148
150
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: large_object_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ana Martinez
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-05-29 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: zstd-ruby
@@ -16,15 +15,20 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 1.5.5
18
+ version: 1.5.6
19
+ - - ">="
20
+ - !ruby/object:Gem::Version
21
+ version: 1.5.6.2
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
23
25
  requirements:
24
26
  - - "~>"
25
27
  - !ruby/object:Gem::Version
26
- version: 1.5.5
27
- description:
28
+ version: 1.5.6
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ version: 1.5.6.2
28
32
  email: acemacu@gmail.com
29
33
  executables: []
30
34
  extensions: []
@@ -37,7 +41,6 @@ homepage: https://github.com/anamartinez/large_object_store
37
41
  licenses:
38
42
  - MIT
39
43
  metadata: {}
40
- post_install_message:
41
44
  rdoc_options: []
42
45
  require_paths:
43
46
  - lib
@@ -45,15 +48,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
45
48
  requirements:
46
49
  - - ">="
47
50
  - !ruby/object:Gem::Version
48
- version: '3.0'
51
+ version: '3.2'
49
52
  required_rubygems_version: !ruby/object:Gem::Requirement
50
53
  requirements:
51
54
  - - ">="
52
55
  - !ruby/object:Gem::Version
53
56
  version: '0'
54
57
  requirements: []
55
- rubygems_version: 3.5.9
56
- signing_key:
58
+ rubygems_version: 3.6.9
57
59
  specification_version: 4
58
60
  summary: Store large objects in memcache or others
59
61
  test_files: []