activerecord-import 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.markdown +7 -3
- data/lib/activerecord-import/adapters/sqlite3_adapter.rb +0 -1
- data/lib/activerecord-import/value_sets_parser.rb +2 -2
- data/lib/activerecord-import/version.rb +1 -1
- data/test/test_helper.rb +1 -1
- data/test/value_sets_bytes_parser_test.rb +2 -2
- data/test/value_sets_records_parser_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4b90003ff135e948989e264283865779bd79024
|
|
4
|
+
data.tar.gz: 30ef6b7700896f504f1dd99444d99b7ff712c62d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 840e755ed27b5f2831c0340cbc7ceeced5ad674b79ea916c5d4b405c7608cf4f8791cae7b557aa513660addb94d9dfaf037d3d981b0fd84ec2a45ddeb048e02e
|
|
7
|
+
data.tar.gz: cec3b8e8f94af62a68a72ba99c64404a920c11112a1cd21308ac350efb289cf4a2d7120ea5d5cc203f6b2533106d5be09ccf69765932f23ecec0137adc967724
|
data/Gemfile
CHANGED
data/README.markdown
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# activerecord-import
|
|
2
2
|
|
|
3
|
-
activerecord-import is a library for bulk inserting data using ActiveRecord.
|
|
3
|
+
activerecord-import is a library for bulk inserting data using ActiveRecord.
|
|
4
4
|
|
|
5
|
-
### Rails
|
|
5
|
+
### Rails 4.0
|
|
6
6
|
|
|
7
|
-
Use
|
|
7
|
+
Use activerecord-import 0.4.0 or higher.
|
|
8
|
+
|
|
9
|
+
### Rails 3.1.x up to, but not including 4.0
|
|
10
|
+
|
|
11
|
+
Use the latest in the activerecord-import 0.3.x series.
|
|
8
12
|
|
|
9
13
|
### Rails 3.0.x up to, but not including 3.1
|
|
10
14
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module ActiveRecord::Import
|
|
2
|
-
class
|
|
2
|
+
class ValueSetsBytesParser
|
|
3
3
|
attr_reader :reserved_bytes, :max_bytes, :values
|
|
4
4
|
|
|
5
5
|
def self.parse(values, options)
|
|
@@ -51,4 +51,4 @@ module ActiveRecord::Import
|
|
|
51
51
|
@values.in_groups_of(max_records, with_fill=false)
|
|
52
52
|
end
|
|
53
53
|
end
|
|
54
|
-
end
|
|
54
|
+
end
|
data/test/test_helper.rb
CHANGED
|
@@ -2,9 +2,9 @@ require File.expand_path(File.dirname(__FILE__) + '/test_helper')
|
|
|
2
2
|
|
|
3
3
|
require 'activerecord-import/value_sets_parser'
|
|
4
4
|
|
|
5
|
-
describe ActiveRecord::Import::
|
|
5
|
+
describe ActiveRecord::Import::ValueSetsBytesParser do
|
|
6
6
|
context "#parse - computing insert value sets" do
|
|
7
|
-
let(:parser){ ActiveRecord::Import::
|
|
7
|
+
let(:parser){ ActiveRecord::Import::ValueSetsBytesParser }
|
|
8
8
|
let(:base_sql){ "INSERT INTO atable (a,b,c)" }
|
|
9
9
|
let(:values){ [ "(1,2,3)", "(2,3,4)", "(3,4,5)" ] }
|
|
10
10
|
|
|
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/test_helper')
|
|
|
2
2
|
|
|
3
3
|
require 'activerecord-import/value_sets_parser'
|
|
4
4
|
|
|
5
|
-
describe "ActiveRecord::Import::
|
|
5
|
+
describe "ActiveRecord::Import::ValueSetsRecordsParser" do
|
|
6
6
|
context "#parse - computing insert value sets" do
|
|
7
7
|
let(:parser){ ActiveRecord::Import::ValueSetsRecordsParser }
|
|
8
8
|
let(:base_sql){ "INSERT INTO atable (a,b,c)" }
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord-import
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Zach Dennis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-07-
|
|
11
|
+
date: 2013-07-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|