sequel_dm 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: f084e7ea68702d55ac369cb306fd88284659042a
4
- data.tar.gz: eef1fac6de543a4f7cdc584f1beb465ca38bf4ed
3
+ metadata.gz: e8aba7ce4acedb9747ab68bdffa754b3b21a2a91
4
+ data.tar.gz: 6b42a8531a09cb883650a24b60f8c639b39bb714
5
5
  SHA512:
6
- metadata.gz: 3dcc62bc2dd31183e8c508e56089156d96fbb60f566a246b2c886682b76e626d4ff6f3ccfee6240f3d805300239c88dabd2393495867e89bcb2cf8e7fbe46c70
7
- data.tar.gz: 861fca6b3d06642b563b5638dcb2ffad32b8f40faafba99286e42952da579111744660e26de84227debfe92b14c24b71eee0c7d591f1ed232356150ead4072a6
6
+ metadata.gz: 4ed32e1ae88b97918a0da5e5ff3559c628eeeadeed7388154464d56abc0dde0be7cbb11aec9b445d92e31255943b95386afe6347fe0f1253dd902b2566aea2d0
7
+ data.tar.gz: ffd6184b445624e67d2a27cb8d14139426734ce729a5564de35ef8446abd7e2c8f60334b7d6ba2bc0d15b0cb3533cc1a9cfcf008aad6bcc9ed2b514ea768b917
data/Gemfile CHANGED
@@ -5,5 +5,4 @@ gemspec
5
5
 
6
6
  group :test do
7
7
  gem 'rspec'
8
- gem 'debugger'
9
8
  end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sequel_dm (0.0.4)
4
+ sequel_dm (0.0.5)
5
5
  activesupport
6
6
  sequel (~> 4.6)
7
7
 
@@ -15,13 +15,6 @@ GEM
15
15
  thread_safe (~> 0.1)
16
16
  tzinfo (~> 0.3.37)
17
17
  atomic (1.1.14)
18
- columnize (0.3.6)
19
- debugger (1.6.5)
20
- columnize (>= 0.3.1)
21
- debugger-linecache (~> 1.2.0)
22
- debugger-ruby_core_source (~> 1.3.1)
23
- debugger-linecache (1.2.0)
24
- debugger-ruby_core_source (1.3.1)
25
18
  diff-lcs (1.2.5)
26
19
  i18n (0.6.9)
27
20
  minitest (4.7.5)
@@ -45,7 +38,6 @@ PLATFORMS
45
38
 
46
39
  DEPENDENCIES
47
40
  bundler (~> 1.3)
48
- debugger
49
41
  rake
50
42
  rspec
51
43
  sequel_dm!
data/README.md CHANGED
@@ -24,3 +24,5 @@ And then execute:
24
24
  4. Push to the branch (`git push origin my-new-feature`)
25
25
  5. Create new Pull Request
26
26
 
27
+ ## Author
28
+ Albert Gazizov, [@deeper4k](https://twitter.com/deeper4k)
data/lib/sequel_dm/dao.rb CHANGED
@@ -121,6 +121,14 @@ module SequelDM
121
121
  end
122
122
  end
123
123
 
124
+ def multi_insert(entities)
125
+ raws = []
126
+ entities.each do |entity|
127
+ raws << mapper.to_hash(entity)
128
+ end
129
+ dataset.multi_insert(raws)
130
+ end
131
+
124
132
  def update(entity, root = nil)
125
133
  raw = mapper.to_hash(entity, root)
126
134
  raw = select_only_changed_values(entity, raw)
@@ -1,3 +1,3 @@
1
1
  module SequelDM
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -1,3 +1,4 @@
1
+ require 'yaml'
1
2
  require 'spec_helper'
2
3
 
3
4
  describe SequelDM::Mapper do
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'rubygems'
2
2
  require 'bundler/setup'
3
- require 'debugger'
4
3
  require 'sequel'
5
4
  require 'sequel_dm'
6
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel_dm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert Gazizov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-30 00:00:00.000000000 Z
12
+ date: 2015-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport