activerecord-import 2.2.0 → 2.3.0

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.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -0
  3. data/README.markdown +9 -9
  4. data/lib/activerecord-import/active_record/adapters/mysql2_proxy_adapter.rb +8 -0
  5. data/lib/activerecord-import/active_record/adapters/postgresql_proxy_adapter.rb +8 -0
  6. data/lib/activerecord-import/active_record/adapters/sqlite3_proxy_adapter.rb +8 -0
  7. data/lib/activerecord-import/active_record/adapters/trilogy_proxy_adapter.rb +8 -0
  8. data/lib/activerecord-import/adapters/active_record_proxy_adapter.rb +19 -0
  9. data/lib/activerecord-import/adapters/mysql2_proxy_adapter.rb +9 -0
  10. data/lib/activerecord-import/adapters/mysql_adapter.rb +10 -3
  11. data/lib/activerecord-import/adapters/postgresql_adapter.rb +1 -1
  12. data/lib/activerecord-import/adapters/postgresql_proxy_adapter.rb +9 -0
  13. data/lib/activerecord-import/adapters/sqlite3_proxy_adapter.rb +9 -0
  14. data/lib/activerecord-import/adapters/trilogy_proxy_adapter.rb +9 -0
  15. data/lib/activerecord-import/base.rb +0 -2
  16. data/lib/activerecord-import/import.rb +243 -207
  17. data/lib/activerecord-import/version.rb +1 -1
  18. metadata +13 -208
  19. data/.github/workflows/test.yaml +0 -165
  20. data/.gitignore +0 -37
  21. data/.rubocop.yml +0 -118
  22. data/.rubocop_todo.yml +0 -30
  23. data/Brewfile +0 -5
  24. data/Dockerfile +0 -23
  25. data/Gemfile +0 -63
  26. data/Rakefile +0 -75
  27. data/activerecord-import.gemspec +0 -28
  28. data/benchmarks/README +0 -32
  29. data/benchmarks/benchmark.rb +0 -72
  30. data/benchmarks/lib/base.rb +0 -143
  31. data/benchmarks/lib/cli_parser.rb +0 -111
  32. data/benchmarks/lib/float.rb +0 -17
  33. data/benchmarks/lib/mysql2_benchmark.rb +0 -21
  34. data/benchmarks/lib/output_to_csv.rb +0 -21
  35. data/benchmarks/lib/output_to_html.rb +0 -66
  36. data/benchmarks/models/test_innodb.rb +0 -5
  37. data/benchmarks/models/test_memory.rb +0 -5
  38. data/benchmarks/models/test_myisam.rb +0 -5
  39. data/benchmarks/schema/mysql2_schema.rb +0 -18
  40. data/docker-compose.yml +0 -34
  41. data/gemfiles/5.2.gemfile +0 -4
  42. data/gemfiles/6.0.gemfile +0 -4
  43. data/gemfiles/6.1.gemfile +0 -4
  44. data/gemfiles/7.0.gemfile +0 -4
  45. data/gemfiles/7.1.gemfile +0 -3
  46. data/gemfiles/7.2.gemfile +0 -3
  47. data/gemfiles/8.0.gemfile +0 -3
  48. data/test/adapters/janus_mysql2.rb +0 -3
  49. data/test/adapters/janus_trilogy.rb +0 -11
  50. data/test/adapters/jdbcmysql.rb +0 -3
  51. data/test/adapters/jdbcpostgresql.rb +0 -3
  52. data/test/adapters/jdbcsqlite3.rb +0 -3
  53. data/test/adapters/makara_postgis.rb +0 -3
  54. data/test/adapters/mysql2.rb +0 -3
  55. data/test/adapters/mysql2_makara.rb +0 -3
  56. data/test/adapters/mysql2_proxy.rb +0 -3
  57. data/test/adapters/mysql2spatial.rb +0 -3
  58. data/test/adapters/postgis.rb +0 -3
  59. data/test/adapters/postgresql.rb +0 -3
  60. data/test/adapters/postgresql_makara.rb +0 -3
  61. data/test/adapters/postgresql_proxy.rb +0 -3
  62. data/test/adapters/seamless_database_pool.rb +0 -3
  63. data/test/adapters/spatialite.rb +0 -3
  64. data/test/adapters/sqlite3.rb +0 -3
  65. data/test/adapters/trilogy.rb +0 -11
  66. data/test/database.yml.sample +0 -73
  67. data/test/github/database.yml +0 -85
  68. data/test/import_test.rb +0 -970
  69. data/test/janus_mysql2/import_test.rb +0 -8
  70. data/test/janus_trilogy/import_test.rb +0 -7
  71. data/test/jdbcmysql/import_test.rb +0 -7
  72. data/test/jdbcpostgresql/import_test.rb +0 -6
  73. data/test/jdbcsqlite3/import_test.rb +0 -6
  74. data/test/makara_postgis/import_test.rb +0 -10
  75. data/test/models/account.rb +0 -5
  76. data/test/models/alarm.rb +0 -4
  77. data/test/models/animal.rb +0 -8
  78. data/test/models/author.rb +0 -9
  79. data/test/models/bike_maker.rb +0 -10
  80. data/test/models/book.rb +0 -18
  81. data/test/models/car.rb +0 -5
  82. data/test/models/card.rb +0 -5
  83. data/test/models/chapter.rb +0 -6
  84. data/test/models/composite_book.rb +0 -19
  85. data/test/models/composite_chapter.rb +0 -12
  86. data/test/models/customer.rb +0 -18
  87. data/test/models/deck.rb +0 -8
  88. data/test/models/dictionary.rb +0 -6
  89. data/test/models/discount.rb +0 -5
  90. data/test/models/end_note.rb +0 -6
  91. data/test/models/group.rb +0 -5
  92. data/test/models/order.rb +0 -17
  93. data/test/models/playing_card.rb +0 -4
  94. data/test/models/promotion.rb +0 -5
  95. data/test/models/question.rb +0 -5
  96. data/test/models/rule.rb +0 -5
  97. data/test/models/tag.rb +0 -12
  98. data/test/models/tag_alias.rb +0 -11
  99. data/test/models/topic.rb +0 -31
  100. data/test/models/user.rb +0 -5
  101. data/test/models/user_token.rb +0 -6
  102. data/test/models/vendor.rb +0 -9
  103. data/test/models/widget.rb +0 -33
  104. data/test/mysql2/import_test.rb +0 -7
  105. data/test/mysql2_makara/import_test.rb +0 -8
  106. data/test/mysql2_proxy/import_test.rb +0 -6
  107. data/test/mysqlspatial2/import_test.rb +0 -8
  108. data/test/postgis/import_test.rb +0 -10
  109. data/test/postgresql/import_test.rb +0 -6
  110. data/test/postgresql_proxy/import_test.rb +0 -6
  111. data/test/schema/generic_schema.rb +0 -230
  112. data/test/schema/jdbcpostgresql_schema.rb +0 -3
  113. data/test/schema/mysql2_schema.rb +0 -21
  114. data/test/schema/postgis_schema.rb +0 -3
  115. data/test/schema/postgresql_schema.rb +0 -94
  116. data/test/schema/sqlite3_schema.rb +0 -15
  117. data/test/schema/version.rb +0 -12
  118. data/test/sqlite3/import_test.rb +0 -6
  119. data/test/support/active_support/test_case_extensions.rb +0 -73
  120. data/test/support/assertions.rb +0 -75
  121. data/test/support/factories.rb +0 -66
  122. data/test/support/generate.rb +0 -31
  123. data/test/support/mysql/import_examples.rb +0 -97
  124. data/test/support/postgresql/import_examples.rb +0 -642
  125. data/test/support/shared_examples/on_duplicate_key_ignore.rb +0 -45
  126. data/test/support/shared_examples/on_duplicate_key_update.rb +0 -437
  127. data/test/support/shared_examples/recursive_import.rb +0 -352
  128. data/test/support/sqlite3/import_examples.rb +0 -232
  129. data/test/synchronize_test.rb +0 -43
  130. data/test/test_helper.rb +0 -91
  131. data/test/trilogy/import_test.rb +0 -7
  132. data/test/value_sets_bytes_parser_test.rb +0 -106
  133. data/test/value_sets_records_parser_test.rb +0 -34
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ActiveRecord
4
4
  module Import
5
- VERSION = "2.2.0"
5
+ VERSION = "2.3.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-import
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Dennis
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-05-27 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: activerecord
@@ -45,152 +44,45 @@ executables: []
45
44
  extensions: []
46
45
  extra_rdoc_files: []
47
46
  files:
48
- - ".github/workflows/test.yaml"
49
- - ".gitignore"
50
- - ".rubocop.yml"
51
- - ".rubocop_todo.yml"
52
- - Brewfile
53
47
  - CHANGELOG.md
54
- - Dockerfile
55
- - Gemfile
56
48
  - LICENSE
57
49
  - README.markdown
58
- - Rakefile
59
- - activerecord-import.gemspec
60
- - benchmarks/README
61
- - benchmarks/benchmark.rb
62
- - benchmarks/lib/base.rb
63
- - benchmarks/lib/cli_parser.rb
64
- - benchmarks/lib/float.rb
65
- - benchmarks/lib/mysql2_benchmark.rb
66
- - benchmarks/lib/output_to_csv.rb
67
- - benchmarks/lib/output_to_html.rb
68
- - benchmarks/models/test_innodb.rb
69
- - benchmarks/models/test_memory.rb
70
- - benchmarks/models/test_myisam.rb
71
- - benchmarks/schema/mysql2_schema.rb
72
- - docker-compose.yml
73
- - gemfiles/5.2.gemfile
74
- - gemfiles/6.0.gemfile
75
- - gemfiles/6.1.gemfile
76
- - gemfiles/7.0.gemfile
77
- - gemfiles/7.1.gemfile
78
- - gemfiles/7.2.gemfile
79
- - gemfiles/8.0.gemfile
80
50
  - lib/activerecord-import.rb
