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 rails-settings-cached from 0.6.6 to 2.8.3 #1373

Open
wants to merge 1 commit into
base: qoto-groups
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 26, 2022

Bumps rails-settings-cached from 0.6.6 to 2.8.3.

Release notes

Sourced from rails-settings-cached's releases.

v2.8.3

What's Changed

New Contributors

Full Changelog: huacnlee/rails-settings-cached@v2.8.2...v2.8.3

v2.8.2

  • Add supports for Ruby 3.1, Rails 7.0;

v2.8.1

  • Fix for Rails 5, RequestStore cache not assign issue.

v2.8.0

  • Add Middleware for only enable RequestCache in Rails request context. #219, #182

v2.7.1

  • Fix #215 keep scope method compatible with ActiveRecord scope.

v2.7.0

  • Allows define field for assignment more options, and then you can get option by get_field.
  • Export Setting.defined_fields method for get all fields.
  • Add optional scope method to allows us grouping fields on if we need.

Use case:

class Setting < RailsSettings::Base
  # cache_prefix { "v1" }
scope :application do
field :app_name, default: "Rails Settings", validates: { presence: true, length: { in: 2..20 } }
field :host, default: "http://example.com", readonly: true
field :default_locale, default: "zh-CN", validates: { presence: true, inclusion: { in: %w[zh-CN en jp] } }, option_values: %w[en jp zh-CN], foo: 123
field :admin_emails, type: :array, default: %w[[email protected]]
# lambda default value
field :welcome_message, type: :string, default: -&gt; { &quot;welcome to #{self.app_name}&quot; }, validates: { length: { maximum: 255 } }
# Override array separator, default: /[\n,]/ split with \n or comma.
field :tips, type: :array, separator: /[\n]+/

end
scope :limits do
field :user_limits, type: :integer, default: 20
field :exchange_rate, type: :float, default: 0.123
</tr></table>

... (truncated)

Changelog

Sourced from rails-settings-cached's changelog.

Visit:

https://github.com/huacnlee/rails-settings-cached/releases

2.6.0

  • Allows call key in Setting instance to support use keys in ActionView helpers.
    • Fix #212 not can use f.select with Setting instance method.
  • Brake Changes: Limit use var, value as Setting key, now will raise error.

2.5.3

  • Improve implement for avoid use eval method.
  • Fix #211, support Proc default value for readonly field.

2.5.2

  • Avoid allocate string on get value.

2.5.1

  • Do validate on directly assignment (#202)
irb> Setting.default_locale = "foo"
ActiveRecord::RecordInvalid: (Validation failed: Default locale is not included in [zh-CN, en, jp])

2.5.0

  • Add validates options to special the Rails Validation for fields (#201)
class Setting < RailsSettings::Base
  # cache_prefix { "v1" }
  field :app_name, default: "Rails Settings", validates: { presence: true, length: { in: 2..20 } }
  field :default_locale, default: "zh-CN", validates: { presence: true, inclusion: { in: %w[zh-CN en jp], message: "is not included in [zh-CN, en, jp]" } }
end

2.4.1

  • Fix request_cache for backward compatible with Rails 5.0.x;
  • No effect for Rails 5.2+;

In Rails 5.0:

# You must add request_store dependency in to you Gemfile
gem "request_store"
</tr></table> 

... (truncated)

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)

Bumps [rails-settings-cached](https://github.com/huacnlee/rails-settings-cached) from 0.6.6 to 2.8.3.
- [Release notes](https://github.com/huacnlee/rails-settings-cached/releases)
- [Changelog](https://github.com/huacnlee/rails-settings-cached/blob/main/CHANGELOG.md)
- [Commits](huacnlee/rails-settings-cached@v0.6.6...v2.8.3)

---
updated-dependencies:
- dependency-name: rails-settings-cached
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file ruby Pull requests that update Ruby code labels Dec 26, 2022
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 ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants