activerecord-import 0.2.7 → 0.2.8.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -36,7 +36,7 @@ namespace :display do
36
36
  end
37
37
  task :default => ["display:notice"]
38
38
 
39
- ADAPTERS = %w(mysql mysql2 postgresql sqlite3)
39
+ ADAPTERS = %w(mysql mysql2 jdbcmysql postgresql sqlite3)
40
40
  ADAPTERS.each do |adapter|
41
41
  namespace :test do
42
42
  desc "Runs #{adapter} database tests."
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8.rc1
@@ -0,0 +1,6 @@
1
+ require "active_record/connection_adapters/mysql_adapter"
2
+ require "activerecord-import/adapters/mysql_adapter"
3
+
4
+ class ActiveRecord::ConnectionAdapters::MysqlAdapter
5
+ include ActiveRecord::Import::MysqlAdapter::InstanceMethods
6
+ end
@@ -0,0 +1 @@
1
+ ENV["ARE_DB"] = "jdbcmysql"
data/test/import_test.rb CHANGED
@@ -234,14 +234,9 @@ describe "#import" do
234
234
  end
235
235
 
236
236
  context "importing a datetime field" do
237
- it "should import a date with MM/DD/YYYY format just fine" do
238
- Topic.import [:author_name, :title, :last_read], [["Bob Jones", "Topic 1", "05/14/2010"]]
239
- assert_equal "05/14/2010".to_date, Topic.last.last_read.to_date
240
- end
241
-
242
237
  it "should import a date with YYYY/MM/DD format just fine" do
243
238
  Topic.import [:author_name, :title, :last_read], [["Bob Jones", "Topic 2", "2010/05/14"]]
244
- assert_equal "05/14/2010".to_date, Topic.last.last_read.to_date
239
+ assert_equal "2010/05/14".to_date, Topic.last.last_read.to_date
245
240
  end
246
241
  end
247
242
  end
@@ -0,0 +1,6 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
2
+
3
+ require File.expand_path(File.dirname(__FILE__) + '/../support/mysql/assertions')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../support/mysql/import_examples')
5
+
6
+ should_support_mysql_import_functionality
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-import
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 2
9
- - 7
10
- version: 0.2.7
4
+ prerelease: 6
5
+ version: 0.2.8.rc1
11
6
  platform: ruby
12
7
  authors:
13
8
  - Zach Dennis
@@ -15,25 +10,52 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-04-29 00:00:00 -04:00
19
- default_executable:
13
+ date: 2011-06-23 00:00:00 Z
20
14
  dependencies:
21
15
  - !ruby/object:Gem::Dependency
16
+ name: activerecord
17
+ requirement: &id001 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: 3.0pre
22
23
  type: :runtime
23
24
  prerelease: false
24
- version_requirements: &id001 !ruby/object:Gem::Requirement
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: rake
28
+ requirement: &id002 !ruby/object:Gem::Requirement
25
29
  none: false
26
30
  requirements:
27
- - - ~>
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: jeweler
39
+ requirement: &id003 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
28
43
  - !ruby/object:Gem::Version
29
- hash: 7
30
- segments:
31
- - 3
32
- - 0
33
- - 0
34
- version: 3.0.0
44
+ version: 1.4.0
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
35
49
  name: activerecord
36
- requirement: *id001
50
+ requirement: &id004 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ version: 3.0pre
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *id004
37
59
  description: Extraction of the ActiveRecord::Base#import functionality from ar-extensions for Rails 3 and beyond
38
60
  email: zach.dennis@gmail.com
39
61
  executables: []
@@ -48,6 +70,7 @@ files:
48
70
  - VERSION
49
71
  - lib/activerecord-import.rb
50
72
  - lib/activerecord-import/active_record/adapters/abstract_adapter.rb
73
+ - lib/activerecord-import/active_record/adapters/jdbcmysql_adapter.rb
51
74
  - lib/activerecord-import/active_record/adapters/mysql2_adapter.rb
52
75
  - lib/activerecord-import/active_record/adapters/mysql_adapter.rb
53
76
  - lib/activerecord-import/active_record/adapters/postgresql_adapter.rb
@@ -64,11 +87,13 @@ files:
64
87
  - lib/activerecord-import/sqlite3.rb
65
88
  - lib/activerecord-import/synchronize.rb
66
89
  - test/active_record/connection_adapter_test.rb
90
+ - test/adapters/jdbcmysql.rb
67
91
  - test/adapters/mysql.rb
68
92
  - test/adapters/mysql2.rb
69
93
  - test/adapters/postgresql.rb
70
94
  - test/adapters/sqlite3.rb
71
95
  - test/import_test.rb
96
+ - test/jdbcmysql/import_test.rb
72
97
  - test/models/book.rb
73
98
  - test/models/group.rb
74
99
  - test/models/topic.rb
@@ -85,13 +110,12 @@ files:
85
110
  - test/support/mysql/import_examples.rb
86
111
  - test/synchronize_test.rb
87
112
  - test/test_helper.rb
88
- has_rdoc: true
89
113
  homepage: http://github.com/zdennis/activerecord-import
90
114
  licenses: []
91
115
 
92
116
  post_install_message:
93
- rdoc_options:
94
- - --charset=UTF-8
117
+ rdoc_options: []
118
+
95
119
  require_paths:
96
120
  - lib
97
121
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -99,33 +123,32 @@ required_ruby_version: !ruby/object:Gem::Requirement
99
123
  requirements:
100
124
  - - ">="
101
125
  - !ruby/object:Gem::Version
102
- hash: 3
126
+ hash: 3728361500197009317
103
127
  segments:
104
128
  - 0
105
129
  version: "0"
106
130
  required_rubygems_version: !ruby/object:Gem::Requirement
107
131
  none: false
108
132
  requirements:
109
- - - ">="
133
+ - - ">"
110
134
  - !ruby/object:Gem::Version
111
- hash: 3
112
- segments:
113
- - 0
114
- version: "0"
135
+ version: 1.3.1
115
136
  requirements: []
116
137
 
117
138
  rubyforge_project:
118
- rubygems_version: 1.3.7
139
+ rubygems_version: 1.8.5
119
140
  signing_key:
120
141
  specification_version: 3
121
142
  summary: Bulk-loading extension for ActiveRecord
122
143
  test_files:
123
144
  - test/active_record/connection_adapter_test.rb
145
+ - test/adapters/jdbcmysql.rb
124
146
  - test/adapters/mysql.rb
125
147
  - test/adapters/mysql2.rb
126
148
  - test/adapters/postgresql.rb
127
149
  - test/adapters/sqlite3.rb
128
150
  - test/import_test.rb
151
+ - test/jdbcmysql/import_test.rb
129
152
  - test/models/book.rb
130
153
  - test/models/group.rb
131
154
  - test/models/topic.rb