From af3100d172ad419f857f2182d213ea4fa4f8d8ca Mon Sep 17 00:00:00 2001 From: Nikita Shilnikov Date: Wed, 6 Mar 2024 14:42:49 +0100 Subject: [PATCH] rubocop -A --- Gemfile | 5 ++--- lib/dry/effects/effects/resolve.rb | 2 +- lib/dry/effects/extensions/auto_inject.rb | 2 +- lib/dry/effects/providers/random.rb | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 5c13b9f..7bc538d 100644 --- a/Gemfile +++ b/Gemfile @@ -8,9 +8,8 @@ gemspec group :test do gem "activesupport" - gem "dry-auto_inject", "1.0.0.rc1", require: false + gem "dry-auto_inject", require: false gem "dry-logic" + gem "dry-system" gem "dry-types" - gem "dry-system", "1.0.0.rc1" end - diff --git a/lib/dry/effects/effects/resolve.rb b/lib/dry/effects/effects/resolve.rb index defe7fe..0d7731a 100644 --- a/lib/dry/effects/effects/resolve.rb +++ b/lib/dry/effects/effects/resolve.rb @@ -6,7 +6,7 @@ module Effects class Resolve < ::Module DependencyNameInvalid = ::Class.new(StandardError) - VALID_NAME = /([a-z_][a-zA-Z_0-9]*)$/.freeze + VALID_NAME = /([a-z_][a-zA-Z_0-9]*)$/ Resolve = Effect.new(type: :resolve) diff --git a/lib/dry/effects/extensions/auto_inject.rb b/lib/dry/effects/extensions/auto_inject.rb index fab8ed7..55152b2 100644 --- a/lib/dry/effects/extensions/auto_inject.rb +++ b/lib/dry/effects/extensions/auto_inject.rb @@ -5,7 +5,7 @@ require "dry/auto_inject/version" if Gem::Version.new(Dry::AutoInject::VERSION) < Gem::Version.new("0.10.0") - raise RuntimeError, "dry-effects requires dry-auto_inject >= 0.10.0" + raise "dry-effects requires dry-auto_inject >= 0.10.0" end module Dry diff --git a/lib/dry/effects/providers/random.rb b/lib/dry/effects/providers/random.rb index 98c9254..872d8fd 100644 --- a/lib/dry/effects/providers/random.rb +++ b/lib/dry/effects/providers/random.rb @@ -7,7 +7,7 @@ class Random < Provider[:random] DEFAULT_RANDOM = ::Random DEFAULT = -> _ { DEFAULT_RANDOM.rand } - DEFAULT_RANGE = (0.0...1.0).freeze + DEFAULT_RANGE = (0.0...1.0) def rand(range_or_limit = nil) range_or_limit ||= DEFAULT_RANGE