upsert 2.1.0 → 2.9.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +5 -5
  2. data/.ruby-version +1 -0
  3. data/.standard.yml +1 -0
  4. data/.travis.yml +60 -12
  5. data/CHANGELOG +39 -0
  6. data/Gemfile +12 -1
  7. data/LICENSE +3 -1
  8. data/README.md +47 -6
  9. data/Rakefile +7 -1
  10. data/lib/upsert.rb +54 -11
  11. data/lib/upsert/column_definition/mysql.rb +2 -2
  12. data/lib/upsert/column_definition/postgresql.rb +9 -8
  13. data/lib/upsert/column_definition/sqlite3.rb +3 -3
  14. data/lib/upsert/connection/Java_ComMysqlJdbc_JDBC4Connection.rb +11 -5
  15. data/lib/upsert/connection/Java_OrgPostgresqlJdbc_PgConnection.rb +33 -0
  16. data/lib/upsert/connection/PG_Connection.rb +10 -1
  17. data/lib/upsert/connection/jdbc.rb +20 -1
  18. data/lib/upsert/connection/postgresql.rb +2 -3
  19. data/lib/upsert/merge_function.rb +5 -4
  20. data/lib/upsert/merge_function/Java_OrgPostgresqlJdbc_PgConnection.rb +27 -0
  21. data/lib/upsert/merge_function/PG_Connection.rb +11 -42
  22. data/lib/upsert/merge_function/postgresql.rb +215 -1
  23. data/lib/upsert/merge_function/sqlite3.rb +10 -0
  24. data/lib/upsert/version.rb +1 -1
  25. data/spec/active_record_upsert_spec.rb +10 -0
  26. data/spec/correctness_spec.rb +34 -5
  27. data/spec/database_functions_spec.rb +16 -9
  28. data/spec/database_spec.rb +7 -0
  29. data/spec/hstore_spec.rb +56 -55
  30. data/spec/jruby_spec.rb +9 -0
  31. data/spec/logger_spec.rb +8 -6
  32. data/spec/postgresql_spec.rb +94 -0
  33. data/spec/reserved_words_spec.rb +21 -17
  34. data/spec/sequel_spec.rb +26 -7
  35. data/spec/spec_helper.rb +251 -92
  36. data/spec/speed_spec.rb +3 -32
  37. data/spec/threaded_spec.rb +35 -12
  38. data/spec/type_safety_spec.rb +2 -1
  39. data/travis/install_postgres.sh +18 -0
  40. data/travis/run_docker_db.sh +20 -0
  41. data/travis/tune_mysql.sh +7 -0
  42. data/upsert-java.gemspec +13 -0
  43. data/upsert.gemspec +9 -57
  44. data/upsert.gemspec.common +107 -0
  45. metadata +53 -40
  46. data/lib/upsert/connection/Java_OrgPostgresqlJdbc4_Jdbc4Connection.rb +0 -15
  47. data/lib/upsert/merge_function/Java_OrgPostgresqlJdbc4_Jdbc4Connection.rb +0 -39
data/spec/speed_spec.rb CHANGED
@@ -6,7 +6,7 @@ describe Upsert do
6
6
  assert_faster_than 'find + new/set/save', lotsa_records do |records|
7
7
  records.each do |selector, setter|
8
8
  if pet = Pet.where(selector).first
9
- pet.update_attributes setter, :without_protection => true
9
+ pet.update_attributes(setter)
10
10
  else
11
11
  pet = Pet.new
12
12
  selector.each do |k, v|
@@ -24,50 +24,21 @@ describe Upsert do
24
24
  assert_faster_than 'find_or_create + update_attributes', lotsa_records do |records|
25
25
  dynamic_method = nil
26
26
  records.each do |selector, setter|
27
- dynamic_method ||= "find_or_create_by_#{selector.keys.join('_or_')}"
28
- pet = Pet.send(dynamic_method, *selector.values)
29
- pet.update_attributes setter, :without_protection => true
27
+ Pet.find_or_create_by(selector).update_attributes(setter)
30
28
  end
31
29
  end
32
30
  end
33
31
  it "is faster than create + rescue/find/update" do
34
32
  assert_faster_than 'create + rescue/find/update', lotsa_records do |records|
35
- dynamic_method = nil
36
33
  records.each do |selector, setter|
37
- dynamic_method ||= "find_or_create_by_#{selector.keys.join('_or_')}"
38
34
  begin
39
35
  Pet.create selector.merge(setter), :without_protection => true
40
36
  rescue
41
- pet = Pet.send(dynamic_method, *selector.values)
42
- pet.update_attributes setter, :without_protection => true
43
- end
44
- end
45
- end
46
- end
47
- end
48
-
49
- if ENV['DB'] == 'mysql' && RUBY_VERSION >= '1.9'
50
- describe 'compared to activerecord-import' do
51
- it "is faster than faking upserts with activerecord-import" do
52
- assert_faster_than 'faking upserts with activerecord-import', lotsa_records do |records|
53
- columns = nil
54
- all_values = []
55
- records.each do |selector, setter|
56
- columns ||= (selector.keys + setter.keys).uniq
57
- all_values << columns.map do |k|
58
- if setter.has_key?(k)
59
- # prefer the setter so that you can change rows
60
- setter[k]
61
- else
62
- selector[k]
63
- end
64
- end
37
+ Pet.find_or_create_by(selector).update_attributes(setter)
65
38
  end
66
- Pet.import columns, all_values, :timestamps => false, :on_duplicate_key_update => columns
67
39
  end
68
40
  end
69
41
  end
70
42
  end
71
-
72
43
  end
73
44
  end
@@ -1,18 +1,21 @@
1
1
  require 'spec_helper'
2
2
  describe Upsert do
3
+ Thread.abort_on_exception = true
3
4
  describe "is thread-safe" do
4
5
  it "is safe to use one-by-one" do
5
6
  upsert = Upsert.new $conn, :pets
6
7
  assert_creates(Pet, [{:name => 'Jerry', :gender => 'neutered'}]) do
7
8
  ts = []
8
9
  10.times do
9
- ts << Thread.new do
10
- sleep 0.2
11
- upsert.row({:name => 'Jerry'}, :gender => 'male')
12
- upsert.row({:name => 'Jerry'}, :gender => 'neutered')
13
- end
14
- ts.each { |t| t.join }
10
+ ts << Thread.new {
11
+ ActiveRecord::Base.connection_pool.with_connection do |conn|
12
+ sleep 0.2
13
+ upsert.row({name: "Jerry"}, gender: "male")
14
+ upsert.row({name: "Jerry"}, gender: "neutered")
15
+ end
16
+ }
15
17
  end
18
+ ts.each { |t| t.join(3) }
16
19
  end
17
20
  end
18
21
  it "is safe to use batch" do
@@ -20,14 +23,34 @@ describe Upsert do
20
23
  Upsert.batch($conn, :pets) do |upsert|
21
24
  ts = []
22
25
  10.times do
23
- ts << Thread.new do
24
- sleep 0.2
25
- upsert.row({:name => 'Jerry'}, :gender => 'male')
26
- upsert.row({:name => 'Jerry'}, :gender => 'neutered')
27
- end
28
- ts.each { |t| t.join }
26
+ ts << Thread.new {
27
+ ActiveRecord::Base.connection_pool.with_connection do |conn|
28
+ sleep 0.2
29
+ upsert.row({name: "Jerry"}, gender: "male")
30
+ upsert.row({name: "Jerry"}, gender: "neutered")
31
+ end
32
+ }
29
33
  end
34
+ ts.each { |t| t.join(3) }
35
+ end
36
+ end
37
+ end
38
+
39
+ it "is safe to use with the entire block instead the thread" do
40
+ assert_creates(Pet, [{name: "Jerry", gender: "neutered"}]) do
41
+ ts = []
42
+ 10.times do
43
+ ts << Thread.new {
44
+ ActiveRecord::Base.connection_pool.with_connection do |conn|
45
+ sleep 0.1
46
+ Upsert.batch(conn, :pets) do |upsert|
47
+ upsert.row({name: "Jerry"}, gender: "male")
48
+ upsert.row({name: "Jerry"}, gender: "neutered")
49
+ end
50
+ end
51
+ }
30
52
  end
53
+ ts.each { |t| t.join(3) }
31
54
  end
32
55
  end
33
56
  end
@@ -2,10 +2,11 @@ require 'spec_helper'
2
2
  describe Upsert do
3
3
  describe "type safety" do
4
4
  it "does not attempt to typecast values" do
5
+ error_class = RUBY_PLATFORM == 'java' ? org.postgresql.util.PSQLException : PG::InvalidTextRepresentation
5
6
  upsert = Upsert.new $conn, :pets
6
7
  lambda do
7
8
  upsert.row :tag_number => ''
8
- end.should raise_error
9
+ end.should raise_error error_class
9
10
  end
10
11
  end
11
12
  end if ENV['DB'] == 'postgresql'
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+ # Ref https://github.com/clkao/plv8x/blob/master/.travis.yml
3
+ echo "Install postgres version $PGVERSION"
4
+ psql --version
5
+ sudo /etc/init.d/postgresql stop
6
+ sudo apt-get -y --purge remove postgresql libpq-dev libpq5 postgresql-client-common postgresql-common
7
+ sudo rm -rf /var/lib/postgresql
8
+ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
9
+ sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main $PGVERSION >> /etc/apt/sources.list.d/postgresql.list"
10
+ sudo sh -c "echo deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg-testing main $PGVERSION >> /etc/apt/sources.list.d/postgresql.list"
11
+ sudo apt-get update -qq
12
+ sudo apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::="--force-confnew" install postgresql-$PGVERSION postgresql-server-dev-$PGVERSION postgresql-$PGVERSION-plv8
13
+ sudo chmod 777 /etc/postgresql/$PGVERSION/main/pg_hba.conf
14
+ sudo echo "local all postgres trust" > /etc/postgresql/$PGVERSION/main/pg_hba.conf
15
+ sudo echo "local all all trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
16
+ sudo echo "host all all 127.0.0.1/32 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
17
+ sudo echo "host all all ::1/128 trust" >> /etc/postgresql/$PGVERSION/main/pg_hba.conf
18
+ sudo /etc/init.d/postgresql restart
@@ -0,0 +1,20 @@
1
+ docker network create -d bridge --subnet 172.25.0.0/16 --gateway 172.25.0.1 upsert_test
2
+
3
+ case "$DB" in
4
+ postgresql)
5
+ docker run --tmpfs /var/lib/postgresql/data:rw --rm --name upsert_test_db_server \
6
+ -e POSTGRES_USER=$DB_USER -e POSTGRES_PASSWORD=$DB_PASSWORD -e POSTGRES_DB=$DB_NAME \
7
+ -p 5432:5432 -d \
8
+ $DB_VERSION
9
+ sleep 10
10
+ ;;
11
+ mysql)
12
+ docker run --network upsert_test --ip 172.25.0.2 --tmpfs /var/lib/mysql:rw --rm --name upsert_test_db_server \
13
+ -e MYSQL_ROOT_PASSWORD=root -e MYSQL_USER=$DB_USER -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_NAME \
14
+ -p 3306:3306 -d \
15
+ $DB_VERSION \
16
+ --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password --default-time-zone=+00:00
17
+ sleep 10
18
+ docker run --network upsert_test --rm $DB_VERSION mysql -h172.25.0.2 -uroot -proot -e "GRANT ALL ON *.* TO '$DB_USER'"
19
+ ;;
20
+ esac
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+ # Ref https://github.com/travis-ci/travis-ci/issues/2250
3
+ # Ref https://github.com/jruby/activerecord-jdbc-adapter/issues/481
4
+ # JDBC adapters determine the encoding automatically via the server's charset and collation
5
+ echo "Tuning MySQL"
6
+ echo -e "[server]\ncharacter-set-server=utf8mb4\ncollation-server=utf8mb4_unicode_ci\n" | sudo tee -a /etc/mysql/my.cnf
7
+ sudo service mysql restart
@@ -0,0 +1,13 @@
1
+ Gem::Specification.load(File.expand_path("upsert.gemspec.common", __dir__)).dup.tap do |gem|
2
+ gem.instance_exec do
3
+ self.name = "upsert"
4
+ self.platform = "java"
5
+ add_development_dependency "jruby-openssl"
6
+ add_development_dependency "jdbc-postgres"
7
+ add_development_dependency "jdbc-mysql"
8
+ add_development_dependency "jdbc-sqlite3"
9
+ add_development_dependency "activerecord-jdbc-adapter"
10
+
11
+ add_development_dependency "pry-nav"
12
+ end
13
+ end
data/upsert.gemspec CHANGED
@@ -1,59 +1,11 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/upsert/version', __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.authors = ["Seamus Abshere"]
6
- gem.email = ["seamus@abshere.net"]
7
- t = %{Make it easy to upsert on MySQL, PostgreSQL, and SQLite3. Transparently creates merge functions for MySQL and PostgreSQL; on SQLite3, uses INSERT OR IGNORE.}
8
- gem.description = t
9
- gem.summary = t
10
- gem.homepage = "https://github.com/seamusabshere/upsert"
11
-
12
- gem.files = `git ls-files`.split($\)
13
- gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
14
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
15
- gem.name = "upsert"
16
- gem.require_paths = ["lib"]
17
- gem.version = Upsert::VERSION
18
-
19
- # NOTE: no runtime dependencies!
20
-
21
- gem.add_development_dependency 'rspec-core'
22
- gem.add_development_dependency 'rspec-expectations'
23
- gem.add_development_dependency 'rspec-mocks'
24
-
25
- gem.add_development_dependency 'activerecord', '~>3'
26
- gem.add_development_dependency 'active_record_inline_schema'
27
- gem.add_development_dependency 'faker'
28
- gem.add_development_dependency 'yard'
29
- gem.add_development_dependency 'pry'
30
- gem.add_development_dependency 'pg-hstore', ">=1.1.3"
31
- gem.add_development_dependency 'sequel'
32
- gem.add_development_dependency 'rake', '~>10.1.1'
33
-
34
- if RUBY_VERSION >= '1.9'
35
- gem.add_development_dependency 'activerecord-import'
36
- else
37
- gem.add_development_dependency 'orderedhash'
38
- end
39
-
40
- if RUBY_PLATFORM == 'java'
41
- gem.add_development_dependency 'jruby-openssl'
42
- gem.add_development_dependency 'jdbc-postgres'
43
- gem.add_development_dependency 'jdbc-mysql'
44
- gem.add_development_dependency 'jdbc-sqlite3'
45
- gem.add_development_dependency 'activerecord-jdbcsqlite3-adapter'
46
- gem.add_development_dependency 'activerecord-jdbcmysql-adapter'
47
- gem.add_development_dependency 'activerecord-jdbcpostgresql-adapter'
48
- else
49
- gem.add_development_dependency 'sqlite3'
50
- gem.add_development_dependency 'mysql2'
51
- gem.add_development_dependency 'pg'
52
- # github-flavored markdown
53
- if RUBY_VERSION >= '1.9'
54
- gem.add_development_dependency 'redcarpet'
55
- else
56
- gem.add_development_dependency 'redcarpet', '~> 2.3.0'
57
- end
1
+ Gem::Specification.load(File.expand_path("upsert.gemspec.common", __dir__)).dup.tap do |gem|
2
+ gem.instance_exec do
3
+ self.name = "upsert"
4
+ add_development_dependency "activerecord-postgresql-adapter"
5
+ add_development_dependency "sqlite3"
6
+ add_development_dependency "mysql2", "~> 0.5"
7
+ add_development_dependency "pg", "~> 1.1"
8
+
9
+ add_development_dependency "pry-byebug"
58
10
  end
59
11
  end
@@ -0,0 +1,107 @@
1
+ require File.expand_path("../lib/upsert/version", __FILE__)
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.authors = ["Seamus Abshere", "Phil Schalm"]
5
+ gem.email = ["seamus@abshere.net", "pnomolos@gmail.com"]
6
+ t = %{Make it easy to upsert on MySQL, PostgreSQL, and SQLite3. Transparently creates merge functions for MySQL and PostgreSQL; on SQLite3, uses INSERT OR IGNORE.}
7
+ gem.description = t
8
+ gem.summary = t
9
+ gem.homepage = "https://github.com/seamusabshere/upsert"
10
+ gem.license = "MIT"
11
+ gem.platform = (Gem::Platform::CURRENT.index("java") ? Gem::Platform::CURRENT : "")
12
+
13
+ # We no longer use `git ls-files` here because it breaks on some version of jruby...
14
+ # For some slightly related information:
15
+ # - https://github.com/jruby/jruby/issues/4515
16
+ # - https://github.com/jruby/jruby/issues/5249
17
+ #
18
+ gem.files = %w[
19
+ .gitignore
20
+ .ruby-version
21
+ .standard.yml
22
+ .travis.yml
23
+ .yardopts
24
+ CHANGELOG
25
+ Gemfile
26
+ LICENSE
27
+ README.md
28
+ Rakefile
29
+ lib/upsert.rb
30
+ lib/upsert/active_record_upsert.rb
31
+ lib/upsert/binary.rb
32
+ lib/upsert/column_definition.rb
33
+ lib/upsert/column_definition/mysql.rb
34
+ lib/upsert/column_definition/postgresql.rb
35
+ lib/upsert/column_definition/sqlite3.rb
36
+ lib/upsert/connection.rb
37
+ lib/upsert/connection/Java_ComMysqlJdbc_JDBC4Connection.rb
38
+ lib/upsert/connection/Java_OrgPostgresqlJdbc_PgConnection.rb
39
+ lib/upsert/connection/Java_OrgSqlite_Conn.rb
40
+ lib/upsert/connection/Mysql2_Client.rb
41
+ lib/upsert/connection/PG_Connection.rb
42
+ lib/upsert/connection/SQLite3_Database.rb
43
+ lib/upsert/connection/jdbc.rb
44
+ lib/upsert/connection/postgresql.rb
45
+ lib/upsert/connection/sqlite3.rb
46
+ lib/upsert/merge_function.rb
47
+ lib/upsert/merge_function/Java_ComMysqlJdbc_JDBC4Connection.rb
48
+ lib/upsert/merge_function/Java_OrgPostgresqlJdbc_PgConnection.rb
49
+ lib/upsert/merge_function/Java_OrgSqlite_Conn.rb
50
+ lib/upsert/merge_function/Mysql2_Client.rb
51
+ lib/upsert/merge_function/PG_Connection.rb
52
+ lib/upsert/merge_function/SQLite3_Database.rb
53
+ lib/upsert/merge_function/mysql.rb
54
+ lib/upsert/merge_function/postgresql.rb
55
+ lib/upsert/merge_function/sqlite3.rb
56
+ lib/upsert/row.rb
57
+ lib/upsert/version.rb
58
+ spec/active_record_upsert_spec.rb
59
+ spec/binary_spec.rb
60
+ spec/correctness_spec.rb
61
+ spec/database_functions_spec.rb
62
+ spec/database_spec.rb
63
+ spec/hstore_spec.rb
64
+ spec/jruby_spec.rb
65
+ spec/logger_spec.rb
66
+ spec/misc/get_postgres_reserved_words.rb
67
+ spec/misc/mysql_reserved.txt
68
+ spec/misc/pg_reserved.txt
69
+ spec/multibyte_spec.rb
70
+ spec/postgresql_spec.rb
71
+ spec/precision_spec.rb
72
+ spec/reserved_words_spec.rb
73
+ spec/sequel_spec.rb
74
+ spec/spec_helper.rb
75
+ spec/speed_spec.rb
76
+ spec/threaded_spec.rb
77
+ spec/timezones_spec.rb
78
+ spec/type_safety_spec.rb
79
+ travis/install_postgres.sh
80
+ travis/run_docker_db.sh
81
+ travis/tune_mysql.sh
82
+ upsert-java.gemspec
83
+ upsert.gemspec
84
+ upsert.gemspec.common
85
+ ]
86
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
87
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
88
+ gem.name = "upsert"
89
+ gem.require_paths = ["lib"]
90
+ gem.version = Upsert::VERSION
91
+
92
+ # NOTE: no runtime dependencies!
93
+
94
+ gem.add_development_dependency 'rspec-core'
95
+ gem.add_development_dependency 'rspec-expectations'
96
+ gem.add_development_dependency 'rspec-mocks'
97
+
98
+ gem.add_development_dependency 'activerecord', '~> 5'
99
+ gem.add_development_dependency 'yard'
100
+ gem.add_development_dependency 'pry'
101
+ gem.add_development_dependency 'pg-hstore', ">=1.1.3"
102
+ gem.add_development_dependency 'sequel'
103
+ gem.add_development_dependency 'rake', '~> 10'
104
+
105
+ gem.add_development_dependency "activerecord-import", "~> 1"
106
+ gem.add_development_dependency "faker"
107
+ end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upsert
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere
8
+ - Phil Schalm
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
12
+ date: 2019-12-19 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rspec-core
@@ -58,16 +59,16 @@ dependencies:
58
59
  requirements:
59
60
  - - "~>"
60
61
  - !ruby/object:Gem::Version
61
- version: '3'
62
+ version: '5'
62
63
  type: :development
63
64
  prerelease: false
64
65
  version_requirements: !ruby/object:Gem::Requirement
65
66
  requirements:
66
67
  - - "~>"
67
68
  - !ruby/object:Gem::Version
68
- version: '3'
69
+ version: '5'
69
70
  - !ruby/object:Gem::Dependency
70
- name: active_record_inline_schema
71
+ name: yard
71
72
  requirement: !ruby/object:Gem::Requirement
72
73
  requirements:
73
74
  - - ">="
@@ -81,7 +82,7 @@ dependencies:
81
82
  - !ruby/object:Gem::Version
82
83
  version: '0'
83
84
  - !ruby/object:Gem::Dependency
84
- name: faker
85
+ name: pry
85
86
  requirement: !ruby/object:Gem::Requirement
86
87
  requirements:
87
88
  - - ">="
@@ -95,21 +96,21 @@ dependencies:
95
96
  - !ruby/object:Gem::Version
96
97
  version: '0'
97
98
  - !ruby/object:Gem::Dependency
98
- name: yard
99
+ name: pg-hstore
99
100
  requirement: !ruby/object:Gem::Requirement
100
101
  requirements:
101
102
  - - ">="
102
103
  - !ruby/object:Gem::Version
103
- version: '0'
104
+ version: 1.1.3
104
105
  type: :development
105
106
  prerelease: false
106
107
  version_requirements: !ruby/object:Gem::Requirement
107
108
  requirements:
108
109
  - - ">="
109
110
  - !ruby/object:Gem::Version
110
- version: '0'
111
+ version: 1.1.3
111
112
  - !ruby/object:Gem::Dependency
112
- name: pry
113
+ name: sequel
113
114
  requirement: !ruby/object:Gem::Requirement
114
115
  requirements:
115
116
  - - ">="
@@ -123,49 +124,49 @@ dependencies:
123
124
  - !ruby/object:Gem::Version
124
125
  version: '0'
125
126
  - !ruby/object:Gem::Dependency
126
- name: pg-hstore
127
+ name: rake
127
128
  requirement: !ruby/object:Gem::Requirement
128
129
  requirements:
129
- - - ">="
130
+ - - "~>"
130
131
  - !ruby/object:Gem::Version
131
- version: 1.1.3
132
+ version: '10'
132
133
  type: :development
133
134
  prerelease: false
134
135
  version_requirements: !ruby/object:Gem::Requirement
135
136
  requirements:
136
- - - ">="
137
+ - - "~>"
137
138
  - !ruby/object:Gem::Version
138
- version: 1.1.3
139
+ version: '10'
139
140
  - !ruby/object:Gem::Dependency
140
- name: sequel
141
+ name: activerecord-import
141
142
  requirement: !ruby/object:Gem::Requirement
142
143
  requirements:
143
- - - ">="
144
+ - - "~>"
144
145
  - !ruby/object:Gem::Version
145
- version: '0'
146
+ version: '1'
146
147
  type: :development
147
148
  prerelease: false
148
149
  version_requirements: !ruby/object:Gem::Requirement
149
150
  requirements:
150
- - - ">="
151
+ - - "~>"
151
152
  - !ruby/object:Gem::Version
152
- version: '0'
153
+ version: '1'
153
154
  - !ruby/object:Gem::Dependency
154
- name: rake
155
+ name: faker
155
156
  requirement: !ruby/object:Gem::Requirement
156
157
  requirements:
157
- - - "~>"
158
+ - - ">="
158
159
  - !ruby/object:Gem::Version
159
- version: 10.1.1
160
+ version: '0'
160
161
  type: :development
161
162
  prerelease: false
162
163
  version_requirements: !ruby/object:Gem::Requirement
163
164
  requirements:
164
- - - "~>"
165
+ - - ">="
165
166
  - !ruby/object:Gem::Version
166
- version: 10.1.1
167
+ version: '0'
167
168
  - !ruby/object:Gem::Dependency
168
- name: activerecord-import
169
+ name: activerecord-postgresql-adapter
169
170
  requirement: !ruby/object:Gem::Requirement
170
171
  requirements:
171
172
  - - ">="
@@ -196,32 +197,32 @@ dependencies:
196
197
  name: mysql2
197
198
  requirement: !ruby/object:Gem::Requirement
198
199
  requirements:
199
- - - ">="
200
+ - - "~>"
200
201
  - !ruby/object:Gem::Version
201
- version: '0'
202
+ version: '0.5'
202
203
  type: :development
203
204
  prerelease: false
204
205
  version_requirements: !ruby/object:Gem::Requirement
205
206
  requirements:
206
- - - ">="
207
+ - - "~>"
207
208
  - !ruby/object:Gem::Version
208
- version: '0'
209
+ version: '0.5'
209
210
  - !ruby/object:Gem::Dependency
210
211
  name: pg
211
212
  requirement: !ruby/object:Gem::Requirement
212
213
  requirements:
213
- - - ">="
214
+ - - "~>"
214
215
  - !ruby/object:Gem::Version
215
- version: '0'
216
+ version: '1.1'
216
217
  type: :development
217
218
  prerelease: false
218
219
  version_requirements: !ruby/object:Gem::Requirement
219
220
  requirements:
220
- - - ">="
221
+ - - "~>"
221
222
  - !ruby/object:Gem::Version
222
- version: '0'
223
+ version: '1.1'
223
224
  - !ruby/object:Gem::Dependency
224
- name: redcarpet
225
+ name: pry-byebug
225
226
  requirement: !ruby/object:Gem::Requirement
226
227
  requirements:
227
228
  - - ">="
@@ -238,11 +239,14 @@ description: Make it easy to upsert on MySQL, PostgreSQL, and SQLite3. Transpare
238
239
  creates merge functions for MySQL and PostgreSQL; on SQLite3, uses INSERT OR IGNORE.
239
240
  email:
240
241
  - seamus@abshere.net
242
+ - pnomolos@gmail.com
241
243
  executables: []
242
244
  extensions: []
243
245
  extra_rdoc_files: []
244
246
  files:
245
247
  - ".gitignore"
248
+ - ".ruby-version"
249
+ - ".standard.yml"
246
250
  - ".travis.yml"
247
251
  - ".yardopts"
248
252
  - CHANGELOG
@@ -259,7 +263,7 @@ files:
259
263
  - lib/upsert/column_definition/sqlite3.rb
