koba-lab / mastodon

A GNU Social-compatible microblogging server
https://ika.queloud.net
GNU Affero General Public License v3.0
5 stars 7 forks source link

Bump rails-settings-cached from 0.6.6 to 2.8.3 #705

Open dependabot[bot] opened 1 year ago

dependabot[bot] commented 1 year ago

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: https://github.com/huacnlee/rails-settings-cached/compare/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[admin@rubyonrails.org]

# 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)
github-actions[bot] commented 7 months ago

This pull request has merge conflicts that must be resolved before it can be merged.