rails_soft_lock 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 952f05764b7d784066806fb56d9e91481bf75e7b32116d67b0d0b808c067ef63
4
- data.tar.gz: ca98fdc3816f3ae28e344d410f34ed80e445a836eeda7bc88972c732d4f45623
3
+ metadata.gz: a17245b0ec7da5d52139ebd9ccd5b237c6cf04511c53dd779ed9dcf234e8fc6f
4
+ data.tar.gz: b4ad5fe08f57d7064181a020116107c18d345001f5ea6224f0fd4e196867d434
5
5
  SHA512:
6
- metadata.gz: 51d3d93903af11c4fb821555fa0cbfa6308c8e5fe88d96be8ce9f5e0aaa36d31650aa35c169bc9dd233d9eda99c8a1c6aefd86641a9a8edf812324712ff5ee7a
7
- data.tar.gz: 749c56642dbbee636c6053f612688a2f0306624dd5019aff37fa258e8ef20ef32443b33f48c88297d92723f456e6471bbdf644293048911581d4ebf650282053
6
+ metadata.gz: cfe8b750d1ebcb0b22d2017ca0b2289d72a4673d22218ffc6af5ac0a4ff9d11a8a36fc536d8de74a6cd2182b6c88bb8962571a232d28c0e45d97382800494765
7
+ data.tar.gz: 6e5774aaad0f9b7bc08002d19238597cffe14c67f2beca1e01ed280b041bb83eae25a88d18f3c340d30a4ba086caf3644f165ae459f16a280ac27583526d75dc
@@ -33,30 +33,4 @@ module RailsSoftLock
33
33
  @adapter = value
34
34
  end
35
35
  end
36
-
37
- class << self
38
- # Configures the RailsSoftLock gem with a block.
39
- # @yield [config] Yields the configuration object to the block.
40
- # @return [void]
41
- def configure
42
- @configuration ||= Configuration.new
43
- if block_given?
44
- yield(@configuration)
45
- else
46
- warn "[RailsSoftLock] No configuration block provided in `configure`"
47
- end
48
- end
49
-
50
- # Returns the current configuration instance.
51
- # @return [Configuration] The configuration object.
52
- def configuration
53
- @configuration ||= Configuration.new
54
- end
55
-
56
- # Resets the configuration (useful for testing).
57
- # @return [void]
58
- def reset_configuration
59
- @configuration = nil
60
- end
61
- end
62
36
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsSoftLock
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # lib/rails_soft_lock.rb
4
+
3
5
  require "zeitwerk"
4
- loader = Zeitwerk::Loader.for_gem
5
- loader.setup
6
6
 
7
7
  # RailsSoftLock - module for soft lock ApplicationRecord by attribyte
8
8
  module RailsSoftLock
@@ -30,6 +30,35 @@ module RailsSoftLock
30
30
  lock_manager(object_name: object_name, object_key: object_key, object_value: object_value).lock_or_find
31
31
  end
32
32
 
33
+ class << self
34
+ # Configures the RailsSoftLock gem with a block.
35
+ # @yield [config] Yields the configuration object to the block.
36
+ # @return [void]
37
+ def configure
38
+ @configuration ||= Configuration.new
39
+ if block_given?
40
+ yield(@configuration)
41
+ else
42
+ warn "[RailsSoftLock] No configuration block provided in `configure`"
43
+ end
44
+ end
45
+
46
+ # Returns the current configuration instance.
47
+ # @return [Configuration] The configuration object.
48
+ def configuration
49
+ @configuration ||= Configuration.new
50
+ end
51
+
52
+ # Resets the configuration (useful for testing).
53
+ # @return [void]
54
+ def reset_configuration
55
+ @configuration = nil
56
+ end
57
+ end
58
+
33
59
  # Load rake task if Rails
34
60
  require "rails_soft_lock/railtie" if defined?(Rails)
35
61
  end
62
+
63
+ loader = Zeitwerk::Loader.for_gem
64
+ loader.setup
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_soft_lock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Arkhipov
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: '2.7'
41
41
  description: Using In-Memory Databases to Work with Rails Active Record Locks
42
42
  email:
43
- - Sergey-Arkhipov@yandex.ru
43
+ - sergey-ARkhipov@ya.ru
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
@@ -73,8 +73,10 @@ licenses:
73
73
  - MIT
74
74
  metadata:
75
75
  homepage_uri: https://github.com/sergey-arkhipov/rails_soft_lock
76
+ documentation_uri: https://github.com/sergey-arkhipov/rails_soft_lock/blob/master/README.md
77
+ changelog_uri: https://github.com/sergey-arkhipov/rails_soft_lock/blob/main/CHANGELOG.md
76
78
  source_code_uri: https://github.com/sergey-arkhipov/rails_soft_lock
77
- changelog_uri: https://github.com/sergey-arkhipov/rails_soft_lock
79
+ bug_tracker_uri: https://github.com/sergey-arkhipov/rails_soft_lock/issues
78
80
  rubygems_mfa_required: 'true'
79
81
  rdoc_options: []
80
82
  require_paths: