active_type 0.4.3 → 0.4.4

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: 246492245829189c234439a8edd6332010b65cb1
4
- data.tar.gz: 8f1067dcb972089bbee267c147b17782513795f3
3
+ metadata.gz: c606ca3a39a6de576a55fedfd5c421e279bca952
4
+ data.tar.gz: a29bd51fb2cc519da17b32729ef2ba5f11b15387
5
5
  SHA512:
6
- metadata.gz: 30e1c1b46bbb13e3ea56700c001e756d6f7321ab9148f7aec98875114a49549cefe9bb03a888b3ed137632698aa15c933ddfc690abef9b0e67e36fddfd0ba928
7
- data.tar.gz: 6e507ab9b563b8830a031f090cc05a8e1b5b3c4202ed7ce8029eaf61f4fddc183e21414267f6ae3c6fc46e1f58252273ce9396e710a33b2d8317183567fba5a5
6
+ metadata.gz: 71674d907ca1f9e9b6ce9ddd960f55a7776fdee1cc2377285dc3218de61d881ffb501e2e3a4ef11d6eb22ec2ec01c6a1957baa2c862d5f06433916c5f721d771
7
+ data.tar.gz: a010dbbb16b4c1ece311d31f8ddb1aaded8f4ec07254bd809d4b42be5246d2dca7a5496800be15b5aa112944256971a5eedf48d6485faff398bb996a2fe11536
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.2
1
+ 2.2.3
data/.travis.yml CHANGED
@@ -3,8 +3,8 @@ rvm:
3
3
  - "1.8.7"
4
4
  - "1.9.3"
5
5
  - "2.0.0"
6
- - "2.1.2"
7
- - "2.2.0"
6
+ - "2.1.7"
7
+ - "2.2.3"
8
8
  gemfile:
9
9
  - gemfiles/Gemfile.3.2.mysql2
10
10
  - gemfiles/Gemfile.3.2.sqlite3
@@ -17,6 +17,8 @@ before_script:
17
17
  - psql -c 'create database active_type_test;' -U postgres
18
18
  - mysql -e 'create database IF NOT EXISTS active_type_test;'
19
19
  script: bundle exec rspec spec
20
+ sudo: false
21
+ cache: bundler
20
22
  notifications:
21
23
  email:
22
24
  - fail@makandra.de
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'activerecord', '=3.2.22'
4
4
  gem 'rspec', '<2.99'
5
- gem 'mysql2', '= 0.3.11'
5
+ gem 'mysql2', '= 0.3.17'
6
6
 
7
7
  gem 'active_type', :path => '..'
8
8
  gem 'i18n', '=0.6.11' # 0.7 no longer builds for Ruby 1.8.7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.4.2)
4
+ active_type (0.4.4)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -23,7 +23,7 @@ GEM
23
23
  diff-lcs (1.2.5)
24
24
  i18n (0.6.11)
25
25
  multi_json (1.11.2)
26
- mysql2 (0.3.11)
26
+ mysql2 (0.3.17)
27
27
  rspec (2.14.1)
28
28
  rspec-core (~> 2.14.0)
29
29
  rspec-expectations (~> 2.14.0)
@@ -32,7 +32,7 @@ GEM
32
32
  rspec-expectations (2.14.5)
33
33
  diff-lcs (>= 1.1.3, < 2.0)
34
34
  rspec-mocks (2.14.6)
35
- tzinfo (0.3.45)
35
+ tzinfo (0.3.46)
36
36
 
37
37
  PLATFORMS
38
38
  ruby
@@ -41,7 +41,7 @@ DEPENDENCIES
41
41
  active_type!
42
42
  activerecord (= 3.2.22)
43
43
  i18n (= 0.6.11)
44
- mysql2 (= 0.3.11)
44
+ mysql2 (= 0.3.17)
45
45
  rspec (< 2.99)
46
46
 
47
47
  BUNDLED WITH
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.4.2)
4
+ active_type (0.4.4)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -22,7 +22,7 @@ GEM
22
22
  builder (3.0.4)
23
23
  diff-lcs (1.2.5)
24
24
  i18n (0.6.11)
25
- multi_json (1.11.1)
25
+ multi_json (1.11.2)
26
26
  rspec (2.14.1)
27
27
  rspec-core (~> 2.14.0)
28
28
  rspec-expectations (~> 2.14.0)
@@ -31,8 +31,8 @@ GEM
31
31
  rspec-expectations (2.14.5)
32
32
  diff-lcs (>= 1.1.3, < 2.0)
33
33
  rspec-mocks (2.14.6)
34
- sqlite3 (1.3.10)
35
- tzinfo (0.3.44)
34
+ sqlite3 (1.3.11)
35
+ tzinfo (0.3.46)
36
36
 
37
37
  PLATFORMS
38
38
  ruby
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.4.2)
4
+ active_type (0.4.4)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
@@ -27,7 +27,7 @@ GEM
27
27
  diff-lcs (1.2.5)
28
28
  i18n (0.7.0)
29
29
  minitest (4.7.5)
30
- multi_json (1.11.1)
30
+ multi_json (1.11.2)
31
31
  rspec (2.14.1)
