immortal 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +69 -0
- data/.ruby-version +1 -0
- data/Appraisals +14 -0
- data/gemfiles/activerecord_41.gemfile +8 -0
- data/gemfiles/activerecord_41.gemfile.lock +120 -0
- data/gemfiles/activerecord_42.gemfile +8 -0
- data/gemfiles/activerecord_42.gemfile.lock +118 -0
- data/gemfiles/activerecord_50.gemfile +8 -0
- data/gemfiles/activerecord_50.gemfile.lock +116 -0
- data/immortal.gemspec +3 -2
- data/lib/immortal.rb +3 -11
- data/lib/immortal/version.rb +1 -1
- metadata +34 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed1e3ee584cd8484bd35c855ae7d3eea25cc8a28
|
4
|
+
data.tar.gz: 9b0acc72ba648c20c98373305b11c886c8a29906
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2959f2e1b19cc6976460b82143f5006e731f63b61a7c2b67730b6dc284f9b7df01569d10d26bd295c10966363ba63a5a78f66e07a599ec377678753cd209b7b6
|
7
|
+
data.tar.gz: 785c3770312f13ebe830f8fac32dc1a6ad832478c368e533909825e11862d2aaedde9e2b1c4fcbfb086762c35a33dd248825cc93607691d30e30757274589324
|
@@ -0,0 +1,69 @@
|
|
1
|
+
version: 2
|
2
|
+
|
3
|
+
references:
|
4
|
+
|
5
|
+
ruby_image: &ruby_image
|
6
|
+
circleci/ruby:2.3.3
|
7
|
+
|
8
|
+
mysql_container_config: &mysql_container_config
|
9
|
+
docker:
|
10
|
+
- image: *ruby_image
|
11
|
+
environment:
|
12
|
+
DB_HOST=127.0.0.1
|
13
|
+
- image: circleci/mysql:5.6.39
|
14
|
+
environment:
|
15
|
+
MYSQL_DATABASE=immortal_db
|
16
|
+
|
17
|
+
sqlite_container_config: &sqlite_container_config
|
18
|
+
docker:
|
19
|
+
- image: *ruby_image
|
20
|
+
|
21
|
+
install_bundler: &install_bundler
|
22
|
+
run:
|
23
|
+
name: Install Bundler
|
24
|
+
command: |
|
25
|
+
gem install bundler
|
26
|
+
gem cleanup bundler
|
27
|
+
|
28
|
+
install_gems: &install_gems
|
29
|
+
run:
|
30
|
+
name: Install Gems
|
31
|
+
command: bundle install
|
32
|
+
|
33
|
+
appraisal_install: &appraisal_install
|
34
|
+
run:
|
35
|
+
name: Appraisal Install
|
36
|
+
command: bundle exec appraisal install
|
37
|
+
|
38
|
+
appraisal_rspec: &appraisal_rspec
|
39
|
+
run:
|
40
|
+
name: Appraisal RSpec
|
41
|
+
command: bundle exec appraisal rspec
|
42
|
+
|
43
|
+
jobs:
|
44
|
+
test_on_mysql:
|
45
|
+
<<: *mysql_container_config
|
46
|
+
environment:
|
47
|
+
- CONFIG_MYSQL=true
|
48
|
+
- DB_PORT=3306
|
49
|
+
steps:
|
50
|
+
- checkout
|
51
|
+
- *install_bundler
|
52
|
+
- *install_gems
|
53
|
+
- *appraisal_install
|
54
|
+
- *appraisal_rspec
|
55
|
+
test_on_sqlite:
|
56
|
+
<<: *sqlite_container_config
|
57
|
+
steps:
|
58
|
+
- checkout
|
59
|
+
- *install_bundler
|
60
|
+
- *install_gems
|
61
|
+
- *appraisal_install
|
62
|
+
- *appraisal_rspec
|
63
|
+
|
64
|
+
workflows:
|
65
|
+
version: 2
|
66
|
+
commit:
|
67
|
+
jobs:
|
68
|
+
- test_on_mysql
|
69
|
+
- test_on_sqlite
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.3
|
data/Appraisals
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
appraise 'activerecord-41' do
|
2
|
+
gem 'activerecord', '~> 4.1.0'
|
3
|
+
gem 'mysql2', '0.3.20' if ENV['CONFIG_MYSQL']
|
4
|
+
end
|
5
|
+
|
6
|
+
appraise 'activerecord-42' do
|
7
|
+
gem 'activerecord', '~> 4.2.0'
|
8
|
+
gem 'mysql2', '~> 0.4.0' if ENV['CONFIG_MYSQL']
|
9
|
+
end
|
10
|
+
|
11
|
+
appraise 'activerecord-50' do
|
12
|
+
gem 'activerecord', '~> 5.0.0'
|
13
|
+
gem 'mysql2', '~> 0.5.0' if ENV['CONFIG_MYSQL']
|
14
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
immortal (3.0.0)
|
5
|
+
activerecord (>= 4.1.0, < 5.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (4.1.16)
|
11
|
+
activesupport (= 4.1.16)
|
12
|
+
builder (~> 3.1)
|
13
|
+
activerecord (4.1.16)
|
14
|
+
activemodel (= 4.1.16)
|
15
|
+
activesupport (= 4.1.16)
|
16
|
+
arel (~> 5.0.0)
|
17
|
+
activesupport (4.1.16)
|
18
|
+
i18n (~> 0.6, >= 0.6.9)
|
19
|
+
json (~> 1.7, >= 1.7.7)
|
20
|
+
minitest (~> 5.1)
|
21
|
+
thread_safe (~> 0.1)
|
22
|
+
tzinfo (~> 1.1)
|
23
|
+
appraisal (2.2.0)
|
24
|
+
bundler
|
25
|
+
rake
|
26
|
+
thor (>= 0.14.0)
|
27
|
+
arel (5.0.1.20140414130214)
|
28
|
+
ast (2.4.0)
|
29
|
+
axiom-types (0.1.1)
|
30
|
+
descendants_tracker (~> 0.0.4)
|
31
|
+
ice_nine (~> 0.11.0)
|
32
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
33
|
+
builder (3.2.3)
|
34
|
+
byebug (10.0.2)
|
35
|
+
codeclimate-engine-rb (0.4.1)
|
36
|
+
virtus (~> 1.0)
|
37
|
+
coercible (1.0.0)
|
38
|
+
descendants_tracker (~> 0.0.1)
|
39
|
+
concurrent-ruby (1.1.3)
|
40
|
+
descendants_tracker (0.0.4)
|
41
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
42
|
+
diff-lcs (1.3)
|
43
|
+
equalizer (0.0.11)
|
44
|
+
i18n (0.9.5)
|
45
|
+
concurrent-ruby (~> 1.0)
|
46
|
+
ice_nine (0.11.2)
|
47
|
+
jaro_winkler (1.5.1)
|
48
|
+
json (1.8.6)
|
49
|
+
kwalify (0.7.2)
|
50
|
+
minitest (5.11.3)
|
51
|
+
mysql2 (0.3.20)
|
52
|
+
parallel (1.12.1)
|
53
|
+
parser (2.5.3.0)
|
54
|
+
ast (~> 2.4.0)
|
55
|
+
powerpack (0.1.2)
|
56
|
+
rainbow (3.0.0)
|
57
|
+
rake (10.5.0)
|
58
|
+
reek (5.2.0)
|
59
|
+
codeclimate-engine-rb (~> 0.4.0)
|
60
|
+
kwalify (~> 0.7.0)
|
61
|
+
parser (>= 2.5.0.0, < 2.6, != 2.5.1.1)
|
62
|
+
rainbow (>= 2.0, < 4.0)
|
63
|
+
rspec (3.6.0)
|
64
|
+
rspec-core (~> 3.6.0)
|
65
|
+
rspec-expectations (~> 3.6.0)
|
66
|
+
rspec-mocks (~> 3.6.0)
|
67
|
+
rspec-core (3.6.0)
|
68
|
+
rspec-support (~> 3.6.0)
|
69
|
+
rspec-expectations (3.6.0)
|
70
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
71
|
+
rspec-support (~> 3.6.0)
|
72
|
+
rspec-its (1.2.0)
|
73
|
+
rspec-core (>= 3.0.0)
|
74
|
+
rspec-expectations (>= 3.0.0)
|
75
|
+
rspec-mocks (3.6.0)
|
76
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
77
|
+
rspec-support (~> 3.6.0)
|
78
|
+
rspec-support (3.6.0)
|
79
|
+
rubocop (0.60.0)
|
80
|
+
jaro_winkler (~> 1.5.1)
|
81
|
+
parallel (~> 1.10)
|
82
|
+
parser (>= 2.5, != 2.5.1.1)
|
83
|
+
powerpack (~> 0.1)
|
84
|
+
rainbow (>= 2.2.2, < 4.0)
|
85
|
+
ruby-progressbar (~> 1.7)
|
86
|
+
unicode-display_width (~> 1.4.0)
|
87
|
+
rubocop-rspec (1.30.1)
|
88
|
+
rubocop (>= 0.60.0)
|
89
|
+
ruby-progressbar (1.10.0)
|
90
|
+
sqlite3 (1.3.13)
|
91
|
+
thor (0.20.3)
|
92
|
+
thread_safe (0.3.6)
|
93
|
+
tzinfo (1.2.5)
|
94
|
+
thread_safe (~> 0.1)
|
95
|
+
unicode-display_width (1.4.0)
|
96
|
+
virtus (1.0.5)
|
97
|
+
axiom-types (~> 0.1)
|
98
|
+
coercible (~> 1.0)
|
99
|
+
descendants_tracker (~> 0.0, >= 0.0.3)
|
100
|
+
equalizer (~> 0.0, >= 0.0.9)
|
101
|
+
|
102
|
+
PLATFORMS
|
103
|
+
ruby
|
104
|
+
|
105
|
+
DEPENDENCIES
|
106
|
+
activerecord (~> 4.1.0)
|
107
|
+
appraisal
|
108
|
+
byebug
|
109
|
+
immortal!
|
110
|
+
mysql2 (= 0.3.20)
|
111
|
+
rake (~> 10.0)
|
112
|
+
reek
|
113
|
+
rspec (~> 3.6.0)
|
114
|
+
rspec-its
|
115
|
+
rubocop
|
116
|
+
rubocop-rspec
|
117
|
+
sqlite3
|
118
|
+
|
119
|
+
BUNDLED WITH
|
120
|
+
1.16.5
|
@@ -0,0 +1,118 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
immortal (3.0.0)
|
5
|
+
activerecord (>= 4.1.0, < 5.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (4.2.11)
|
11
|
+
activesupport (= 4.2.11)
|
12
|
+
builder (~> 3.1)
|
13
|
+
activerecord (4.2.11)
|
14
|
+
activemodel (= 4.2.11)
|
15
|
+
activesupport (= 4.2.11)
|
16
|
+
arel (~> 6.0)
|
17
|
+
activesupport (4.2.11)
|
18
|
+
i18n (~> 0.7)
|
19
|
+
minitest (~> 5.1)
|
20
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
21
|
+
tzinfo (~> 1.1)
|
22
|
+
appraisal (2.2.0)
|
23
|
+
bundler
|
24
|
+
rake
|
25
|
+
thor (>= 0.14.0)
|
26
|
+
arel (6.0.4)
|
27
|
+
ast (2.4.0)
|
28
|
+
axiom-types (0.1.1)
|
29
|
+
descendants_tracker (~> 0.0.4)
|
30
|
+
ice_nine (~> 0.11.0)
|
31
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
32
|
+
builder (3.2.3)
|
33
|
+
byebug (10.0.2)
|
34
|
+
codeclimate-engine-rb (0.4.1)
|
35
|
+
virtus (~> 1.0)
|
36
|
+
coercible (1.0.0)
|
37
|
+
descendants_tracker (~> 0.0.1)
|
38
|
+
concurrent-ruby (1.1.3)
|
39
|
+
descendants_tracker (0.0.4)
|
40
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
41
|
+
diff-lcs (1.3)
|
42
|
+
equalizer (0.0.11)
|
43
|
+
i18n (0.9.5)
|
44
|
+
concurrent-ruby (~> 1.0)
|
45
|
+
ice_nine (0.11.2)
|
46
|
+
jaro_winkler (1.5.1)
|
47
|
+
kwalify (0.7.2)
|
48
|
+
minitest (5.11.3)
|
49
|
+
mysql2 (0.4.10)
|
50
|
+
parallel (1.12.1)
|
51
|
+
parser (2.5.3.0)
|
52
|
+
ast (~> 2.4.0)
|
53
|
+
powerpack (0.1.2)
|
54
|
+
rainbow (3.0.0)
|
55
|
+
rake (10.5.0)
|
56
|
+
reek (5.2.0)
|
57
|
+
codeclimate-engine-rb (~> 0.4.0)
|
58
|
+
kwalify (~> 0.7.0)
|
59
|
+
parser (>= 2.5.0.0, < 2.6, != 2.5.1.1)
|
60
|
+
rainbow (>= 2.0, < 4.0)
|
61
|
+
rspec (3.6.0)
|
62
|
+
rspec-core (~> 3.6.0)
|
63
|
+
rspec-expectations (~> 3.6.0)
|
64
|
+
rspec-mocks (~> 3.6.0)
|
65
|
+
rspec-core (3.6.0)
|
66
|
+
rspec-support (~> 3.6.0)
|
67
|
+
rspec-expectations (3.6.0)
|
68
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
69
|
+
rspec-support (~> 3.6.0)
|
70
|
+
rspec-its (1.2.0)
|
71
|
+
rspec-core (>= 3.0.0)
|
72
|
+
rspec-expectations (>= 3.0.0)
|
73
|
+
rspec-mocks (3.6.0)
|
74
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
+
rspec-support (~> 3.6.0)
|
76
|
+
rspec-support (3.6.0)
|
77
|
+
rubocop (0.60.0)
|
78
|
+
jaro_winkler (~> 1.5.1)
|
79
|
+
parallel (~> 1.10)
|
80
|
+
parser (>= 2.5, != 2.5.1.1)
|
81
|
+
powerpack (~> 0.1)
|
82
|
+
rainbow (>= 2.2.2, < 4.0)
|
83
|
+
ruby-progressbar (~> 1.7)
|
84
|
+
unicode-display_width (~> 1.4.0)
|
85
|
+
rubocop-rspec (1.30.1)
|
86
|
+
rubocop (>= 0.60.0)
|
87
|
+
ruby-progressbar (1.10.0)
|
88
|
+
sqlite3 (1.3.13)
|
89
|
+
thor (0.20.3)
|
90
|
+
thread_safe (0.3.6)
|
91
|
+
tzinfo (1.2.5)
|
92
|
+
thread_safe (~> 0.1)
|
93
|
+
unicode-display_width (1.4.0)
|
94
|
+
virtus (1.0.5)
|
95
|
+
axiom-types (~> 0.1)
|
96
|
+
coercible (~> 1.0)
|
97
|
+
descendants_tracker (~> 0.0, >= 0.0.3)
|
98
|
+
equalizer (~> 0.0, >= 0.0.9)
|
99
|
+
|
100
|
+
PLATFORMS
|
101
|
+
ruby
|
102
|
+
|
103
|
+
DEPENDENCIES
|
104
|
+
activerecord (~> 4.2.0)
|
105
|
+
appraisal
|
106
|
+
byebug
|
107
|
+
immortal!
|
108
|
+
mysql2 (~> 0.4.0)
|
109
|
+
rake (~> 10.0)
|
110
|
+
reek
|
111
|
+
rspec (~> 3.6.0)
|
112
|
+
rspec-its
|
113
|
+
rubocop
|
114
|
+
rubocop-rspec
|
115
|
+
sqlite3
|
116
|
+
|
117
|
+
BUNDLED WITH
|
118
|
+
1.16.5
|
@@ -0,0 +1,116 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
immortal (3.0.0)
|
5
|
+
activerecord (>= 4.1.0, < 5.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (5.0.7)
|
11
|
+
activesupport (= 5.0.7)
|
12
|
+
activerecord (5.0.7)
|
13
|
+
activemodel (= 5.0.7)
|
14
|
+
activesupport (= 5.0.7)
|
15
|
+
arel (~> 7.0)
|
16
|
+
activesupport (5.0.7)
|
17
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
+
i18n (>= 0.7, < 2)
|
19
|
+
minitest (~> 5.1)
|
20
|
+
tzinfo (~> 1.1)
|
21
|
+
appraisal (2.2.0)
|
22
|
+
bundler
|
23
|
+
rake
|
24
|
+
thor (>= 0.14.0)
|
25
|
+
arel (7.1.4)
|
26
|
+
ast (2.4.0)
|
27
|
+
axiom-types (0.1.1)
|
28
|
+
descendants_tracker (~> 0.0.4)
|
29
|
+
ice_nine (~> 0.11.0)
|
30
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
31
|
+
byebug (10.0.2)
|
32
|
+
codeclimate-engine-rb (0.4.1)
|
33
|
+
virtus (~> 1.0)
|
34
|
+
coercible (1.0.0)
|
35
|
+
descendants_tracker (~> 0.0.1)
|
36
|
+
concurrent-ruby (1.1.3)
|
37
|
+
descendants_tracker (0.0.4)
|
38
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
39
|
+
diff-lcs (1.3)
|
40
|
+
equalizer (0.0.11)
|
41
|
+
i18n (1.1.1)
|
42
|
+
concurrent-ruby (~> 1.0)
|
43
|
+
ice_nine (0.11.2)
|
44
|
+
jaro_winkler (1.5.1)
|
45
|
+
kwalify (0.7.2)
|
46
|
+
minitest (5.11.3)
|
47
|
+
mysql2 (0.5.2)
|
48
|
+
parallel (1.12.1)
|
49
|
+
parser (2.5.3.0)
|
50
|
+
ast (~> 2.4.0)
|
51
|
+
powerpack (0.1.2)
|
52
|
+
rainbow (3.0.0)
|
53
|
+
rake (10.5.0)
|
54
|
+
reek (5.2.0)
|
55
|
+
codeclimate-engine-rb (~> 0.4.0)
|
56
|
+
kwalify (~> 0.7.0)
|
57
|
+
parser (>= 2.5.0.0, < 2.6, != 2.5.1.1)
|
58
|
+
rainbow (>= 2.0, < 4.0)
|
59
|
+
rspec (3.6.0)
|
60
|
+
rspec-core (~> 3.6.0)
|
61
|
+
rspec-expectations (~> 3.6.0)
|
62
|
+
rspec-mocks (~> 3.6.0)
|
63
|
+
rspec-core (3.6.0)
|
64
|
+
rspec-support (~> 3.6.0)
|
65
|
+
rspec-expectations (3.6.0)
|
66
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
67
|
+
rspec-support (~> 3.6.0)
|
68
|
+
rspec-its (1.2.0)
|
69
|
+
rspec-core (>= 3.0.0)
|
70
|
+
rspec-expectations (>= 3.0.0)
|
71
|
+
rspec-mocks (3.6.0)
|
72
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
73
|
+
rspec-support (~> 3.6.0)
|
74
|
+
rspec-support (3.6.0)
|
75
|
+
rubocop (0.60.0)
|
76
|
+
jaro_winkler (~> 1.5.1)
|
77
|
+
parallel (~> 1.10)
|
78
|
+
parser (>= 2.5, != 2.5.1.1)
|
79
|
+
powerpack (~> 0.1)
|
80
|
+
rainbow (>= 2.2.2, < 4.0)
|
81
|
+
ruby-progressbar (~> 1.7)
|
82
|
+
unicode-display_width (~> 1.4.0)
|
83
|
+
rubocop-rspec (1.30.1)
|
84
|
+
rubocop (>= 0.60.0)
|
85
|
+
ruby-progressbar (1.10.0)
|
86
|
+
sqlite3 (1.3.13)
|
87
|
+
thor (0.20.3)
|
88
|
+
thread_safe (0.3.6)
|
89
|
+
tzinfo (1.2.5)
|
90
|
+
thread_safe (~> 0.1)
|
91
|
+
unicode-display_width (1.4.0)
|
92
|
+
virtus (1.0.5)
|
93
|
+
axiom-types (~> 0.1)
|
94
|
+
coercible (~> 1.0)
|
95
|
+
descendants_tracker (~> 0.0, >= 0.0.3)
|
96
|
+
equalizer (~> 0.0, >= 0.0.9)
|
97
|
+
|
98
|
+
PLATFORMS
|
99
|
+
ruby
|
100
|
+
|
101
|
+
DEPENDENCIES
|
102
|
+
activerecord (~> 5.0.0)
|
103
|
+
appraisal
|
104
|
+
byebug
|
105
|
+
immortal!
|
106
|
+
mysql2 (~> 0.5.0)
|
107
|
+
rake (~> 10.0)
|
108
|
+
reek
|
109
|
+
rspec (~> 3.6.0)
|
110
|
+
rspec-its
|
111
|
+
rubocop
|
112
|
+
rubocop-rspec
|
113
|
+
sqlite3
|
114
|
+
|
115
|
+
BUNDLED WITH
|
116
|
+
1.16.5
|
data/immortal.gemspec
CHANGED
@@ -23,10 +23,11 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = %w[lib]
|
25
25
|
|
26
|
-
spec.add_dependency 'activerecord', '
|
26
|
+
spec.add_dependency 'activerecord', '>= 4.1.0', '< 5.1'
|
27
|
+
spec.add_development_dependency 'appraisal'
|
27
28
|
spec.add_development_dependency 'rspec', '~> 3.6.0'
|
28
29
|
spec.add_development_dependency 'rspec-its'
|
29
|
-
spec.add_development_dependency 'sqlite3'
|
30
|
+
spec.add_development_dependency 'sqlite3' unless ENV['CONFIG_MYSQL']
|
30
31
|
spec.add_development_dependency 'byebug'
|
31
32
|
spec.add_development_dependency 'rake', '~> 10.0'
|
32
33
|
spec.add_development_dependency 'rubocop'
|
data/lib/immortal.rb
CHANGED
@@ -24,17 +24,9 @@ module Immortal
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def without_default_scope
|
27
|
-
|
28
|
-
our_scope = current_scope || unscoped
|
27
|
+
where_clause = (current_scope || unscoped).where_values_hash.except(COLUMN_NAME)
|
29
28
|
|
30
|
-
|
31
|
-
constraint.to_sql.split('AND').reject { |clause| clause.include?(COLUMN_NAME) }
|
32
|
-
end.flatten.join(' AND ')
|
33
|
-
|
34
|
-
new_scope = new_scope.merge(our_scope.except(:where))
|
35
|
-
new_scope = new_scope.where(non_immortal_constraints_sql)
|
36
|
-
|
37
|
-
unscoped.merge(new_scope).scoping do
|
29
|
+
unscoped.where(where_clause).scoping do
|
38
30
|
yield
|
39
31
|
end
|
40
32
|
end
|
@@ -145,7 +137,7 @@ module Immortal
|
|
145
137
|
end
|
146
138
|
|
147
139
|
def current_time_from_proper_timezone
|
148
|
-
ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.
|
140
|
+
ActiveRecord::Base.default_timezone == :utc ? Time.now.utc : Time.current
|
149
141
|
end
|
150
142
|
end
|
151
143
|
end
|
data/lib/immortal/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: immortal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordi Romero
|
@@ -14,22 +14,42 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date:
|
17
|
+
date: 2019-07-27 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: activerecord
|
21
21
|
requirement: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
|
-
- - "
|
23
|
+
- - ">="
|
24
24
|
- !ruby/object:Gem::Version
|
25
25
|
version: 4.1.0
|
26
|
+
- - "<"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '5.1'
|
26
29
|
type: :runtime
|
27
30
|
prerelease: false
|
28
31
|
version_requirements: !ruby/object:Gem::Requirement
|
29
32
|
requirements:
|
30
|
-
- - "
|
33
|
+
- - ">="
|
31
34
|
- !ruby/object:Gem::Version
|
32
35
|
version: 4.1.0
|
36
|
+
- - "<"
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '5.1'
|
39
|
+
- !ruby/object:Gem::Dependency
|
40
|
+
name: appraisal
|
41
|
+
requirement: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
type: :development
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '0'
|
33
53
|
- !ruby/object:Gem::Dependency
|
34
54
|
name: rspec
|
35
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,15 +171,24 @@ executables: []
|
|
151
171
|
extensions: []
|
152
172
|
extra_rdoc_files: []
|
153
173
|
files:
|
174
|
+
- ".circleci/config.yml"
|
154
175
|
- ".gitignore"
|
155
176
|
- ".rspec"
|
156
177
|
- ".rubocop.yml"
|
178
|
+
- ".ruby-version"
|
179
|
+
- Appraisals
|
157
180
|
- CHANGELOG.md
|
158
181
|
- CODE_OF_CONDUCT.md
|
159
182
|
- Gemfile
|
160
183
|
- LICENSE.txt
|
161
184
|
- README.md
|
162
185
|
- Rakefile
|
186
|
+
- gemfiles/activerecord_41.gemfile
|
187
|
+
- gemfiles/activerecord_41.gemfile.lock
|
188
|
+
- gemfiles/activerecord_42.gemfile
|
189
|
+
- gemfiles/activerecord_42.gemfile.lock
|
190
|
+
- gemfiles/activerecord_50.gemfile
|
191
|
+
- gemfiles/activerecord_50.gemfile.lock
|
163
192
|
- immortal.gemspec
|
164
193
|
- lib/immortal.rb
|
165
194
|
- lib/immortal/belongs_to.rb
|
@@ -186,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
215
|
version: '0'
|
187
216
|
requirements: []
|
188
217
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.
|
218
|
+
rubygems_version: 2.5.2
|
190
219
|
signing_key:
|
191
220
|
specification_version: 4
|
192
221
|
summary: Replacement for acts_as_paranoid for Rails 4
|