composite_primary_keys 7.0.4 → 7.0.5

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: 7a45d32305e2b207027f386128b7b77714e65486
4
- data.tar.gz: 1e574a8bedaeaca37da16e406fc6e3d1246bcee3
3
+ metadata.gz: b80c3c585051897678d097a60e5e2d2e0aaf9ec3
4
+ data.tar.gz: c6b042d7c81d77f5e8e1712c9808574288ac672c
5
5
  SHA512:
6
- metadata.gz: 390a1b12a5d5f1c2cf8a5c40538445f98432508dd4d68223a9ce7aa431f79280b49de4ab3cd344b8bd2e43116e0eac7ed19d07bcec56186a635330e77f5b1db7
7
- data.tar.gz: 27f2fa1cc51821ae47ac57cd8d504cb58d7b7528b7a5f0096c4134f6595194ef729e48297b8df887b635829e2c0c1f26113591aaa5d951c73b49c541754454d5
6
+ metadata.gz: 1ccdf4ac7aed2c8c3856ecbcf238662f9c8e04e2a34e156542645be631e61d7d2b3299d106ee6d5c4afb911fea69bb5e7e551422e573dfcca59664854a3014a4
7
+ data.tar.gz: 61238d4592fd9ba1b9f984c233399f6ccbbc4d2b6c6abd12ebedb174cc3094557043e5034941e3b3da192560bc17cb34857e70e959026a88a786f5208cf6755e
@@ -1,4 +1,8 @@
1
- == 7.0.4 (2014-07-?)
1
+ == 7.0.5 (2014-07-21)
2
+
3
+ * Remove overriden Postgresql adapter code (Charlie Savage)
4
+
5
+ == 7.0.4 (2014-07-09)
2
6
 
3
7
  * Fix overriding of Relation#where_values_hash (Pavel)
4
8
  * Add travis CI support (Pavel)
@@ -1,13 +1,5 @@
1
1
  module ActiveRecord
2
2
  module ConnectionAdapters
3
- class PostgreSQLColumn
4
- # This overide is needed to ensure ActiveRecord::Dirty behaves as expected
5
- def type_cast(value)
6
- return value if value.kind_of?(Array)
7
- super
8
- end
9
- end
10
-
11
3
  class PostgreSQLAdapter
12
4
  def insert_sql(sql, name = nil, pk = nil, id_value = nil, sequence_name = nil)
13
5
  unless pk
@@ -2,7 +2,7 @@ module CompositePrimaryKeys
2
2
  module VERSION
3
3
  MAJOR = 7
4
4
  MINOR = 0
5
- TINY = 4
5
+ TINY = 5
6
6
  STRING = [MAJOR, MINOR, TINY].join('.')
7
7
  end
8
8
  end
@@ -0,0 +1,22 @@
1
+ require File.expand_path('../abstract_unit', __FILE__)
2
+
3
+ class EmployeesGroup < ActiveRecord::Base
4
+
5
+ end
6
+
7
+ class TestValidations < ActiveSupport::TestCase
8
+ fixtures :employees
9
+
10
+ def test_delete_for_model_without_primary_key
11
+ EmployeesGroup.create(employee_id: 1, group_id: 100)
12
+ EmployeesGroup.create(employee_id: 2, group_id: 102)
13
+ EmployeesGroup.create(employee_id: 3, group_id: 103)
14
+
15
+ assert_equal(EmployeesGroup.all.size, 3)
16
+ exception = assert_raises(ActiveRecord::StatementInvalid) {
17
+ EmployeesGroup.where(employee_id: 1).first.destroy
18
+ }
19
+ assert_match(/Unknown column 'employees_groups.' in 'where clause/, exception.message)
20
+ assert(EmployeesGroup.all.size == 3)
21
+ end
22
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: composite_primary_keys
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.4
4
+ version: 7.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Savage
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-09 00:00:00.000000000 Z
11
+ date: 2014-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -175,6 +175,7 @@ files:
175
175
  - test/test_counter_cache.rb
176
176
  - test/test_create.rb
177
177
  - test/test_delete.rb
178
+ - test/test_delete_all.rb
178
179
  - test/test_dup.rb
179
180
  - test/test_equal.rb
180
181
  - test/test_exists.rb
@@ -232,6 +233,7 @@ test_files:
232
233
  - test/test_counter_cache.rb
233
234
  - test/test_create.rb
234
235
  - test/test_delete.rb
236
+ - test/test_delete_all.rb
235
237
  - test/test_dup.rb
236
238
  - test/test_equal.rb
237
239
  - test/test_exists.rb