81
51
  - lib/activerecord-import/active_record/adapters/abstract_adapter.rb
82
52
  - lib/activerecord-import/active_record/adapters/jdbcmysql_adapter.rb
83
53
  - lib/activerecord-import/active_record/adapters/jdbcpostgresql_adapter.rb
84
54
  - lib/activerecord-import/active_record/adapters/jdbcsqlite3_adapter.rb
85
55
  - lib/activerecord-import/active_record/adapters/mysql2_adapter.rb
56
+ - lib/activerecord-import/active_record/adapters/mysql2_proxy_adapter.rb
86
57
  - lib/activerecord-import/active_record/adapters/postgresql_adapter.rb
58
+ - lib/activerecord-import/active_record/adapters/postgresql_proxy_adapter.rb
87
59
  - lib/activerecord-import/active_record/adapters/seamless_database_pool_adapter.rb
88
60
  - lib/activerecord-import/active_record/adapters/sqlite3_adapter.rb
61
+ - lib/activerecord-import/active_record/adapters/sqlite3_proxy_adapter.rb
89
62
  - lib/activerecord-import/active_record/adapters/trilogy_adapter.rb
63
+ - lib/activerecord-import/active_record/adapters/trilogy_proxy_adapter.rb
90
64
  - lib/activerecord-import/adapters/abstract_adapter.rb
65
+ - lib/activerecord-import/adapters/active_record_proxy_adapter.rb
91
66
  - lib/activerecord-import/adapters/em_mysql2_adapter.rb
92
67
  - lib/activerecord-import/adapters/mysql2_adapter.rb
68
+ - lib/activerecord-import/adapters/mysql2_proxy_adapter.rb
93
69
  - lib/activerecord-import/adapters/mysql_adapter.rb
94
70
  - lib/activerecord-import/adapters/postgresql_adapter.rb
71
+ - lib/activerecord-import/adapters/postgresql_proxy_adapter.rb
95
72
  - lib/activerecord-import/adapters/sqlite3_adapter.rb
73
+ - lib/activerecord-import/adapters/sqlite3_proxy_adapter.rb
96
74
  - lib/activerecord-import/adapters/trilogy_adapter.rb
