arel 3.0.0.rc1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +1 -1
- data/arel.gemspec +6 -6
- data/lib/arel.rb +1 -1
- data/lib/arel/crud.rb +3 -3
- data/lib/arel/select_manager.rb +4 -4
- data/lib/arel/table.rb +4 -4
- data/lib/arel/visitors/to_sql.rb +2 -2
- metadata +9 -20
data/README.markdown
CHANGED
data/arel.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "arel"
|
5
|
-
s.version = "3.0.0.
|
5
|
+
s.version = "3.0.0.20120112113618"
|
6
6
|
|
7
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Aaron Patterson", "Bryan Halmkamp", "Emilio Tagua", "Nick Kallen"]
|
9
|
-
s.date = "
|
9
|
+
s.date = "2012-01-12"
|
10
10
|
s.description = "Arel is a SQL AST manager for Ruby. It\n\n1. Simplifies the generation of complex SQL queries\n2. Adapts to various RDBMS systems\n\nIt is intended to be a framework framework; that is, you can build your own ORM\nwith it, focusing on innovative object and collection modeling as opposed to\ndatabase compatibility and query generation."
|
11
11
|
s.email = ["aaron@tenderlovemaking.com", "bryan@brynary.com", "miloops@gmail.com", "nick@example.org"]
|
12
12
|
s.extra_rdoc_files = ["History.txt", "MIT-LICENSE.txt", "Manifest.txt", "README.markdown"]
|
@@ -23,14 +23,14 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.specification_version = 3
|
24
24
|
|
25
25
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
26
|
-
s.add_development_dependency(%q<minitest>, ["~> 2.8"])
|
27
26
|
s.add_development_dependency(%q<hoe>, ["~> 2.12"])
|
27
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.10"])
|
28
28
|
else
|
29
|
-
s.add_dependency(%q<minitest>, ["~> 2.8"])
|
30
29
|
s.add_dependency(%q<hoe>, ["~> 2.12"])
|
30
|
+
s.add_dependency(%q<rdoc>, ["~> 3.10"])
|
31
31
|
end
|
32
32
|
else
|
33
|
-
s.add_dependency(%q<minitest>, ["~> 2.8"])
|
34
33
|
s.add_dependency(%q<hoe>, ["~> 2.12"])
|
34
|
+
s.add_dependency(%q<rdoc>, ["~> 3.10"])
|
35
35
|
end
|
36
36
|
end
|
data/lib/arel.rb
CHANGED
data/lib/arel/crud.rb
CHANGED
@@ -22,7 +22,7 @@ module Arel
|
|
22
22
|
def update values
|
23
23
|
if $VERBOSE
|
24
24
|
warn <<-eowarn
|
25
|
-
update (#{caller.first}) is deprecated and will be removed in ARel
|
25
|
+
update (#{caller.first}) is deprecated and will be removed in ARel 4.0.0. Please
|
26
26
|
switch to `compile_update`
|
27
27
|
eowarn
|
28
28
|
end
|
@@ -45,7 +45,7 @@ switch to `compile_update`
|
|
45
45
|
def insert values
|
46
46
|
if $VERBOSE
|
47
47
|
warn <<-eowarn
|
48
|
-
insert (#{caller.first}) is deprecated and will be removed in ARel
|
48
|
+
insert (#{caller.first}) is deprecated and will be removed in ARel 4.0.0. Please
|
49
49
|
switch to `compile_insert`
|
50
50
|
eowarn
|
51
51
|
end
|
@@ -62,7 +62,7 @@ switch to `compile_insert`
|
|
62
62
|
def delete
|
63
63
|
if $VERBOSE
|
64
64
|
warn <<-eowarn
|
65
|
-
delete (#{caller.first}) is deprecated and will be removed in ARel
|
65
|
+
delete (#{caller.first}) is deprecated and will be removed in ARel 4.0.0. Please
|
66
66
|
switch to `compile_delete`
|
67
67
|
eowarn
|
68
68
|
end
|
data/lib/arel/select_manager.rb
CHANGED
@@ -49,7 +49,7 @@ module Arel
|
|
49
49
|
|
50
50
|
def where_clauses
|
51
51
|
if $VERBOSE
|
52
|
-
warn "(#{caller.first}) where_clauses is deprecated and will be removed in arel
|
52
|
+
warn "(#{caller.first}) where_clauses is deprecated and will be removed in arel 4.0.0 with no replacement"
|
53
53
|
end
|
54
54
|
to_sql = Visitors::ToSql.new @engine.connection
|
55
55
|
@ctx.wheres.map { |c| to_sql.accept c }
|
@@ -160,7 +160,7 @@ module Arel
|
|
160
160
|
end
|
161
161
|
|
162
162
|
def wheres
|
163
|
-
warn "#{caller[0]}: SelectManager#wheres is deprecated and will be removed in ARel
|
163
|
+
warn "#{caller[0]}: SelectManager#wheres is deprecated and will be removed in ARel 4.0.0 with no replacement"
|
164
164
|
Compatibility::Wheres.new @engine.connection, @ctx.wheres
|
165
165
|
end
|
166
166
|
|
@@ -238,7 +238,7 @@ module Arel
|
|
238
238
|
|
239
239
|
def joins manager
|
240
240
|
if $VERBOSE
|
241
|
-
warn "joins is deprecated and will be removed in
|
241
|
+
warn "joins is deprecated and will be removed in 4.0.0"
|
242
242
|
warn "please remove your call to joins from #{caller.first}"
|
243
243
|
end
|
244
244
|
manager.join_sql
|
@@ -266,7 +266,7 @@ module Arel
|
|
266
266
|
def insert values
|
267
267
|
if $VERBOSE
|
268
268
|
warn <<-eowarn
|
269
|
-
insert (#{caller.first}) is deprecated and will be removed in ARel
|
269
|
+
insert (#{caller.first}) is deprecated and will be removed in ARel 4.0.0. Please
|
270
270
|
switch to `compile_insert`
|
271
271
|
eowarn
|
272
272
|
end
|
data/lib/arel/table.rb
CHANGED
@@ -32,7 +32,7 @@ module Arel
|
|
32
32
|
def primary_key
|
33
33
|
if $VERBOSE
|
34
34
|
warn <<-eowarn
|
35
|
-
primary_key (#{caller.first}) is deprecated and will be removed in ARel
|
35
|
+
primary_key (#{caller.first}) is deprecated and will be removed in ARel 4.0.0
|
36
36
|
eowarn
|
37
37
|
end
|
38
38
|
@primary_key ||= begin
|
@@ -54,7 +54,7 @@ primary_key (#{caller.first}) is deprecated and will be removed in ARel 3.0.0
|
|
54
54
|
|
55
55
|
def joins manager
|
56
56
|
if $VERBOSE
|
57
|
-
warn "joins is deprecated and will be removed in
|
57
|
+
warn "joins is deprecated and will be removed in 4.0.0"
|
58
58
|
warn "please remove your call to joins from #{caller.first}"
|
59
59
|
end
|
60
60
|
nil
|
@@ -104,7 +104,7 @@ primary_key (#{caller.first}) is deprecated and will be removed in ARel 3.0.0
|
|
104
104
|
if $VERBOSE
|
105
105
|
warn <<-eowarn
|
106
106
|
(#{caller.first}) Arel::Table#columns is deprecated and will be removed in
|
107
|
-
Arel
|
107
|
+
Arel 4.0.0 with no replacement. PEW PEW PEW!!!
|
108
108
|
eowarn
|
109
109
|
end
|
110
110
|
@columns ||=
|
@@ -138,7 +138,7 @@ Arel 3.0.0 with no replacement. PEW PEW PEW!!!
|
|
138
138
|
if $VERBOSE
|
139
139
|
warn <<-eowarn
|
140
140
|
(#{caller.first}) Arel::Table.table_cache is deprecated and will be removed in
|
141
|
-
Arel
|
141
|
+
Arel 4.0.0 with no replacement. PEW PEW PEW!!!
|
142
142
|
eowarn
|
143
143
|
end
|
144
144
|
@@table_cache ||= Hash[engine.connection.tables.map { |x| [x,true] }]
|
data/lib/arel/visitors/to_sql.rb
CHANGED
@@ -47,7 +47,7 @@ module Arel
|
|
47
47
|
unless key
|
48
48
|
warn(<<-eowarn) if $VERBOSE
|
49
49
|
(#{caller.first}) Using UpdateManager without setting UpdateManager#key is
|
50
|
-
deprecated and support will be removed in ARel
|
50
|
+
deprecated and support will be removed in ARel 4.0.0. Please set the primary
|
51
51
|
key on UpdateManager using UpdateManager#key=
|
52
52
|
eowarn
|
53
53
|
key = o.relation.primary_key
|
@@ -133,7 +133,7 @@ key on UpdateManager using UpdateManager#key=
|
|
133
133
|
(visit(o.set_quantifier) if o.set_quantifier),
|
134
134
|
("#{o.projections.map { |x| visit x }.join ', '}" unless o.projections.empty?),
|
135
135
|
("FROM #{visit(o.source)}" if o.source && !o.source.empty?),
|
136
|
-
("WHERE #{o.wheres.map { |x|
|
136
|
+
("WHERE #{o.wheres.map { |x| accept x }.join ' AND ' }" unless o.wheres.empty?),
|
137
137
|
("GROUP BY #{o.groups.map { |x| visit x }.join ', ' }" unless o.groups.empty?),
|
138
138
|
(visit(o.having) if o.having),
|
139
139
|
].compact.join ' '
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0
|
5
|
-
prerelease:
|
4
|
+
version: 3.0.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Aaron Patterson
|
@@ -12,22 +12,11 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2012-01-12 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
|
-
- !ruby/object:Gem::Dependency
|
18
|
-
name: minitest
|
19
|
-
requirement: &70238561431700 !ruby/object:Gem::Requirement
|
20
|
-
none: false
|
21
|
-
requirements:
|
22
|
-
- - ~>
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: '2.9'
|
25
|
-
type: :development
|
26
|
-
prerelease: false
|
27
|
-
version_requirements: *70238561431700
|
28
17
|
- !ruby/object:Gem::Dependency
|
29
18
|
name: hoe
|
30
|
-
requirement: &
|
19
|
+
requirement: &70284393537020 !ruby/object:Gem::Requirement
|
31
20
|
none: false
|
32
21
|
requirements:
|
33
22
|
- - ~>
|
@@ -35,10 +24,10 @@ dependencies:
|
|
35
24
|
version: '2.12'
|
36
25
|
type: :development
|
37
26
|
prerelease: false
|
38
|
-
version_requirements: *
|
27
|
+
version_requirements: *70284393537020
|
39
28
|
- !ruby/object:Gem::Dependency
|
40
29
|
name: rdoc
|
41
|
-
requirement: &
|
30
|
+
requirement: &70284393837600 !ruby/object:Gem::Requirement
|
42
31
|
none: false
|
43
32
|
requirements:
|
44
33
|
- - ~>
|
@@ -46,7 +35,7 @@ dependencies:
|
|
46
35
|
version: '3.10'
|
47
36
|
type: :development
|
48
37
|
prerelease: false
|
49
|
-
version_requirements: *
|
38
|
+
version_requirements: *70284393837600
|
50
39
|
description: ! 'Arel is a SQL AST manager for Ruby. It
|
51
40
|
|
52
41
|
|
@@ -209,9 +198,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
209
198
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
199
|
none: false
|
211
200
|
requirements:
|
212
|
-
- - ! '
|
201
|
+
- - ! '>='
|
213
202
|
- !ruby/object:Gem::Version
|
214
|
-
version:
|
203
|
+
version: '0'
|
215
204
|
requirements: []
|
216
205
|
rubyforge_project: arel
|
217
206
|
rubygems_version: 1.8.11
|