260
264
  - lib/upsert/connection.rb
261
265
  - lib/upsert/connection/Java_ComMysqlJdbc_JDBC4Connection.rb
262
- - lib/upsert/connection/Java_OrgPostgresqlJdbc4_Jdbc4Connection.rb
266
+ - lib/upsert/connection/Java_OrgPostgresqlJdbc_PgConnection.rb
263
267
  - lib/upsert/connection/Java_OrgSqlite_Conn.rb
264
268
  - lib/upsert/connection/Mysql2_Client.rb
265
269
  - lib/upsert/connection/PG_Connection.rb
@@ -269,7 +273,7 @@ files:
269
273
  - lib/upsert/connection/sqlite3.rb
270
274
  - lib/upsert/merge_function.rb
271
275
  - lib/upsert/merge_function/Java_ComMysqlJdbc_JDBC4Connection.rb
272
- - lib/upsert/merge_function/Java_OrgPostgresqlJdbc4_Jdbc4Connection.rb
276
+ - lib/upsert/merge_function/Java_OrgPostgresqlJdbc_PgConnection.rb
273
277
  - lib/upsert/merge_function/Java_OrgSqlite_Conn.rb
274
278
  - lib/upsert/merge_function/Mysql2_Client.rb
275
279
  - lib/upsert/merge_function/PG_Connection.rb
@@ -285,11 +289,13 @@ files:
285
289
  - spec/database_functions_spec.rb
286
290
  - spec/database_spec.rb
287
291
  - spec/hstore_spec.rb
292
+ - spec/jruby_spec.rb
288
293
  - spec/logger_spec.rb
289
294
  - spec/misc/get_postgres_reserved_words.rb
290
295
  - spec/misc/mysql_reserved.txt
291
296
  - spec/misc/pg_reserved.txt
292
297
  - spec/multibyte_spec.rb
298
+ - spec/postgresql_spec.rb
293
299
  - spec/precision_spec.rb
294
300
  - spec/reserved_words_spec.rb
295
301
  - spec/sequel_spec.rb
@@ -298,9 +304,15 @@ files:
298
304
  - spec/threaded_spec.rb
299
305
  - spec/timezones_spec.rb
300
306
  - spec/type_safety_spec.rb
307
+ - travis/install_postgres.sh
308
+ - travis/run_docker_db.sh
309
+ - travis/tune_mysql.sh
310
+ - upsert-java.gemspec
301
311
  - upsert.gemspec
312
+ - upsert.gemspec.common
302
313
  homepage: https://github.com/seamusabshere/upsert
303
- licenses: []
314
+ licenses:
315
+ - MIT
304
316
  metadata: {}
305
317
  post_install_message:
306
318
  rdoc_options: []
@@ -318,7 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
330
  version: '0'
319
331
  requirements: []
320
332
  rubyforge_project:
321
- rubygems_version: 2.2.2
333
+ rubygems_version: 2.7.6.2
322
334
  signing_key:
323
335
  specification_version: 4
324
336
  summary: Make it easy to upsert on MySQL, PostgreSQL, and SQLite3. Transparently creates
@@ -330,11 +342,13 @@ test_files:
330
342
  - spec/database_functions_spec.rb
331
343
  - spec/database_spec.rb
332
344
  - spec/hstore_spec.rb
345
+ - spec/jruby_spec.rb
333
346
  - spec/logger_spec.rb
334
347
  - spec/misc/get_postgres_reserved_words.rb
335
348
  - spec/misc/mysql_reserved.txt
336
349
  - spec/misc/pg_reserved.txt
337
350
  - spec/multibyte_spec.rb
351
+ - spec/postgresql_spec.rb
338
352
  - spec/precision_spec.rb
339
353
  - spec/reserved_words_spec.rb
340
354
  - spec/sequel_spec.rb
@@ -343,4 +357,3 @@ test_files:
343
357
  - spec/threaded_spec.rb
344
358
  - spec/timezones_spec.rb
345
359
  - spec/type_safety_spec.rb
346
- has_rdoc: