ree_lib 1.0.107 → 1.0.108

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: 28f3adfaea70ca8f4acd1b767181790a4b90e0af65449745e0e499f80353f78d
4
- data.tar.gz: feae7ca14b04d4360866547e84773b402d97fc1c0b9546de1f45c2334cc4db99
3
+ metadata.gz: 896dcde182ff4343261aa23d3973237260f81e82b9a9a349b7c93f429737fef3
4
+ data.tar.gz: 1cf94f98559f130796b3ac6e66c11071d6cc47fc17f8d6f2ab5792e881c6324b
5
5
  SHA512:
6
- metadata.gz: fd70c16af7f3b3c2f1eaf0c165daee6e5b978e4ea5b36ae7dec584a4a950843555f2a60fe8d0f43b1a6cab7580e749ddf3f76d137404ad78fb7605051cec3ea1
7
- data.tar.gz: ee42df7d56fbf5911644f40e8b8752842568cbaa7e8794280a6fb9f299f9940fedaca22206ffe2790de96ef341c5df8793c6c3a60af306b79ec29f84c85fe346
6
+ metadata.gz: 8827e41de3987b8bf0bbbf8f0178e3612f4ad2303fbce7375510256fcb123ea7432c5cbc5325e8833efe872b8ee9604b2ba8e4237707f539250faca86bb27ab1
7
+ data.tar.gz: 1ab05f373d35931c0750355b4c9fe652e133bc75583a363ebc17973f640d848dc7baba1517d6ed43820136ef0bf0e9957880a0713d72e4e0405f0cc6d433e363
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ree_lib (1.0.107)
4
+ ree_lib (1.0.108)
5
5
  bigdecimal (~> 3.1.6)
6
6
  binding_of_caller (~> 1.0.0)
7
7
  i18n (~> 1.14.1)
@@ -4,7 +4,7 @@ class ReeDto::CollectionMeta
4
4
 
5
5
  attr_reader :name, :contract, :filter_proc
6
6
 
7
- contract Symbol, Any, Proc => Any
7
+ contract Symbol, Any, Nilor[Proc] => Any
8
8
  def initialize(name, contract, filter_proc)
9
9
  @name = name
10
10
  @contract = contract
@@ -47,7 +47,7 @@ class ReeDto::BuildDto
47
47
 
48
48
  builder.collections.each do |collection|
49
49
  col_class = build_dto_collection_class(collection.contract)
50
- col_class.class_exec(&collection.filter_proc)
50
+ col_class.class_exec(&collection.filter_proc) if collection.filter_proc
51
51
 
52
52
  klass.instance_exec do
53
53
  contract ArrayOf[collection.contract] => DtoCollection
@@ -20,6 +20,8 @@ RSpec.describe ReeDto::DSL do
20
20
  end
21
21
  end
22
22
 
23
+ collection :active_users, User
24
+
23
25
  collection :users, User do
24
26
  filter :active, -> { _1.status == "active" }
25
27
  filter :inactive, -> { _1.status != "active" }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReeLib
4
- VERSION = "1.0.107"
4
+ VERSION = "1.0.108"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ree_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.107
4
+ version: 1.0.108
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov