ree_lib 1.0.76 → 1.0.77

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: fb85650b5a10f4ec01e8323cd6caef7585821acc583a8c1727eec0a3fb4e7f5c
4
- data.tar.gz: 2839d01f406e6c997fea3a19c3aa7d641fe4df8f1bf3ef1ccd3f5044f5f5f094
3
+ metadata.gz: 7f828e49751333dd0c669d75a7066a838f9149d4ab8923ab788e53f84c61aae4
4
+ data.tar.gz: b247a24875f2c0a9caa9b5fcfbe5452e0a3c48af7d0ff2c0bd385820ce37c709
5
5
  SHA512:
6
- metadata.gz: 10cf83f3f3e3429a085c15179fe25e0ac278e73d8e2c595522dc99764a787aabee1e8b14e9bd6b3522fc2969fb8f0aec173aef09d5d8dd97250e0cdf8f02e51e
7
- data.tar.gz: a3c2644c4972910c1cbb7d8ef26bbac66f7e575f281f087026f17d9efe3ac24e3cf842473dd9d4ad32319d9761820b90fba28910d97290471ddc219cbbf44300
6
+ metadata.gz: 0d3717364f0554a3e36097431856fb3db75099bb34fd57dc6eabfffa4e57baa2e66a81a59da5206e980dcfef1339c3cc50078fb1242973efbc9df67550ea0716
7
+ data.tar.gz: ad0297ec030fd912995b4b740685c017f0a114084cbed83579d42c507a06fd0e70eb2a267c030d12b2763f649dd201cb3d9003684b2843e3105073da8ebff4cf
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.2
1
+ 3.2.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ree_lib (1.0.76)
4
+ ree_lib (1.0.77)
5
5
  binding_of_caller (~> 1.0.0)
6
6
  i18n (~> 1.12.0)
7
7
  loofah (~> 2.18.0)
@@ -83,14 +83,14 @@ module ReeDao
83
83
  return if entities.empty?
84
84
 
85
85
  mapper = opts[:schema_mapper]
86
- columns = columns
86
+ columns = self.columns
87
87
  raw = {}
88
88
 
89
89
  columns.delete(:id)
90
90
  columns.delete(:row)
91
91
 
92
92
  data = entities.map do |entity|
93
- hash = mapper.to_hash(entity)
93
+ hash = mapper.db_dump(entity)
94
94
  raw[entity] = hash
95
95
 
96
96
  columns.map { hash[_1] }
@@ -147,4 +147,14 @@ RSpec.describe :build_pg_connection do
147
147
  expect(product.info[:price]).to eq(1440)
148
148
  expect(product.labels).to eq(["Sale", "New"])
149
149
  }
150
+
151
+ it "insert multiple records" do
152
+ products_dao.delete_all
153
+
154
+ products = Array.new(3) { |i| ReeDaoTestPg::Product.new(title: "Product#{i}", info: { price: 1337, count: 200 }, labels: ["Sale"]) }
155
+
156
+ products_dao.import_all(products)
157
+
158
+ expect(products_dao.count).to eq 3
159
+ end
150
160
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ReeLib
4
- VERSION = "1.0.76"
4
+ VERSION = "1.0.77"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ree_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.76
4
+ version: 1.0.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruslan Gatiyatov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-06 00:00:00.000000000 Z
11
+ date: 2023-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ree
@@ -1391,7 +1391,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1391
1391
  - !ruby/object:Gem::Version
1392
1392
  version: '0'
1393
1393
  requirements: []
1394
- rubygems_version: 3.3.7
1394
+ rubygems_version: 3.4.1
1395
1395
  signing_key:
1396
1396
  specification_version: 4
1397
1397
  summary: Ruby Standard Library Extensions