75
+ - lib/activerecord-import/adapters/trilogy_proxy_adapter.rb
97
76
  - lib/activerecord-import/base.rb
98
77
  - lib/activerecord-import/import.rb
99
78
  - lib/activerecord-import/synchronize.rb
100
79
  - lib/activerecord-import/value_sets_parser.rb
101
80
  - lib/activerecord-import/version.rb
102
- - test/adapters/janus_mysql2.rb
103
- - test/adapters/janus_trilogy.rb
104
- - test/adapters/jdbcmysql.rb
105
- - test/adapters/jdbcpostgresql.rb
106
- - test/adapters/jdbcsqlite3.rb
107
- - test/adapters/makara_postgis.rb
108
- - test/adapters/mysql2.rb
109
- - test/adapters/mysql2_makara.rb
110
- - test/adapters/mysql2_proxy.rb
111
- - test/adapters/mysql2spatial.rb
112
- - test/adapters/postgis.rb
113
- - test/adapters/postgresql.rb
114
- - test/adapters/postgresql_makara.rb
115
- - test/adapters/postgresql_proxy.rb
116
- - test/adapters/seamless_database_pool.rb
117
- - test/adapters/spatialite.rb
118
- - test/adapters/sqlite3.rb
119
- - test/adapters/trilogy.rb
120
- - test/database.yml.sample
121
- - test/github/database.yml
122
- - test/import_test.rb
123
- - test/janus_mysql2/import_test.rb
124
- - test/janus_trilogy/import_test.rb
125
- - test/jdbcmysql/import_test.rb
126
- - test/jdbcpostgresql/import_test.rb
127
- - test/jdbcsqlite3/import_test.rb
128
- - test/makara_postgis/import_test.rb
129
- - test/models/account.rb
130
- - test/models/alarm.rb
131
- - test/models/animal.rb
132
- - test/models/author.rb
133
- - test/models/bike_maker.rb
134
- - test/models/book.rb
135
- - test/models/car.rb
136
- - test/models/card.rb
137
- - test/models/chapter.rb
138
- - test/models/composite_book.rb
139
- - test/models/composite_chapter.rb
140
- - test/models/customer.rb
141
- - test/models/deck.rb
142
- - test/models/dictionary.rb
143
- - test/models/discount.rb
144
- - test/models/end_note.rb
145
- - test/models/group.rb
146
- - test/models/order.rb
147
- - test/models/playing_card.rb
148
- - test/models/promotion.rb
149
- - test/models/question.rb
150
- - test/models/rule.rb
151
- - test/models/tag.rb
152
- - test/models/tag_alias.rb
153
- - test/models/topic.rb
154
- - test/models/user.rb
155
- - test/models/user_token.rb
156
- - test/models/vendor.rb
157
- - test/models/widget.rb
158
- - test/mysql2/import_test.rb
159
- - test/mysql2_makara/import_test.rb
160
- - test/mysql2_proxy/import_test.rb
161
- - test/mysqlspatial2/import_test.rb
162
- - test/postgis/import_test.rb
163
- - test/postgresql/import_test.rb
164
- - test/postgresql_proxy/import_test.rb
165
- - test/schema/generic_schema.rb
166
- - test/schema/jdbcpostgresql_schema.rb
167
- - test/schema/mysql2_schema.rb
168
- - test/schema/postgis_schema.rb
169
- - test/schema/postgresql_schema.rb
170
- - test/schema/sqlite3_schema.rb
171
- - test/schema/version.rb
172
- - test/sqlite3/import_test.rb
173
- - test/support/active_support/test_case_extensions.rb
174
- - test/support/assertions.rb
175
- - test/support/factories.rb
176
- - test/support/generate.rb
177
- - test/support/mysql/import_examples.rb
178
- - test/support/postgresql/import_examples.rb
179
- - test/support/shared_examples/on_duplicate_key_ignore.rb
180
- - test/support/shared_examples/on_duplicate_key_update.rb
181
- - test/support/shared_examples/recursive_import.rb
182
- - test/support/sqlite3/import_examples.rb
183
- - test/synchronize_test.rb
184
- - test/test_helper.rb
185
- - test/trilogy/import_test.rb
186
- - test/value_sets_bytes_parser_test.rb
187
- - test/value_sets_records_parser_test.rb
188
81
  homepage: https://github.com/zdennis/activerecord-import
