luna_park 0.13.1 → 0.13.2

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: '06428c4acf0f2aafb70f1bc68ab52335aab96c64408b1a3bbf12b0bebb840e82'
4
- data.tar.gz: 24a00cd21ba73f3ed7244531c981d46ea542c9fb1734c2c67c54f83716064bf0
3
+ metadata.gz: 80b01a66294a4b81ecfb19e7ecbc5e94b2d90f105d7c05946dacc49298e84204
4
+ data.tar.gz: dd06fd03c3ab1a8a10e38aaeaf37ac74aa81b2a57d380b91c28c5888d34d50ec
5
5
  SHA512:
6
- metadata.gz: 482d49c124763eb9ca7f93225365abc348f5d83b9db98cd6b888304d3c7ecb824a7047f03e5f6eff47ab7c989158538d689b4a116c886d21ecfee2fe3fc97056
7
- data.tar.gz: 23ed759b552c29608170b5c29db85e040822b3a546d205f7e8f25564c358f0cf713c7839aafaaa1a81476b74450a010174472933232c220b6b0e150bd6c34227
6
+ metadata.gz: 29655ccee48e0161dfd73820345d2544ed7e9639a8e327edf0034bd9a13639c9a615c66551a313692339752a071717f133f9c545b971ee97df967d86ab0884fe
7
+ data.tar.gz: 0eb1a328dd65005510f51c7c6e27e26706b19e0b50f252cbc3b0546ff324879e7f8653886b858210bbb0812992d1e308ba24c47b71a1b14fbecca86dfd62ce7f
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [0.13.2] - 2023-12-25
8
+ Added
9
+ - Ruby 3 compatibility (still compatible with ruby 2.5)
10
+
7
11
  ## [0.13.1] - 2023-12-06
8
12
  Changed
9
13
  - `Extensions::Repositories::Postgres::Delete` returns boolean
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- luna_park (0.13.1)
4
+ luna_park (0.13.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -30,14 +30,14 @@ module LunaPark
30
30
  # MyCallableObject.call!(params) # => 'call! used'
31
31
  module Callable
32
32
  # Preferred class method to run instance `call` method
33
- def call(*args)
34
- new(*args).call
33
+ def call(*args, **kwargs)
34
+ new(*args, **kwargs).call
35
35
  end
36
36
 
37
37
  ##
38
38
  # Preferred class method to run instance `call`! method
39
- def call!(*args)
40
- new(*args).call!
39
+ def call!(*args, **kwargs)
40
+ new(*args, **kwargs).call!
41
41
  end
42
42
  end
43
43
  end
@@ -27,7 +27,7 @@ module LunaPark
27
27
 
28
28
  def reload!(entity, **scope)
29
29
  new_rows = scoped(**scope).where(primary_key => entity.public_send(primary_key))
30
- found! new_rows, not_found_by: { primary_key => entity.public_send(primary_key)}
30
+ found! new_rows, not_found_by: { primary_key => entity.public_send(primary_key) }
31
31
 
32
32
  new_attrs = from_row __one_from__ new_rows
33
33
  entity.set_attributes(new_attrs)
@@ -5,7 +5,7 @@ module LunaPark
5
5
  module Repositories
6
6
  module Postgres
7
7
  module Update
8
- def save(input, **scope_opts)
8
+ def save(input, **scope_opts) # rubocop:disable Metrics/AbcSize
9
9
  entity = wrap(input)
10
10
 
11
11
  entity.updated_at = Time.now if entity.respond_to?(:updated_at)
@@ -33,7 +33,7 @@ module LunaPark
33
33
  def wrap(input)
34
34
  case input
35
35
  when self then input
36
- when Hash then new(input)
36
+ when Hash then new(**input)
37
37
  when nil then nil
38
38
  else raise Errors::Unwrapable, "#{self} can not wrap #{input.class}"
39
39
  end
@@ -80,7 +80,7 @@ module LunaPark
80
80
  # @param [Hash] details - Any another details for current message
81
81
  def post(msg, lvl: :error, **details)
82
82
  severity = severity(lvl)
83
- message = serialize(msg, details)
83
+ message = serialize(msg, **details)
84
84
  logger.add severity, message
85
85
  end
86
86
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LunaPark
4
- VERSION = '0.13.1'
4
+ VERSION = '0.13.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: luna_park
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.1
4
+ version: 0.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kudrin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-12-22 00:00:00.000000000 Z
12
+ date: 2023-12-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bugsnag