activerecord-import 2.1.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 (130) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -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_adapter.rb +1 -1
  14. data/lib/activerecord-import/adapters/sqlite3_proxy_adapter.rb +9 -0
  15. data/lib/activerecord-import/adapters/trilogy_proxy_adapter.rb +9 -0
  16. data/lib/activerecord-import/base.rb +2 -2
  17. data/lib/activerecord-import/import.rb +243 -211
  18. data/lib/activerecord-import/version.rb +1 -1
  19. metadata +13 -200
  20. data/.github/workflows/test.yaml +0 -161
  21. data/.gitignore +0 -37
  22. data/.rubocop.yml +0 -118
  23. data/.rubocop_todo.yml +0 -30
  24. data/Brewfile +0 -5
  25. data/Dockerfile +0 -23
  26. data/Gemfile +0 -63
  27. data/Rakefile +0 -73
  28. data/activerecord-import.gemspec +0 -28
  29. data/benchmarks/README +0 -32
  30. data/benchmarks/benchmark.rb +0 -72
  31. data/benchmarks/lib/base.rb +0 -143
  32. data/benchmarks/lib/cli_parser.rb +0 -111
  33. data/benchmarks/lib/float.rb +0 -17
  34. data/benchmarks/lib/mysql2_benchmark.rb +0 -21
  35. data/benchmarks/lib/output_to_csv.rb +0 -21
  36. data/benchmarks/lib/output_to_html.rb +0 -66
  37. data/benchmarks/models/test_innodb.rb +0 -5
  38. data/benchmarks/models/test_memory.rb +0 -5
  39. data/benchmarks/models/test_myisam.rb +0 -5
  40. data/benchmarks/schema/mysql2_schema.rb +0 -18
  41. data/docker-compose.yml +0 -34
  42. data/gemfiles/5.2.gemfile +0 -4
  43. data/gemfiles/6.0.gemfile +0 -4
  44. data/gemfiles/6.1.gemfile +0 -4
  45. data/gemfiles/7.0.gemfile +0 -4
  46. data/gemfiles/7.1.gemfile +0 -3
  47. data/gemfiles/7.2.gemfile +0 -3
  48. data/gemfiles/8.0.gemfile +0 -3
  49. data/test/adapters/jdbcmysql.rb +0 -3
  50. data/test/adapters/jdbcpostgresql.rb +0 -3
  51. data/test/adapters/jdbcsqlite3.rb +0 -3
  52. data/test/adapters/makara_postgis.rb +0 -3
  53. data/test/adapters/mysql2.rb +0 -3
  54. data/test/adapters/mysql2_makara.rb +0 -3
  55. data/test/adapters/mysql2_proxy.rb +0 -3
  56. data/test/adapters/mysql2spatial.rb +0 -3
  57. data/test/adapters/postgis.rb +0 -3
  58. data/test/adapters/postgresql.rb +0 -3
  59. data/test/adapters/postgresql_makara.rb +0 -3
  60. data/test/adapters/postgresql_proxy.rb +0 -3
  61. data/test/adapters/seamless_database_pool.rb +0 -3
  62. data/test/adapters/spatialite.rb +0 -3
  63. data/test/adapters/sqlite3.rb +0 -3
  64. data/test/adapters/trilogy.rb +0 -11
  65. data/test/database.yml.sample +0 -65
  66. data/test/github/database.yml +0 -78
  67. data/test/import_test.rb +0 -970
  68. data/test/jdbcmysql/import_test.rb +0 -7
  69. data/test/jdbcpostgresql/import_test.rb +0 -6
  70. data/test/jdbcsqlite3/import_test.rb +0 -6
  71. data/test/makara_postgis/import_test.rb +0 -10
  72. data/test/models/account.rb +0 -5
  73. data/test/models/alarm.rb +0 -4
  74. data/test/models/animal.rb +0 -8
  75. data/test/models/author.rb +0 -9
  76. data/test/models/bike_maker.rb +0 -10
  77. data/test/models/book.rb +0 -18
  78. data/test/models/car.rb +0 -5
  79. data/test/models/card.rb +0 -5
  80. data/test/models/chapter.rb +0 -6
  81. data/test/models/composite_book.rb +0 -19
  82. data/test/models/composite_chapter.rb +0 -12
  83. data/test/models/customer.rb +0 -18
  84. data/test/models/deck.rb +0 -8
  85. data/test/models/dictionary.rb +0 -6
  86. data/test/models/discount.rb +0 -5
  87. data/test/models/end_note.rb +0 -6
  88. data/test/models/group.rb +0 -5
  89. data/test/models/order.rb +0 -17
  90. data/test/models/playing_card.rb +0 -4
  91. data/test/models/promotion.rb +0 -5
  92. data/test/models/question.rb +0 -5
  93. data/test/models/rule.rb +0 -5
  94. data/test/models/tag.rb +0 -12
  95. data/test/models/tag_alias.rb +0 -11
  96. data/test/models/topic.rb +0 -31
  97. data/test/models/user.rb +0 -5
  98. data/test/models/user_token.rb +0 -6
  99. data/test/models/vendor.rb +0 -9
  100. data/test/models/widget.rb +0 -33
  101. data/test/mysql2/import_test.rb +0 -7
  102. data/test/mysql2_makara/import_test.rb +0 -8
  103. data/test/mysql2_proxy/import_test.rb +0 -6
  104. data/test/mysqlspatial2/import_test.rb +0 -8
  105. data/test/postgis/import_test.rb +0 -10
  106. data/test/postgresql/import_test.rb +0 -6
  107. data/test/postgresql_proxy/import_test.rb +0 -6
  108. data/test/schema/generic_schema.rb +0 -230
  109. data/test/schema/jdbcpostgresql_schema.rb +0 -3
  110. data/test/schema/mysql2_schema.rb +0 -21
  111. data/test/schema/postgis_schema.rb +0 -3
  112. data/test/schema/postgresql_schema.rb +0 -94
  113. data/test/schema/sqlite3_schema.rb +0 -15
  114. data/test/schema/version.rb +0 -12
  115. data/test/sqlite3/import_test.rb +0 -6
  116. data/test/support/active_support/test_case_extensions.rb +0 -73
  117. data/test/support/assertions.rb +0 -75
  118. data/test/support/factories.rb +0 -66
  119. data/test/support/generate.rb +0 -31
  120. data/test/support/mysql/import_examples.rb +0 -97
  121. data/test/support/postgresql/import_examples.rb +0 -642
  122. data/test/support/shared_examples/on_duplicate_key_ignore.rb +0 -45
  123. data/test/support/shared_examples/on_duplicate_key_update.rb +0 -437
  124. data/test/support/shared_examples/recursive_import.rb +0 -352
  125. data/test/support/sqlite3/import_examples.rb +0 -232
  126. data/test/synchronize_test.rb +0 -43
  127. data/test/test_helper.rb +0 -91
  128. data/test/trilogy/import_test.rb +0 -7
  129. data/test/value_sets_bytes_parser_test.rb +0 -106
  130. 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.1.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.1.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-02-03 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,148 +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/jdbcmysql.rb
