activerecord-deprecated_finders 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b8f795ebd30525b3a1d1756500326810b9d568e6
|
4
|
+
data.tar.gz: 93a650c669bfe9e8e6a325f6cf898ff3c000a587
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a8eab7e98267ccda24369146a45d555a200aba7aef72350dbc78395ac0ae8a1f029d2516f414e810a4cac2e0e4b65f65d96ce70f23471b67047e93499950edbf
|
7
|
+
data.tar.gz: e839f53b41d48fd3ac7194d07f896d1c42868a1ab38665c817d512974d221c011fc0e39721a614dbb38203a4e4b71ae6638288f0c30418cd4568e4ad3a0b578c
|
@@ -38,7 +38,7 @@ module ActiveRecord
|
|
38
38
|
ActiveSupport::Deprecation.warn(
|
39
39
|
"Relation#update_all with conditions is deprecated. Please use " \
|
40
40
|
"Item.where(color: 'red').update_all(...) rather than " \
|
41
|
-
"Item.update_all(..., color: 'red')."
|
41
|
+
"Item.update_all(..., color: 'red').", caller
|
42
42
|
)
|
43
43
|
end
|
44
44
|
|
@@ -47,7 +47,7 @@ module ActiveRecord
|
|
47
47
|
|
48
48
|
ActiveSupport::Deprecation.warn(
|
49
49
|
"Relation#update_all with :limit / :order options is deprecated. " \
|
50
|
-
"Please use e.g. Post.limit(1).order(:foo).update_all instead."
|
50
|
+
"Please use e.g. Post.limit(1).order(:foo).update_all instead.", caller
|
51
51
|
)
|
52
52
|
end
|
53
53
|
|
@@ -58,7 +58,7 @@ module ActiveRecord
|
|
58
58
|
if (finder_options = options.except(:start, :batch_size)).present?
|
59
59
|
ActiveSupport::Deprecation.warn(
|
60
60
|
"Relation#find_in_batches with finder options is deprecated. Please build " \
|
61
|
-
"a scope and then call find_in_batches on it instead."
|
61
|
+
"a scope and then call find_in_batches on it instead.", caller
|
62
62
|
)
|
63
63
|
|
64
64
|
raise "You can't specify an order, it's forced to be #{batch_order}" if options[:order].present?
|
@@ -75,7 +75,7 @@ module ActiveRecord
|
|
75
75
|
if options.except(:distinct).present?
|
76
76
|
ActiveSupport::Deprecation.warn(
|
77
77
|
"Relation#calculate with finder options is deprecated. Please build " \
|
78
|
-
"a scope and then call calculate on it instead."
|
78
|
+
"a scope and then call calculate on it instead.", caller
|
79
79
|
)
|
80
80
|
|
81
81
|
apply_finder_options(options.except(:distinct), true)
|
@@ -97,14 +97,14 @@ module ActiveRecord
|
|
97
97
|
"Calling #find(#{finder.inspect}) is deprecated. Please call " \
|
98
98
|
"##{finder} directly instead. You have also used finder options. " \
|
99
99
|
"These are also deprecated. Please build a scope instead of using " \
|
100
|
-
"finder options."
|
100
|
+
"finder options.", caller
|
101
101
|
)
|
102
102
|
|
103
103
|
scope.send(finder)
|
104
104
|
else
|
105
105
|
ActiveSupport::Deprecation.warn(
|
106
106
|
"Passing options to #find is deprecated. Please build a scope " \
|
107
|
-
"and then call #find on it."
|
107
|
+
"and then call #find on it.", caller
|
108
108
|
)
|
109
109
|
|
110
110
|
scope.find(*args)
|
@@ -114,7 +114,7 @@ module ActiveRecord
|
|
114
114
|
when :first, :last, :all
|
115
115
|
ActiveSupport::Deprecation.warn(
|
116
116
|
"Calling #find(#{finder.inspect}) is deprecated. Please call " \
|
117
|
-
"##{finder} directly instead."
|
117
|
+
"##{finder} directly instead.", caller
|
118
118
|
)
|
119
119
|
|
120
120
|
send(finder)
|
@@ -133,7 +133,7 @@ module ActiveRecord
|
|
133
133
|
else
|
134
134
|
ActiveSupport::Deprecation.warn(
|
135
135
|
"Relation#first with finder options is deprecated. Please build " \
|
136
|
-
"a scope and then call #first on it instead."
|
136
|
+
"a scope and then call #first on it instead.", caller
|
137
137
|
)
|
138
138
|
|
139
139
|
apply_finder_options(args.first, true).first
|
@@ -150,7 +150,7 @@ module ActiveRecord
|
|
150
150
|
else
|
151
151
|
ActiveSupport::Deprecation.warn(
|
152
152
|
"Relation#last with finder options is deprecated. Please build " \
|
153
|
-
"a scope and then call #last on it instead."
|
153
|
+
"a scope and then call #last on it instead.", caller
|
154
154
|
)
|
155
155
|
|
156
156
|
apply_finder_options(args.first, true).last
|
@@ -163,7 +163,7 @@ module ActiveRecord
|
|
163
163
|
"Relation#all is deprecated. If you want to eager-load a relation, you can " \
|
164
164
|
"call #load (e.g. `Post.where(published: true).load`). If you want " \
|
165
165
|
"to get an array of records from a relation, you can call #to_a (e.g. " \
|
166
|
-
"`Post.where(published: true).to_a`)."
|
166
|
+
"`Post.where(published: true).to_a`).", caller
|
167
167
|
)
|
168
168
|
apply_finder_options(args.first, true).to_a
|
169
169
|
end
|
metadata
CHANGED
@@ -1,38 +1,34 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activerecord-deprecated_finders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jon Leighton
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-06-11 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: minitest
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '3'
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: activerecord
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 4.0.0.beta
|
38
34
|
- - <
|
@@ -41,9 +37,8 @@ dependencies:
|
|
41
37
|
type: :development
|
42
38
|
prerelease: false
|
43
39
|
version_requirements: !ruby/object:Gem::Requirement
|
44
|
-
none: false
|
45
40
|
requirements:
|
46
|
-
- -
|
41
|
+
- - '>='
|
47
42
|
- !ruby/object:Gem::Version
|
48
43
|
version: 4.0.0.beta
|
49
44
|
- - <
|
@@ -52,7 +47,6 @@ dependencies:
|
|
52
47
|
- !ruby/object:Gem::Dependency
|
53
48
|
name: sqlite3
|
54
49
|
requirement: !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
50
|
requirements:
|
57
51
|
- - ~>
|
58
52
|
- !ruby/object:Gem::Version
|
@@ -60,7 +54,6 @@ dependencies:
|
|
60
54
|
type: :development
|
61
55
|
prerelease: false
|
62
56
|
version_requirements: !ruby/object:Gem::Requirement
|
63
|
-
none: false
|
64
57
|
requirements:
|
65
58
|
- - ~>
|
66
59
|
- !ruby/object:Gem::Version
|
@@ -101,27 +94,26 @@ files:
|
|
101
94
|
- test/with_scope_test.rb
|
102
95
|
homepage: https://github.com/rails/activerecord-deprecated_finders
|
103
96
|
licenses: []
|
97
|
+
metadata: {}
|
104
98
|
post_install_message:
|
105
99
|
rdoc_options: []
|
106
100
|
require_paths:
|
107
101
|
- lib
|
108
102
|
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
103
|
requirements:
|
111
|
-
- -
|
104
|
+
- - '>='
|
112
105
|
- !ruby/object:Gem::Version
|
113
106
|
version: '0'
|
114
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
108
|
requirements:
|
117
|
-
- -
|
109
|
+
- - '>='
|
118
110
|
- !ruby/object:Gem::Version
|
119
111
|
version: '0'
|
120
112
|
requirements: []
|
121
113
|
rubyforge_project:
|
122
|
-
rubygems_version:
|
114
|
+
rubygems_version: 2.0.2
|
123
115
|
signing_key:
|
124
|
-
specification_version:
|
116
|
+
specification_version: 4
|
125
117
|
summary: This gem contains deprecated finder APIs extracted from Active Record.
|
126
118
|
test_files:
|
127
119
|
- test/associations_test.rb
|