postgres-copy 0.9.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +40 -40
- data/lib/postgres-copy/acts_as_copy_target.rb +1 -0
- data/postgres-copy.gemspec +1 -1
- data/spec/copy_from_spec.rb +9 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6eeedb4ef6807baf6f855bfe8d82f56133c66be6
|
4
|
+
data.tar.gz: 464932914ca5a675064001c803d18ff1dc9fe53d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 014a139cab1e421966b374b7eeeff23da62bea3fd4353501b069b4152d55352e6bf851bb544f33ca250fa1de3ba8068356c6097450c56ed1c991712fee785bc1
|
7
|
+
data.tar.gz: 14e13dc7163ad4c32448d0590278b16b836771da3df6fcec4ee869ded14dcaa62de5667e1274ac6af3e316e3901058c1c432c2b7e5c6ccf2b25ff0e53ca54dfd
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
postgres-copy (0.
|
4
|
+
postgres-copy (1.0.0)
|
5
5
|
activerecord (>= 4.0)
|
6
6
|
pg (>= 0.17)
|
7
7
|
rails (>= 4.0)
|
@@ -10,84 +10,84 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actionmailer (4.2.
|
14
|
-
actionpack (= 4.2.
|
15
|
-
actionview (= 4.2.
|
16
|
-
activejob (= 4.2.
|
13
|
+
actionmailer (4.2.4)
|
14
|
+
actionpack (= 4.2.4)
|
15
|
+
actionview (= 4.2.4)
|
16
|
+
activejob (= 4.2.4)
|
17
17
|
mail (~> 2.5, >= 2.5.4)
|
18
18
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
19
|
-
actionpack (4.2.
|
20
|
-
actionview (= 4.2.
|
21
|
-
activesupport (= 4.2.
|
19
|
+
actionpack (4.2.4)
|
20
|
+
actionview (= 4.2.4)
|
21
|
+
activesupport (= 4.2.4)
|
22
22
|
rack (~> 1.6)
|
23
23
|
rack-test (~> 0.6.2)
|
24
24
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
25
25
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
26
|
-
actionview (4.2.
|
27
|
-
activesupport (= 4.2.
|
26
|
+
actionview (4.2.4)
|
27
|
+
activesupport (= 4.2.4)
|
28
28
|
builder (~> 3.1)
|
29
29
|
erubis (~> 2.7.0)
|
30
30
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
31
31
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
32
|
-
activejob (4.2.
|
33
|
-
activesupport (= 4.2.
|
32
|
+
activejob (4.2.4)
|
33
|
+
activesupport (= 4.2.4)
|
34
34
|
globalid (>= 0.3.0)
|
35
|
-
activemodel (4.2.
|
36
|
-
activesupport (= 4.2.
|
35
|
+
activemodel (4.2.4)
|
36
|
+
activesupport (= 4.2.4)
|
37
37
|
builder (~> 3.1)
|
38
|
-
activerecord (4.2.
|
39
|
-
activemodel (= 4.2.
|
40
|
-
activesupport (= 4.2.
|
38
|
+
activerecord (4.2.4)
|
39
|
+
activemodel (= 4.2.4)
|
40
|
+
activesupport (= 4.2.4)
|
41
41
|
arel (~> 6.0)
|
42
|
-
activesupport (4.2.
|
42
|
+
activesupport (4.2.4)
|
43
43
|
i18n (~> 0.7)
|
44
44
|
json (~> 1.7, >= 1.7.7)
|
45
45
|
minitest (~> 5.1)
|
46
46
|
thread_safe (~> 0.3, >= 0.3.4)
|
47
47
|
tzinfo (~> 1.1)
|
48
|
-
arel (6.0.
|
48
|
+
arel (6.0.3)
|
49
49
|
builder (3.2.2)
|
50
50
|
diff-lcs (1.2.5)
|
51
51
|
erubis (2.7.0)
|
52
|
-
globalid (0.3.
|
52
|
+
globalid (0.3.6)
|
53
53
|
activesupport (>= 4.1.0)
|
54
54
|
i18n (0.7.0)
|
55
55
|
json (1.8.1)
|
56
|
-
loofah (2.0.
|
56
|
+
loofah (2.0.3)
|
57
57
|
nokogiri (>= 1.5.9)
|
58
58
|
mail (2.6.3)
|
59
59
|
mime-types (>= 1.16, < 3)
|
60
|
-
mime-types (2.6.
|
60
|
+
mime-types (2.6.2)
|
61
61
|
mini_portile (0.6.2)
|
62
|
-
minitest (5.
|
62
|
+
minitest (5.8.1)
|
63
63
|
nokogiri (1.6.6.2)
|
64
64
|
mini_portile (~> 0.6.0)
|
65
|
-
pg (0.18.
|
65
|
+
pg (0.18.3)
|
66
66
|
rack (1.6.4)
|
67
67
|
rack-test (0.6.3)
|
68
68
|
rack (>= 1.0)
|
69
|
-
rails (4.2.
|
70
|
-
actionmailer (= 4.2.
|
71
|
-
actionpack (= 4.2.
|
72
|
-
actionview (= 4.2.
|
73
|
-
activejob (= 4.2.
|
74
|
-
activemodel (= 4.2.
|
75
|
-
activerecord (= 4.2.
|
76
|
-
activesupport (= 4.2.
|
69
|
+
rails (4.2.4)
|
70
|
+
actionmailer (= 4.2.4)
|
71
|
+
actionpack (= 4.2.4)
|
72
|
+
actionview (= 4.2.4)
|
73
|
+
activejob (= 4.2.4)
|
74
|
+
activemodel (= 4.2.4)
|
75
|
+
activerecord (= 4.2.4)
|
76
|
+
activesupport (= 4.2.4)
|
77
77
|
bundler (>= 1.3.0, < 2.0)
|
78
|
-
railties (= 4.2.
|
78
|
+
railties (= 4.2.4)
|
79
79
|
sprockets-rails
|
80
80
|
rails-deprecated_sanitizer (1.0.3)
|
81
81
|
activesupport (>= 4.2.0.alpha)
|
82
|
-
rails-dom-testing (1.0.
|
82
|
+
rails-dom-testing (1.0.7)
|
83
83
|
activesupport (>= 4.2.0.beta, < 5.0)
|
84
84
|
nokogiri (~> 1.6.0)
|
85
85
|
rails-deprecated_sanitizer (>= 1.0.1)
|
86
86
|
rails-html-sanitizer (1.0.2)
|
87
87
|
loofah (~> 2.0)
|
88
|
-
railties (4.2.
|
89
|
-
actionpack (= 4.2.
|
90
|
-
activesupport (= 4.2.
|
88
|
+
railties (4.2.4)
|
89
|
+
actionpack (= 4.2.4)
|
90
|
+
activesupport (= 4.2.4)
|
91
91
|
rake (>= 0.8.7)
|
92
92
|
thor (>= 0.18.1, < 2.0)
|
93
93
|
rake (10.4.2)
|
@@ -103,9 +103,9 @@ GEM
|
|
103
103
|
rspec-expectations (2.99.0)
|
104
104
|
diff-lcs (>= 1.1.3, < 2.0)
|
105
105
|
rspec-mocks (2.99.1)
|
106
|
-
sprockets (3.
|
107
|
-
rack (
|
108
|
-
sprockets-rails (2.3.
|
106
|
+
sprockets (3.3.5)
|
107
|
+
rack (> 1, < 3)
|
108
|
+
sprockets-rails (2.3.3)
|
109
109
|
actionpack (>= 3.0)
|
110
110
|
activesupport (>= 3.0)
|
111
111
|
sprockets (>= 2.8, < 4.0)
|
data/postgres-copy.gemspec
CHANGED
data/spec/copy_from_spec.rb
CHANGED
@@ -79,6 +79,15 @@ describe "COPY FROM" do
|
|
79
79
|
TestModel.order(:id).map{|r| r.attributes}.should == [{'id' => 1, 'data' => 'test data 1'}]
|
80
80
|
end
|
81
81
|
|
82
|
+
it "should ignore all-nil rows" do
|
83
|
+
lambda do
|
84
|
+
TestModel.copy_from(File.open(File.expand_path('spec/fixtures/tab_with_error.csv'), 'r'), :delimiter => "\t") do |row|
|
85
|
+
0.upto(row.length) {|idx| row[idx] = nil}
|
86
|
+
end
|
87
|
+
end.should_not raise_error
|
88
|
+
TestModel.order(:id).map{|r| r.attributes}.should == []
|
89
|
+
end
|
90
|
+
|
82
91
|
#we should implement this later
|
83
92
|
#it "should raise error in malformed files" do
|
84
93
|
#lambda do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postgres-copy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diogo Biazus
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -172,7 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
174
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.4.5
|
175
|
+
rubygems_version: 2.4.5.1
|
176
176
|
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: Put COPY command functionality in ActiveRecord's model class
|