32
32
  rspec-core (~> 2.14.0)
33
33
  rspec-expectations (~> 2.14.0)
@@ -36,9 +36,9 @@ GEM
36
36
  rspec-expectations (2.14.5)
37
37
  diff-lcs (>= 1.1.3, < 2.0)
38
38
  rspec-mocks (2.14.6)
39
- sqlite3 (1.3.10)
39
+ sqlite3 (1.3.11)
40
40
  thread_safe (0.3.5)
41
- tzinfo (0.3.44)
41
+ tzinfo (0.3.46)
42
42
 
43
43
  PLATFORMS
44
44
  ruby
@@ -48,3 +48,6 @@ DEPENDENCIES
48
48
  activerecord (~> 4.0.0)
49
49
  rspec (< 2.99)
50
50
  sqlite3
51
+
52
+ BUNDLED WITH
53
+ 1.10.6
@@ -1,20 +1,20 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.4.2)
4
+ active_type (0.4.4)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (4.1.10)
11
- activesupport (= 4.1.10)
10
+ activemodel (4.1.14)
11
+ activesupport (= 4.1.14)
12
12
  builder (~> 3.1)
13
- activerecord (4.1.10)
14
- activemodel (= 4.1.10)
15
- activesupport (= 4.1.10)
13
+ activerecord (4.1.14)
14
+ activemodel (= 4.1.14)
15
+ activesupport (= 4.1.14)
16
16
  arel (~> 5.0.0)
17
- activesupport (4.1.10)
17
+ activesupport (4.1.14)
18
18
  i18n (~> 0.6, >= 0.6.9)
19
19
  json (~> 1.7, >= 1.7.7)
20
20
  minitest (~> 5.1)
@@ -25,7 +25,7 @@ GEM
25
25
  diff-lcs (1.2.5)
26
26
  i18n (0.7.0)
27
27
  json (1.8.3)
28
- minitest (5.7.0)
28
+ minitest (5.8.3)
29
29
  rspec (2.14.1)
30
30
  rspec-core (~> 2.14.0)
31
31
  rspec-expectations (~> 2.14.0)
@@ -34,7 +34,7 @@ GEM
34
34
  rspec-expectations (2.14.5)
35
35
  diff-lcs (>= 1.1.3, < 2.0)
36
36
  rspec-mocks (2.14.6)
37
- sqlite3 (1.3.10)
37
+ sqlite3 (1.3.11)
38
38
  thread_safe (0.3.5)
39
39
  tzinfo (1.2.2)
40
40
  thread_safe (~> 0.1)
@@ -47,3 +47,6 @@ DEPENDENCIES
47
47
  activerecord (~> 4.1.0)
48
48
  rspec (< 2.99)
49
49
  sqlite3
50
+
51
+ BUNDLED WITH
52
+ 1.10.6
@@ -1,31 +1,31 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.4.2)
4
+ active_type (0.4.4)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (4.2.1)
11
- activesupport (= 4.2.1)
10
+ activemodel (4.2.5)
11
+ activesupport (= 4.2.5)
12
12
  builder (~> 3.1)
13
- activerecord (4.2.1)
14
- activemodel (= 4.2.1)
15
- activesupport (= 4.2.1)
13
+ activerecord (4.2.5)
14
+ activemodel (= 4.2.5)
15
+ activesupport (= 4.2.5)
16
16
  arel (~> 6.0)
17
- activesupport (4.2.1)
17
+ activesupport (4.2.5)
18
18
  i18n (~> 0.7)
19
19
  json (~> 1.7, >= 1.7.7)
20
20
  minitest (~> 5.1)
21
21
  thread_safe (~> 0.3, >= 0.3.4)
22
22
  tzinfo (~> 1.1)
23
- arel (6.0.0)
23
+ arel (6.0.3)
24
24
  builder (3.2.2)
25
25
  diff-lcs (1.2.5)
26
26
  i18n (0.7.0)
27
27
  json (1.8.3)
28
- minitest (5.7.0)
28
+ minitest (5.8.3)
29
29
  mysql2 (0.3.20)
30
30
  rspec (2.14.1)
31
31
  rspec-core (~> 2.14.0)
@@ -1,32 +1,32 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.4.2)
4
+ active_type (0.4.4)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (4.2.1)
11
- activesupport (= 4.2.1)
10
+ activemodel (4.2.5)
11
+ activesupport (= 4.2.5)
12
12
  builder (~> 3.1)
13
- activerecord (4.2.1)
14
- activemodel (= 4.2.1)
15
- activesupport (= 4.2.1)
13
+ activerecord (4.2.5)
14
+ activemodel (= 4.2.5)
15
+ activesupport (= 4.2.5)
16
16
  arel (~> 6.0)
17
- activesupport (4.2.1)
17
+ activesupport (4.2.5)
18
18
  i18n (~> 0.7)
19
19
  json (~> 1.7, >= 1.7.7)
20
20
  minitest (~> 5.1)
21
21
  thread_safe (~> 0.3, >= 0.3.4)
22
22
  tzinfo (~> 1.1)