103
- - test/adapters/jdbcpostgresql.rb
104
- - test/adapters/jdbcsqlite3.rb
105
- - test/adapters/makara_postgis.rb
106
- - test/adapters/mysql2.rb
107
- - test/adapters/mysql2_makara.rb
108
- - test/adapters/mysql2_proxy.rb
109
- - test/adapters/mysql2spatial.rb
110
- - test/adapters/postgis.rb
111
- - test/adapters/postgresql.rb
112
- - test/adapters/postgresql_makara.rb
113
- - test/adapters/postgresql_proxy.rb
114
- - test/adapters/seamless_database_pool.rb
115
- - test/adapters/spatialite.rb
116
- - test/adapters/sqlite3.rb
117
- - test/adapters/trilogy.rb
118
- - test/database.yml.sample
119
- - test/github/database.yml
120
- - test/import_test.rb
121
- - test/jdbcmysql/import_test.rb
122
- - test/jdbcpostgresql/import_test.rb
123
- - test/jdbcsqlite3/import_test.rb
124
- - test/makara_postgis/import_test.rb
125
- - test/models/account.rb
126
- - test/models/alarm.rb
127
- - test/models/animal.rb
128
- - test/models/author.rb
129
- - test/models/bike_maker.rb
130
- - test/models/book.rb
131
- - test/models/car.rb
132
- - test/models/card.rb
133
- - test/models/chapter.rb
134
- - test/models/composite_book.rb
135
- - test/models/composite_chapter.rb
136
- - test/models/customer.rb
137
- - test/models/deck.rb
138
- - test/models/dictionary.rb
139
- - test/models/discount.rb
140
- - test/models/end_note.rb
141
- - test/models/group.rb
142
- - test/models/order.rb
143
- - test/models/playing_card.rb
144
- - test/models/promotion.rb
145
- - test/models/question.rb
146
- - test/models/rule.rb
147
- - test/models/tag.rb
148
- - test/models/tag_alias.rb
149
- - test/models/topic.rb
150
- - test/models/user.rb
151
- - test/models/user_token.rb
152
- - test/models/vendor.rb
153
- - test/models/widget.rb
154
- - test/mysql2/import_test.rb
155
- - test/mysql2_makara/import_test.rb
156
- - test/mysql2_proxy/import_test.rb
157
- - test/mysqlspatial2/import_test.rb
158
- - test/postgis/import_test.rb
159
- - test/postgresql/import_test.rb
160
- - test/postgresql_proxy/import_test.rb
161
- - test/schema/generic_schema.rb
162
- - test/schema/jdbcpostgresql_schema.rb
163
- - test/schema/mysql2_schema.rb
164
- - test/schema/postgis_schema.rb
165
- - test/schema/postgresql_schema.rb
166
- - test/schema/sqlite3_schema.rb
167
- - test/schema/version.rb
168
- - test/sqlite3/import_test.rb
169
- - test/support/active_support/test_case_extensions.rb
170
- - test/support/assertions.rb
171
- - test/support/factories.rb
172
- - test/support/generate.rb
173
- - test/support/mysql/import_examples.rb
174
- - test/support/postgresql/import_examples.rb
175
- - test/support/shared_examples/on_duplicate_key_ignore.rb
176
- - test/support/shared_examples/on_duplicate_key_update.rb
177
- - test/support/shared_examples/recursive_import.rb
178
- - test/support/sqlite3/import_examples.rb
179
- - test/synchronize_test.rb
180
- - test/test_helper.rb
181
- - test/trilogy/import_test.rb
182
- - test/value_sets_bytes_parser_test.rb
183
- - test/value_sets_records_parser_test.rb
184
81
  homepage: https://github.com/zdennis/activerecord-import
185
82
  licenses:
186
83
  - MIT
187
84
  metadata:
188
85
  changelog_uri: https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md
189
- post_install_message:
190
86
  rdoc_options: []
191
87
  require_paths:
192
88
  - lib
@@ -201,90 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
97
  - !ruby/object:Gem::Version
202
98
  version: '0'
203
99
  requirements: []
204
- rubygems_version: 3.0.3.1
205
- signing_key:
100
+ rubygems_version: 4.0.0
206
101
  specification_version: 4
207
102
  summary: Bulk insert extension for ActiveRecord
208
- test_files:
209
- - test/adapters/jdbcmysql.rb
210
- - test/adapters/jdbcpostgresql.rb
211
- - test/adapters/jdbcsqlite3.rb
212
- - test/adapters/makara_postgis.rb
213
- - test/adapters/mysql2.rb
214
- - test/adapters/mysql2_makara.rb
215
- - test/adapters/mysql2_proxy.rb
216
- - test/adapters/mysql2spatial.rb
217
- - test/adapters/postgis.rb
218
- - test/adapters/postgresql.rb
219
- - test/adapters/postgresql_makara.rb
220
- - test/adapters/postgresql_proxy.rb
221
- - test/adapters/seamless_database_pool.rb
222
- - test/adapters/spatialite.rb
223
- - test/adapters/sqlite3.rb
224
- - test/adapters/trilogy.rb
225
- - test/database.yml.sample
226
- - test/github/database.yml
227
- - test/import_test.rb
228
- - test/jdbcmysql/import_test.rb
229
- - test/jdbcpostgresql/import_test.rb
230
- - test/jdbcsqlite3/import_test.rb
231
- - test/makara_postgis/import_test.rb
232
- - test/models/account.rb
233
- - test/models/alarm.rb
234
- - test/models/animal.rb
235
- - test/models/author.rb
236
- - test/models/bike_maker.rb
237
- - test/models/book.rb
238
- - test/models/car.rb
239
- - test/models/card.rb
240
- - test/models/chapter.rb
241
- - test/models/composite_book.rb
242
- - test/models/composite_chapter.rb
243
- - test/models/customer.rb
244
- - test/models/deck.rb
245
- - test/models/dictionary.rb
246
- - test/models/discount.rb
247
- - test/models/end_note.rb
248
- - test/models/group.rb
249
- - test/models/order.rb
250
- - test/models/playing_card.rb
251
- - test/models/promotion.rb
252
- - test/models/question.rb
253
- - test/models/rule.rb
254
- - test/models/tag.rb
255
- - test/models/tag_alias.rb
256
- - test/models/topic.rb
257
- - test/models/user.rb
258
- - test/models/user_token.rb
259
- - test/models/vendor.rb
260
- - test/models/widget.rb
261
- - test/mysql2/import_test.rb
262
- - test/mysql2_makara/import_test.rb
263
- - test/mysql2_proxy/import_test.rb
264
- - test/mysqlspatial2/import_test.rb
265
- - test/postgis/import_test.rb
266
- - test/postgresql/import_test.rb
267
- - test/postgresql_proxy/import_test.rb
268
- - test/schema/generic_schema.rb
269
- - test/schema/jdbcpostgresql_schema.rb
270
- - test/schema/mysql2_schema.rb
271
- - test/schema/postgis_schema.rb
272
- - test/schema/postgresql_schema.rb
273
- - test/schema/sqlite3_schema.rb
274
- - test/schema/version.rb
275
- - test/sqlite3/import_test.rb
276
- - test/support/active_support/test_case_extensions.rb
277
- - test/support/assertions.rb
278
- - test/support/factories.rb
279
- - test/support/generate.rb
280
- - test/support/mysql/import_examples.rb
281
- - test/support/postgresql/import_examples.rb
282
- - test/support/shared_examples/on_duplicate_key_ignore.rb
283
- - test/support/shared_examples/on_duplicate_key_update.rb
284
- - test/support/shared_examples/recursive_import.rb
285
- - test/support/sqlite3/import_examples.rb
286
- - test/synchronize_test.rb
287
- - test/test_helper.rb
288
- - test/trilogy/import_test.rb
289
- - test/value_sets_bytes_parser_test.rb
290
- - test/value_sets_records_parser_test.rb
103
+ test_files: []
@@ -1,161 +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
- - name: Run tests with postgresql
130
- run: |
131
- bundle exec rake test:postgis
132
- bundle exec rake test:postgresql
133
- bundle exec rake test:postgresql_makara
134
- bundle exec rake test:postgresql_proxy
135
- - name: Run tests with seamless_database_pool
136
- run: |
137
- bundle exec rake test:seamless_database_pool
138
- if: ${{ matrix.ruby < '3.0' }}
139
- - name: Run tests with sqlite
140
- run: |
141
- bundle exec rake test:spatialite
142
- bundle exec rake test:sqlite3
143
- - name: Run trilogy tests
144
- if: ${{ matrix.env.AR_VERSION >= '7.0' && !startsWith(matrix.ruby, 'jruby') }}
145
- run: bundle exec rake test:trilogy
146
- lint:
147
- runs-on: ubuntu-latest
148
- env:
149
- AR_VERSION: '7.0'
150
- steps:
151
- - uses: actions/checkout@v4
152
- - name: Install SQLite3 Development Library
153
- run: |
154
- sudo apt-get update
155
- sudo apt-get install libsqlite3-dev
156
- - uses: ruby/setup-ruby@v1
157
- with:
158
- ruby-version: 3.0
159
- bundler-cache: true
160
- - name: Run Rubocop
161
- 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/LineLength:
19
- Enabled: false
20
-
21
- Metrics/MethodLength:
22
- Enabled: false
23
-
24
- Metrics/ModuleLength:
25
- Enabled: false
26
-
27
- Metrics/PerceivedComplexity:
28
- Enabled: false
29
-
30
- Style/CommentedKeyword:
31
- Enabled: false
32
-
33
- Style/ClassAndModuleChildren:
34
- Enabled: false
35
-
36
- Style/Documentation:
37
- Enabled: false
38
-
39
- Style/EvalWithLocation:
40
- Enabled: false
41
-
42
- Style/ExpandPathArguments:
43
- Enabled: false
44
-
45
- Style/GuardClause:
46
- Enabled: false
47
-
48
- Style/IfUnlessModifier:
49
- Enabled: false
50
-
51
- Style/NumericPredicate:
52
- Enabled: false
53
-
54
- Style/PercentLiteralDelimiters:
55
- Enabled: false
56
-
57
- Style/RedundantBegin:
58
- Enabled: false
59
-
60
- Style/SpecialGlobalVars:
61
- Enabled: false
62
-
63
- Style/StringLiterals:
64
- Enabled: false
65
-
66
- Style/SymbolArray:
67
- Enabled: false
68
-
69
- Style/TrailingCommaInArrayLiteral:
70
- Enabled: false
71
-
72
- Layout/ArgumentAlignment:
73
- Enabled: false
74
-
75
- Layout/ParameterAlignment:
76
- EnforcedStyle: with_fixed_indentation
77
-
78
- Layout/EndAlignment:
79
- EnforcedStyleAlignWith: variable
80
-
81
- Layout/ElseAlignment:
82
- Enabled: false
83
-
84
- Layout/EmptyLineAfterGuardClause:
85
- Enabled: false
86
-
87
- Layout/HeredocIndentation:
88
- Enabled: false
89
-
90
- Layout/SpaceInsideParens:
91
- Enabled: false
92
-
93
- Layout/SpaceInsidePercentLiteralDelimiters:
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"]