wordmap 0.2.0 → 0.3.0

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: 1a93834b2b238fcd5ca8c11c828b72ccbe7bfa16c98f9629593dea4780b0480a
4
- data.tar.gz: 68b78491386a8691e3bad3b653d74dbeb8a21c42edce3f056fc9bb28e044ba19
3
+ metadata.gz: ced71b07912a404954c7bab9a29f604cf6acb976a95259c37b1de93a963ac7bc
4
+ data.tar.gz: 26b615b55c6ed54196ac9fb8967ac6d33aba54f7c1607e2e923c059c16fc3099
5
5
  SHA512:
6
- metadata.gz: 38567abd4ea0abc3db1bd390438efa6c8364bc94551ecb127350579eda73c21a071b540ab36bf135927963a57c92dd745dca97236bd4319f817bc53f51dd6873
7
- data.tar.gz: 9ca7c3a15e4a5201f0029746b76bab5441d017ace05bdcbc0caee7c7355672e5661efd61e67542db090f9f0653ec64e0b80dff2e8e0c5d626d5ab8dbdb99c5ea
6
+ metadata.gz: 0cf9d213226291a8b7c65cba9d253cfe289b03f47645088add2d2fd6d3048dd966c9f311e3357b1933dae3ba9691674ccef8d79bae77f2eb7869b16024979094
7
+ data.tar.gz: '0149b00b14fd57a13abe21e2edde18a9a6e577be977ed8e03568a0e40deccbd0211e7fffed35229a47ab45df1af307c5d8a4dddb5e4166920843345cce976f20'
@@ -9,16 +9,16 @@ on:
9
9
  jobs:
10
10
  test:
11
11
  runs-on: ubuntu-latest
12
+ name: Ruby ${{ matrix.ruby }}
12
13
  strategy:
13
14
  matrix:
14
- ruby: [ '2.5', '2.6', '2.7' ]
15
-
16
- name: Ruby ${{ matrix.ruby }}
15
+ ruby: [ '2.5', '2.6', '2.7', '3.0', '3.1', '3.2' ]
17
16
  steps:
18
- - uses: actions/checkout@v2
19
- - uses: actions/setup-ruby@v1
20
- with:
21
- ruby-version: ${{ matrix.ruby }}
22
- - run: gem install bundler
23
- - run: bundle install
24
- - run: bundle exec rake
17
+ - uses: actions/checkout@v3
18
+ - name: Set up Ruby
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: ${{ matrix.ruby }}
22
+ bundler-cache: true
23
+ - name: Run RSpec
24
+ run: bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.3.0 - 2023-08-03
6
+
7
+ * Add support for Ruby 3.x
8
+
5
9
  ## 0.2.0 - 2020-09-16
6
10
 
7
11
  * Make file access thread safe
data/LICENSE CHANGED
@@ -186,7 +186,7 @@
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [yyyy] [name of copyright owner]
189
+ Copyright 2023 Max Chernyak
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![RSpec](https://github.com/scottscheapflights/wordmap/workflows/RSpec/badge.svg)
1
+ ![RSpec](https://github.com/maxim/wordmap/workflows/RSpec/badge.svg)
2
2
 
3
3
  # Wordmap
4
4
 
@@ -130,7 +130,7 @@ fruits.each(:genus).to_a # => ["citrus", "musa"]
130
130
 
131
131
  ### Multi-dimensional keys
132
132
 
133
- In the above examples the keys are simply `'banana'` and `'lemon'` — strings. If you make your key an array of strings, that'd make a multi-dimensional key. This can come helpful for some data where 2 keys make sense (we have such use cases at Scott's). Internally, each dimension is a different vector. However if you go that route, keep in mind that all the "unused" key combinations will create gaps in the data file, therefore inflating its size. For example, if you make a key out of genus + name of a fruit, like `%w[citrus lemon]` and `%w[musa banana]`, your file will become inflated with empty cells created for keys `%w[citrus banana]` and `%w[musa lemon]`. That space is taken (padded with null bytes) even though there are no values for these keys.
133
+ In the above examples the keys are simply `'banana'` and `'lemon'` — strings. If you make your key an array of strings, that'd make a multi-dimensional key. This can come helpful for some data where 2 keys make sense. Internally, each dimension is a different vector. However if you go that route, keep in mind that all the "unused" key combinations will create gaps in the data file, therefore inflating its size. For example, if you make a key out of genus + name of a fruit, like `%w[citrus lemon]` and `%w[musa banana]`, your file will become inflated with empty cells created for keys `%w[citrus banana]` and `%w[musa lemon]`. That space is taken (padded with null bytes) even though there are no values for these keys.
134
134
 
135
135
  ## Anatomy
136
136
 
@@ -191,7 +191,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
191
191
 
192
192
  ## Contributing
193
193
 
194
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/wordmap. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/wordmap/blob/main/CODE_OF_CONDUCT.md).
194
+ Bug reports and pull requests are welcome on GitHub at https://github.com/maxim/wordmap. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/wordmap/blob/main/CODE_OF_CONDUCT.md).
195
195
 
196
196
 
197
197
  ## Code of Conduct
@@ -1,3 +1,3 @@
1
1
  class Wordmap
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
data/lib/wordmap.rb CHANGED
@@ -14,7 +14,7 @@ class Wordmap
14
14
 
15
15
  class << self
16
16
  def create(path, hash, index_names = [])
17
- raise ArgumentError, "Path already exists: #{path}" if Dir.exists?(path)
17
+ raise ArgumentError, "Path already exists: #{path}" if Dir.exist?(path)
18
18
 
19
19
  index_data = index_names.map { |name| [name, {}] }.to_h
20
20
  vecs = Builder.build_vectors(hash)
data/wordmap.gemspec CHANGED
@@ -3,17 +3,17 @@ require_relative 'lib/wordmap/version'
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'wordmap'
5
5
  spec.version = Wordmap::VERSION
6
- spec.authors = ['Maxim Chernyak']
7
- spec.email = ['madfancier@gmail.com']
6
+ spec.authors = ['Max Chernyak']
7
+ spec.email = ['hello@max.engineer']
8
8
 
9
9
  spec.summary = 'Look up data from disk without using your RAM.'
10
10
  spec.description = 'Wordmap is a simple way to lookup data directly from disk, bypassing RAM. It uses pread (no buffering), and takes advantage of SSD\'s constant seek time. The data is stored in equal size "cells" making it easy to calculate where things are located based on vectors.'
11
- spec.homepage = 'https://github.com/scottscheapflights/wordmap'
11
+ spec.homepage = 'https://github.com/maxim/wordmap'
12
12
  spec.license = 'Apache-2.0'
13
13
 
14
14
  spec.metadata['homepage_uri'] = spec.homepage
15
15
  spec.metadata['source_code_uri'] = spec.homepage
16
- spec.metadata['changelog_uri'] = 'https://github.com/scottscheapflights/wordmap/blob/master/CHANGELOG.md'
16
+ spec.metadata['changelog_uri'] = 'https://github.com/maxim/wordmap/blob/master/CHANGELOG.md'
17
17
 
18
18
  spec.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
19
19
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wordmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
- - Maxim Chernyak
7
+ - Max Chernyak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-16 00:00:00.000000000 Z
11
+ date: 2023-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -71,7 +71,7 @@ description: Wordmap is a simple way to lookup data directly from disk, bypassin
71
71
  The data is stored in equal size "cells" making it easy to calculate where things
72
72
  are located based on vectors.
73
73
  email:
74
- - madfancier@gmail.com
74
+ - hello@max.engineer
75
75
  executables: []
76
76
  extensions: []
77
77
  extra_rdoc_files: []
@@ -94,13 +94,13 @@ files:
94
94
  - lib/wordmap/index_value.rb
95
95
  - lib/wordmap/version.rb
96
96
  - wordmap.gemspec
97
- homepage: https://github.com/scottscheapflights/wordmap
97
+ homepage: https://github.com/maxim/wordmap
98
98
  licenses:
99
99
  - Apache-2.0
100
100
  metadata:
101
- homepage_uri: https://github.com/scottscheapflights/wordmap
102
- source_code_uri: https://github.com/scottscheapflights/wordmap
103
- changelog_uri: https://github.com/scottscheapflights/wordmap/blob/master/CHANGELOG.md
101
+ homepage_uri: https://github.com/maxim/wordmap
102
+ source_code_uri: https://github.com/maxim/wordmap
103
+ changelog_uri: https://github.com/maxim/wordmap/blob/master/CHANGELOG.md
104
104
  post_install_message:
105
105
  rdoc_options: []
106
106
  require_paths:
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
- rubygems_version: 3.1.2
119
+ rubygems_version: 3.4.10
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Look up data from disk without using your RAM.