23
- arel (6.0.0)
23
+ arel (6.0.3)
24
24
  builder (3.2.2)
25
25
  diff-lcs (1.2.5)
26
26
  i18n (0.7.0)
27
27
  json (1.8.3)
28
- minitest (5.7.0)
29
- pg (0.18.2)
28
+ minitest (5.8.3)
29
+ pg (0.18.4)
30
30
  rspec (2.14.1)
31
31
  rspec-core (~> 2.14.0)
32
32
  rspec-expectations (~> 2.14.0)
@@ -47,3 +47,6 @@ DEPENDENCIES
47
47
  activerecord (~> 4.2.1)
48
48
  pg
49
49
  rspec (< 2.99)
50
+
51
+ BUNDLED WITH
52
+ 1.10.6
@@ -1,31 +1,31 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- active_type (0.4.2)
4
+ active_type (0.4.4)
5
5
  activerecord (>= 3.2)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (4.2.1)
11
- activesupport (= 4.2.1)
10
+ activemodel (4.2.5)
11
+ activesupport (= 4.2.5)
12
12
  builder (~> 3.1)
13
- activerecord (4.2.1)
14
- activemodel (= 4.2.1)
15
- activesupport (= 4.2.1)
13
+ activerecord (4.2.5)
14
+ activemodel (= 4.2.5)
15
+ activesupport (= 4.2.5)
16
16
  arel (~> 6.0)
17
- activesupport (4.2.1)
17
+ activesupport (4.2.5)
18
18
  i18n (~> 0.7)
19
19
  json (~> 1.7, >= 1.7.7)
20
20
  minitest (~> 5.1)
21
21
  thread_safe (~> 0.3, >= 0.3.4)
22
22
  tzinfo (~> 1.1)
23
- arel (6.0.0)
23
+ arel (6.0.3)
24
24
  builder (3.2.2)
25
25
  diff-lcs (1.2.5)
26
26
  i18n (0.7.0)
27
27
  json (1.8.3)
28
- minitest (5.7.0)
28
+ minitest (5.8.3)
29
29
  rspec (2.14.1)
30
30
  rspec-core (~> 2.14.0)
31
31
  rspec-expectations (~> 2.14.0)
@@ -34,7 +34,7 @@ GEM
34
34
  rspec-expectations (2.14.5)
35
35
  diff-lcs (>= 1.1.3, < 2.0)
36
36
  rspec-mocks (2.14.6)
37
- sqlite3 (1.3.10)
37
+ sqlite3 (1.3.11)
38
38
  thread_safe (0.3.5)
39
39
  tzinfo (1.2.2)
40
40
  thread_safe (~> 0.1)
@@ -47,3 +47,6 @@ DEPENDENCIES
47
47
  activerecord (~> 4.2.1)
48
48
  rspec (< 2.99)
49
49
  sqlite3
50
+
51
+ BUNDLED WITH
52
+ 1.10.6
@@ -77,6 +77,7 @@ module ActiveType
77
77
  end
78
78
  else
79
79
  def _create_record(*)
80
+ @new_record = false
80
81
  true
81
82
  end
82
83
 
@@ -1,3 +1,3 @@
1
1
  module ActiveType
2
- VERSION = '0.4.3'
2
+ VERSION = '0.4.4'
3
3
  end
@@ -57,6 +57,7 @@ module ObjectSpec
57
57
  before_save :before_save_callback
58
58
  before_validation :before_validation_callback
59
59
  after_save :after_save_callback
60
+ after_commit :after_commit_callback
60
61
 
61
62
  def before_save_callback
62
63
  end
@@ -67,6 +68,9 @@ module ObjectSpec
67
68
  def after_save_callback
68
69
  end
69
70
 
71
+ def after_commit_callback
72
+ end
73
+
70
74
  end
71
75
 
72
76
  class Child < ActiveRecord::Base
@@ -332,9 +336,9 @@ describe ActiveType::Object do
332
336
  subject.save
333
337
  end
334
338
 
335
- %w[before_validation before_save after_save].each do |callback|
339
+ %w[before_validation before_save after_save after_commit].each do |callback|
336
340
 
337
- it "calls #{callback}" do
341
+ it "calls #{callback}", :rollback => false do
338
342
  subject.should_receive("#{callback}_callback")
339
343
 
340
344
  subject.save.should be_true
data/spec/spec_helper.rb CHANGED
@@ -12,12 +12,16 @@ Dir["#{File.dirname(__FILE__)}/shared_examples/*.rb"].each {|f| require f}
12
12
 
13
13
  RSpec.configure do |config|
14
14
  config.around do |example|
15
- ActiveRecord::Base.transaction do
16
- begin
17
- example.run
18
- ensure
19
- raise ActiveRecord::Rollback
15
+ if example.metadata.fetch(:rollback, true)
16
+ ActiveRecord::Base.transaction do
17
+ begin
18
+ example.run
19
+ ensure
20
+ raise ActiveRecord::Rollback
21
+ end
20
22
  end
23
+ else
24
+ example.run
21
25
  end
22
26
  end
23
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Kraze
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-11 00:00:00.000000000 Z
12
+ date: 2016-01-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler