Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ohm from 1.3.2 to 3.1.1 #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot-preview[bot]
Copy link

@dependabot-preview dependabot-preview bot commented Nov 2, 2020

Bumps ohm from 1.3.2 to 3.1.1.

Release notes

Sourced from ohm's releases.

3.0.0

This version includes two important changes:

Calling id on new instances

In previous versions, trying to access an instance's id would raise a MissingID error. The reason why raising that error is convenient is because it allows Ohm to fail as early as possible when you try to use an object that hasn't been saved yet. The error can arise from comparisons, from direct calls to id, and also from any call to methods that need object.key to return a proper value, as key in turn calls the id method. But it turns out that many form builders rely on the fact that sending the id message to most ORMs results in either a valid ID or nil, and here Ohm was the exception. By moving the check from id to key, we can keep most of the previous behavior and we can return nil when sending the id message to a new instance, thus making Ohm compatible with most form builders.

Internal encoding

When Ohm started using Lua internally for saving, updating and deleting objects, it used msgpack for serializing. Redis supports both msgpack and JSON, and we picked msgpack because it produces a more compact representation. At some point, the Ruby msgpack library and the internal msgpack support in Redis diverged, and we were forced to lock the dependency to a specific gem version. Recently, some people complained about encoding issues originating from msgpack inside Redis, and once they tried a modified Ohm that uses JSON instead of msgpack, all their issues disappeared. That's why we think it's time for removing msgpack altogether and use JSON instead.

Changelog

Sourced from ohm's changelog.

3.1.1

  • Serialize keys as strings when using JSON.

  • Reset attributes when calling load!.

3.1.0

  • Use Nest instead of Nido

    A new release of Nest (3.0.0) simplified the interaction with Redis.

  • Use Model#hash for equality

    This change just removes some slight redundancy in the code. The external behavior remains unchanged.

3.0.3

  • Fix bug that gave false positives for unique indices.

    Uniques were indexed for nil values as empty strings. This release fixes that issue.

3.0.2

  • Fix bug created the wrong keys when indexing floats.

    As reported by @slowernet, if an indexed attribute was assigned a real value with 0 fractional part (eg. 3.0), the tostring function in lua truncated the value to an integer. As a result, the index was created with the wrong key (Model:indices:attribute:3, instead of Model:indices:attribute:3.0). The fix is to convert all values to strings before sending them to the Lua script.

3.0.1

  • Adapt Lua scripts to Redis unstable.

3.0.0

  • Use JSON instead of msgpack for internal encoding.

    When Ohm started using Lua internally for saving, updating and deleting objects, it used msgpack for serializing. Redis supports both msgpack and JSON, and we picked msgpack because it produces a more compact representation. At some point, the Ruby msgpack library and the internal msgpack support in Redis diverged, and we were forced to lock the dependency to a specific gem version.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Nov 2, 2020
Bumps [ohm](https://github.com/soveran/ohm) from 1.3.2 to 3.1.1.
- [Release notes](https://github.com/soveran/ohm/releases)
- [Changelog](https://github.com/soveran/ohm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/soveran/ohm/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants