servactory 1.9.3 → 1.9.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 026f0a67d02ac1eb1053768585e80684a7bbaa4acbf3b381213d145cfbefe4ae
4
- data.tar.gz: 362040a5cfe9b33d28b1a83bedb21efa7d2fa701272c7b30f739c6a8f025af42
3
+ metadata.gz: 8c6d95c37b2eb4ab39f0a16db06fcd1e6cf6c48957ecd4877d85deb019b881e2
4
+ data.tar.gz: 3ab4992dc15627edeb9f5745d560775e161e4e285c8a08ff89078bcb2abe88c7
5
5
  SHA512:
6
- metadata.gz: 449c7dd9083b99629621e0cd04bcbd07e3b01b3081fc64cc36042922d3c8fa603a8f2efb6d14fe53b8b233ec9437bf82d994831e5cbc002b4ccad5829775ea1d
7
- data.tar.gz: 932159f75fb820fd9adad6f0f2bb6bae88e2ac74d87d9e2293caab4c5a5cb691a6d161bfe4ac4e3f89527b2f106ff52d36119cbb765ccbed2767cb70ab1b8b2d
6
+ metadata.gz: d00d1f0d3cf1bde448a10a6c3fe81c1e1a22a09f9c73793626fa1e037c1c933a09bfed784365146837daa397664cf1fb80164e972e46121b5003b21e3ab25bfe
7
+ data.tar.gz: a0c6488d9815a7833f382e136f853ed405117d5459101195fb8801535beb3db7adf1860dd1a9b7c2a0eed6607e85b4f01bec6fa6804a0082110ca702c5d87a05
@@ -11,9 +11,9 @@ module Servactory
11
11
  end
12
12
 
13
13
  def method_missing(name, *args, &block)
14
- prepared_name = name.to_s.delete("=").to_sym
15
-
16
14
  if name.to_s.end_with?("=")
15
+ prepared_name = name.to_s.delete("=").to_sym
16
+
17
17
  raise_error_for(:setter, prepared_name)
18
18
  else
19
19
  getter_with(name: name) { raise_error_for(:getter, name) }
@@ -10,12 +10,12 @@ module Servactory
10
10
  end
11
11
 
12
12
  def method_missing(name, *args, &block)
13
- prepared_name = name.to_s.delete("=").to_sym
14
-
15
13
  if name.to_s.end_with?("=")
14
+ prepared_name = name.to_s.delete("=").to_sym
15
+
16
16
  setter_with(prepared_name: prepared_name, value: args.pop) { raise_error_for(:setter, prepared_name) }
17
17
  else
18
- getter_with(name: name) { raise_error_for(:getter, prepared_name) }
18
+ getter_with(name: name) { raise_error_for(:getter, name) }
19
19
  end
20
20
  end
21
21
 
@@ -10,12 +10,12 @@ module Servactory
10
10
  end
11
11
 
12
12
  def method_missing(name, *args, &block)
13
- prepared_name = name.to_s.delete("=").to_sym
14
-
15
13
  if name.to_s.end_with?("=")
14
+ prepared_name = name.to_s.delete("=").to_sym
15
+
16
16
  setter_with(prepared_name: prepared_name, value: args.pop) { raise_error_for(:setter, prepared_name) }
17
17
  else
18
- getter_with(name: name) { raise_error_for(:getter, prepared_name) }
18
+ getter_with(name: name) { raise_error_for(:getter, name) }
19
19
  end
20
20
  end
21
21
 
@@ -42,7 +42,7 @@ module Servactory
42
42
  end
43
43
 
44
44
  def call_wrapper_with_methods(wrapper, rollback, methods)
45
- wrapper.call(methods: -> { call_methods(methods) })
45
+ wrapper.call(methods: -> { call_methods(methods) }, context: @context)
46
46
  rescue StandardError => e
47
47
  @context.send(rollback, e) if rollback.present?
48
48
  end
@@ -4,7 +4,7 @@ module Servactory
4
4
  module VERSION
5
5
  MAJOR = 1
6
6
  MINOR = 9
7
- PATCH = 3
7
+ PATCH = 4
8
8
 
9
9
  STRING = [MAJOR, MINOR, PATCH].join(".")
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: servactory
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 1.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sokolov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-27 00:00:00.000000000 Z
11
+ date: 2023-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport