active_record_upsert 0.3.0-java → 0.4.0-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a0bcdf80e0a32511f128657a665774fe7cb13bb
4
- data.tar.gz: 7ea7295702c5fbb5d69cecda17c6734fc7d20233
3
+ metadata.gz: 1c5957bd881deda09f1dabac7003948123b81b26
4
+ data.tar.gz: 3caac4e501d978ed1b6d389ae87d21b36b8d9204
5
5
  SHA512:
6
- metadata.gz: 86e4ea1f8d452bec401e7595275ce588bb78f2a7047cd617dc970a14c84feff8a68fe183fb2dcf13e6538fa83a5f2b914f9b5f4358cc16a659fb7bfa684f8115
7
- data.tar.gz: 530ce0b3ad1a67a4f44527ed0f1db6daad600266d9684e082ccdf84d16d331d2f471aa066f14fc9e108537c4e27c1e08e98b0db51328f4c34d26b6c8399ac3eb
6
+ metadata.gz: 765014d7a2a2a7119fdb3ff6c97efa7853f6b50ffb6b834a1f3d59daf0286e20a46e9253337cf94dba46ebe21a451872849a9ad0968e7c5bec91b95c3aeeb9e5
7
+ data.tar.gz: 229b110dfd3e3fa08899dc3d9979ae8fb7afd1d687670901fe09ce07cfd1b693a58d948d3da9d4707cfb4190bd1014b6b56a62ede4e0e223e96daf04e65cb025
data/Gemfile CHANGED
@@ -3,7 +3,10 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in active_record_upsert.gemspec
4
4
  gemspec
5
5
 
6
- gem 'activerecord-jdbc-adapter', github: 'jensnockert/activerecord-jdbc-adapter', branch: 'activerecord-50'
6
+ gem 'activerecord-jdbc-adapter',
7
+ github: 'jensnockert/activerecord-jdbc-adapter',
8
+ branch: 'activerecord-50',
9
+ platform: :jruby
7
10
 
8
11
  gem 'activerecord-jdbcpostgresql-adapter',
9
12
  github: 'jensnockert/activerecord-jdbc-adapter',
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
+ [![Build Status](https://travis-ci.org/jesjos/active_record_upsert.svg?branch=master)](https://travis-ci.org/jesjos/active_record_upsert)
2
+ [![Code Climate](https://codeclimate.com/github/jesjos/active_record_upsert/badges/gpa.svg)](https://codeclimate.com/github/jesjos/active_record_upsert)
3
+
1
4
  # ActiveRecordUpsert
2
5
 
3
- Real upsert for PostgreSQL 9.5+ and ActiveRecord. Uses ON CONFLICT DO UPDATE.
6
+ Real upsert for PostgreSQL 9.5+ and ActiveRecord. Uses [ON CONFLICT DO UPDATE](http://www.postgresql.org/docs/9.5/static/sql-insert.html).
4
7
 
5
8
  ## Main points
6
9
 
@@ -0,0 +1,13 @@
1
+ module ActiveRecordUpsert
2
+ module ActiveRecord
3
+ module TransactionsExtensions
4
+ def upsert(*args)
5
+ rollback_active_record_state! do
6
+ with_transaction_returning_status { super }
7
+ end
8
+ end
9
+ end
10
+
11
+ ::ActiveRecord::Base.prepend(TransactionsExtensions)
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordUpsert
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_upsert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: java
6
6
  authors:
7
7
  - Jesper Josefsson
@@ -145,6 +145,7 @@ files:
145
145
  - lib/active_record_upsert/active_record/persistence.rb
146
146
  - lib/active_record_upsert/active_record/relation.rb
147
147
  - lib/active_record_upsert/active_record/timestamp.rb
148
+ - lib/active_record_upsert/active_record/transactions.rb
148
149
  - lib/active_record_upsert/arel.rb
149
150
  - lib/active_record_upsert/arel/crud.rb
150
151
  - lib/active_record_upsert/arel/insert_manager.rb