189
82
  licenses:
190
83
  - MIT
191
84
  metadata:
192
85
  changelog_uri: https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md
193
- post_install_message:
194
86
  rdoc_options: []
195
87
  require_paths:
196
88
  - lib
@@ -205,94 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
97
  - !ruby/object:Gem::Version
206
98
  version: '0'
207
99
  requirements: []
208
- rubygems_version: 3.0.3.1
209
- signing_key:
100
+ rubygems_version: 4.0.0
210
101
  specification_version: 4
211
102
  summary: Bulk insert extension for ActiveRecord
212
- test_files:
213
- - test/adapters/janus_mysql2.rb
214
- - test/adapters/janus_trilogy.rb
215
- - test/adapters/jdbcmysql.rb
216
- - test/adapters/jdbcpostgresql.rb
217
- - test/adapters/jdbcsqlite3.rb
218
- - test/adapters/makara_postgis.rb
219
- - test/adapters/mysql2.rb
220
- - test/adapters/mysql2_makara.rb
221
- - test/adapters/mysql2_proxy.rb
222
- - test/adapters/mysql2spatial.rb
223
- - test/adapters/postgis.rb
224
- - test/adapters/postgresql.rb
225
- - test/adapters/postgresql_makara.rb
226
- - test/adapters/postgresql_proxy.rb
227
- - test/adapters/seamless_database_pool.rb
228
- - test/adapters/spatialite.rb
229
- - test/adapters/sqlite3.rb
230
- - test/adapters/trilogy.rb
231
- - test/database.yml.sample
232
- - test/github/database.yml
233
- - test/import_test.rb
234
- - test/janus_mysql2/import_test.rb
235
- - test/janus_trilogy/import_test.rb
236
- - test/jdbcmysql/import_test.rb
237
- - test/jdbcpostgresql/import_test.rb
238
- - test/jdbcsqlite3/import_test.rb
239
- - test/makara_postgis/import_test.rb
240
- - test/models/account.rb
241
- - test/models/alarm.rb
242
- - test/models/animal.rb
243
- - test/models/author.rb
244
- - test/models/bike_maker.rb
245
- - test/models/book.rb
246
- - test/models/car.rb
247
- - test/models/card.rb
248
- - test/models/chapter.rb
249
- - test/models/composite_book.rb
250
- - test/models/composite_chapter.rb
251
- - test/models/customer.rb
252
- - test/models/deck.rb
253
- - test/models/dictionary.rb
254
- - test/models/discount.rb
255
- - test/models/end_note.rb
256
- - test/models/group.rb
257
- - test/models/order.rb
258
- - test/models/playing_card.rb
259
- - test/models/promotion.rb
260
- - test/models/question.rb
261
- - test/models/rule.rb
262
- - test/models/tag.rb
263
- - test/models/tag_alias.rb
264
- - test/models/topic.rb
265
- - test/models/user.rb
266
- - test/models/user_token.rb
267
- - test/models/vendor.rb
268
- - test/models/widget.rb
269
- - test/mysql2/import_test.rb
270
- - test/mysql2_makara/import_test.rb
271
- - test/mysql2_proxy/import_test.rb
272
- - test/mysqlspatial2/import_test.rb
273
- - test/postgis/import_test.rb
274
- - test/postgresql/import_test.rb
275
- - test/postgresql_proxy/import_test.rb
276
- - test/schema/generic_schema.rb
277
- - test/schema/jdbcpostgresql_schema.rb
278
- - test/schema/mysql2_schema.rb
279
- - test/schema/postgis_schema.rb
280
- - test/schema/postgresql_schema.rb
281
- - test/schema/sqlite3_schema.rb
282
- - test/schema/version.rb
283
- - test/sqlite3/import_test.rb
284
- - test/support/active_support/test_case_extensions.rb
285
- - test/support/assertions.rb
286
- - test/support/factories.rb
287
- - test/support/generate.rb
288
- - test/support/mysql/import_examples.rb
289
- - test/support/postgresql/import_examples.rb
290
- - test/support/shared_examples/on_duplicate_key_ignore.rb
291
- - test/support/shared_examples/on_duplicate_key_update.rb
292
- - test/support/shared_examples/recursive_import.rb
293
- - test/support/sqlite3/import_examples.rb
294
- - test/synchronize_test.rb
295
- - test/test_helper.rb
296
- - test/trilogy/import_test.rb
297
- - test/value_sets_bytes_parser_test.rb
298
- - test/value_sets_records_parser_test.rb
103
+ test_files: []
@@ -1,165 +0,0 @@
1
- name: Test
2
- on: [push, pull_request]
3
- jobs:
4
- test:
5
- services:
6
- postgres:
7
- image: postgis/postgis:10-2.5
8
- env:
9
- POSTGRES_USER: postgres
10
- POSTGRES_PASSWORD: postgres
11
- ports:
12
- - 5432:5432
13
- # Set health checks to wait until postgres has started
14
- options: >-
15
- --health-cmd pg_isready
16
- --health-interval 10s
17
- --health-timeout 5s
18
- --health-retries 5
19
- mysql:
20
- image: mysql:5.7
21
- ports:
22
- - 3306:3306
23
- env:
24
- MYSQL_HOST: 127.0.0.1
25
- MYSQL_ROOT_PASSWORD: root
26
- MYSQL_USER: github
27
- MYSQL_PASSWORD: github
28
- MYSQL_DATABASE: activerecord_import_test
29
- options: >-
30
- --health-cmd "mysqladmin ping -h localhost"
31
- --health-interval 10s
32
- --health-timeout 5s
33
- --health-retries 5
34
- strategy:
35
- fail-fast: false
36
- matrix:
37
- ruby:
38
- - 3.3
39
- env:
40
- - AR_VERSION: '8.0'
41
- RUBYOPT: --enable-frozen-string-literal
42
- - AR_VERSION: '7.2'
43
- RUBYOPT: --enable-frozen-string-literal
44
- - AR_VERSION: '7.1'
45
- RUBYOPT: --enable-frozen-string-literal
46
- - AR_VERSION: '7.0'
47
- RUBYOPT: --enable-frozen-string-literal
48
- - AR_VERSION: 6.1
49
- RUBYOPT: --enable-frozen-string-literal
50
- include:
51
- - ruby: 3.2
52
- env:
53
- AR_VERSION: '8.0'
54
- - ruby: 3.2
55
- env:
56
- AR_VERSION: '7.2'
57
- - ruby: 3.2
58
- env:
59
- AR_VERSION: '7.1'
60
- - ruby: 3.2
61
- env:
62
- AR_VERSION: '7.0'
63
- - ruby: 3.2
64
- env:
65
- AR_VERSION: 6.1
66
- - ruby: 3.1
67
- env:
68
- AR_VERSION: '7.1'
69
- - ruby: 3.1
70
- env:
71
- AR_VERSION: '7.0'
72
- - ruby: 3.1
73
- env:
74
- AR_VERSION: 6.1
75
- - ruby: '3.0'
76
- env:
77
- AR_VERSION: '7.0'
78
- - ruby: '3.0'
79
- env:
80
- AR_VERSION: 6.1
81
- - ruby: jruby-9.4.8.0
82
- env:
83
- AR_VERSION: '7.0'
84
- - ruby: 2.7
85
- env:
86
- AR_VERSION: '7.0'
87
- - ruby: 2.7
88
- env:
89
- AR_VERSION: 6.1
90
- - ruby: 2.7
91
- env:
92
- AR_VERSION: '6.0'
93
- - ruby: jruby-9.3.15.0
94
- env:
95
- AR_VERSION: '6.1'
96
- - ruby: 2.6
97
- env:
98
- AR_VERSION: 5.2
99
- runs-on: ubuntu-latest
100
- env:
101
- AR_VERSION: ${{ matrix.env.AR_VERSION }}
102
- DB_DATABASE: activerecord_import_test
103
- steps:
104
- - uses: actions/checkout@v4
105
- - name: Install SQLite3 Development Library
106
- run: |
107
- sudo apt-get update
108
- sudo apt-get install libsqlite3-dev
109
- - uses: ruby/setup-ruby@v1
110
- with:
111
- ruby-version: ${{ matrix.ruby }}
112
- bundler-cache: true
113
- rubygems: latest
114
- - name: Set up databases
115
- run: |
116
- psql -h localhost -U postgres -c 'create database ${{ env.DB_DATABASE }};'
117
- psql -h localhost -U postgres -d ${{ env.DB_DATABASE }} -c 'create extension if not exists hstore;'
118
- psql -h localhost -U postgres -c 'create extension if not exists postgis;'
119
- psql -h localhost -U postgres -c 'create extension if not exists "uuid-ossp";'
120
- cp test/github/database.yml test/database.yml
121
- env:
122
- PGPASSWORD: postgres
123
- - name: Run tests with mysql2
124
- run: |
125
- bundle exec rake test:mysql2
126
- bundle exec rake test:mysql2_makara
127
- bundle exec rake test:mysql2spatial
128
- bundle exec rake test:mysql2_proxy
129
- bundle exec rake test:janus_mysql2
130
- - name: Run tests with postgresql
131
- run: |
132
- bundle exec rake test:postgis
133
- bundle exec rake test:postgresql
134
- bundle exec rake test:postgresql_makara
135
- bundle exec rake test:postgresql_proxy
136
- - name: Run tests with seamless_database_pool
137
- run: |
138
- bundle exec rake test:seamless_database_pool
139
- if: ${{ matrix.ruby < '3.0' }}
140
- - name: Run tests with sqlite
141
- run: |
142
- bundle exec rake test:spatialite
143
- bundle exec rake test:sqlite3
144
- - name: Run trilogy tests
145
- if: ${{ matrix.env.AR_VERSION >= '7.0' && !startsWith(matrix.ruby, 'jruby') }}
146
- run: |
147
- bundle exec rake test:trilogy
148
- bundle exec rake test:janus_trilogy
149
-
150
- lint:
151
- runs-on: ubuntu-latest
152
- env:
153
- AR_VERSION: '7.0'
154
- steps:
155
- - uses: actions/checkout@v4
156
- - name: Install SQLite3 Development Library
157
- run: |
158
- sudo apt-get update
159
- sudo apt-get install libsqlite3-dev
160
- - uses: ruby/setup-ruby@v1
161
- with:
162
- ruby-version: 3.0
163
- bundler-cache: true
164
- - name: Run Rubocop
165
- run: bundle exec rubocop
data/.gitignore DELETED
@@ -1,37 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## Idea
17
- .idea
18
-
19
- ## PROJECT::GENERAL
20
- coverage
21
- rdoc
22
- pkg
23
- *.gem
24
- *.lock
25
- .byebug_history
26
-
27
- ## PROJECT::SPECIFIC
28
- log/*.log
29
- test.db
30
- test/database.yml
31
- benchmarks/log/
32
-
33
- .ruby-*
34
- .bundle/
35
- .redcar/
36
- .rvmrc
37
- docsite/
data/.rubocop.yml DELETED
@@ -1,118 +0,0 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
- AllCops:
4
- TargetRubyVersion: 3.0.x
5
-
6
- Metrics/AbcSize:
7
- Enabled: false
8
-
9
- Metrics/BlockLength:
10
- Enabled: false
11
-
12
- Metrics/ClassLength:
13
- Enabled: false
14
-
15
- Metrics/CyclomaticComplexity:
16
- Enabled: false
17
-
18
- Metrics/MethodLength:
19
- Enabled: false
20
-
21
- Metrics/ModuleLength:
22
- Enabled: false
23
-
24
- Metrics/PerceivedComplexity:
25
- Enabled: false
26
-
27
- Style/CommentedKeyword:
28
- Enabled: false
29
-
30
- Style/ClassAndModuleChildren:
31
- Enabled: false
32
-
33
- Style/Documentation:
34
- Enabled: false
35
-
36
- Style/EvalWithLocation:
37
- Enabled: false
38
-
39
- Style/ExpandPathArguments:
40
- Enabled: false
41
-
42
- Style/GuardClause:
43
- Enabled: false
44
-
45
- Style/IfUnlessModifier:
46
- Enabled: false
47
-
48
- Style/NumericPredicate:
49
- Enabled: false
50
-
51
- Style/PercentLiteralDelimiters:
52
- Enabled: false
53
-
54
- Style/RedundantBegin:
55
- Enabled: false
56
-
57
- Style/SpecialGlobalVars:
58
- Enabled: false
59
-
60
- Style/StringLiterals:
61
- Enabled: false
62
-
63
- Style/SymbolArray:
64
- Enabled: false
65
-
66
- Style/TrailingCommaInArrayLiteral:
67
- Enabled: false
68
-
69
- Layout/ArgumentAlignment:
70
- Enabled: false
71
-
72
- Layout/ParameterAlignment:
73
- EnforcedStyle: with_fixed_indentation
74
-
75
- Layout/EndAlignment:
76
- EnforcedStyleAlignWith: variable
77
-
78
- Layout/ElseAlignment:
79
- Enabled: false
80
-
81
- Layout/EmptyLineAfterGuardClause:
82
- Enabled: false
83
-
84
- Layout/HeredocIndentation:
85
- Enabled: false
86
-
87
- Layout/SpaceInsideParens:
88
- Enabled: false
89
-
90
- Layout/SpaceInsidePercentLiteralDelimiters:
91
- Enabled: false
92
-
93
- Layout/LineLength:
94
- Enabled: false
95
-
96
- Lint/ErbNewArguments:
97
- Enabled: false
98
-
99
- Lint/MissingCopEnableDirective:
100
- Enabled: false
101
-
102
- Lint/PercentStringArray:
103
- Enabled: false
104
-
105
- Naming/HeredocDelimiterNaming:
106
- Enabled: false
107
-
108
- Naming/MethodParameterName:
109
- Enabled: false
110
-
111
- Security/YAMLLoad:
112
- Enabled: false
113
-
114
- Gemspec/RequiredRubyVersion:
115
- Enabled: false
116
-
117
- Bundler/OrderedGems:
118
- Enabled: false
data/.rubocop_todo.yml DELETED
@@ -1,30 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2023-02-15 00:58:14 UTC using RuboCop version 1.45.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 2
10
- Lint/RescueException:
11
- Exclude:
12
- - 'benchmarks/lib/cli_parser.rb'
13
- - 'test/import_test.rb'
14
-
15
- # Offense count: 3
16
- # This cop supports safe autocorrection (--autocorrect).
17
- # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods.
18
- Lint/UnusedMethodArgument:
19
- Exclude:
20
- - 'lib/activerecord-import/adapters/postgresql_adapter.rb'
21
- - 'lib/activerecord-import/import.rb'
22
-
23
- # Offense count: 2
24
- Style/CombinableLoops:
25
- Exclude:
26
- - 'test/support/shared_examples/recursive_import.rb'
27
-
28
- Naming/FileName:
29
- Exclude:
30
- - 'lib/activerecord-import.rb'
data/Brewfile DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- brew "mysql"
4
- brew "postgresql"
5
- brew "sqlite"
data/Dockerfile DELETED
@@ -1,23 +0,0 @@
1
- # Use the official Ruby 3.2 image as a base image
2
- ARG RUBY_VERSION=3.2
3
- FROM ruby:${RUBY_VERSION}-bullseye
4
-
5
- # Set the working directory
6
- WORKDIR /usr/src/app
7
-
8
- # Install system packages
9
- RUN apt-get update -qq && \
10
- apt-get install -y default-mysql-client postgresql postgresql-contrib vim && \
11
- apt-get clean
12
-
13
- # Set environment variables
14
- ENV AR_VERSION=7.0
15
-
16
- # Copy all files
17
- COPY . .
18
-
19
- # Move sample database.yml and install gems
20
- RUN mv test/database.yml.sample test/database.yml && \
21
- bundle install
22
-
23
- CMD ["irb"]