arel 4.0.0.beta2 → 4.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/Gemfile CHANGED
@@ -2,10 +2,11 @@
2
2
 
3
3
  # DO NOT EDIT THIS FILE. Instead, edit Rakefile, and run `rake bundler:gemfile`.
4
4
 
5
- source :gemcutter
5
+ source "https://rubygems.org/"
6
6
 
7
7
 
8
- gem "minitest", "~>4.6.2", :group => [:development, :test]
9
- gem "hoe", "~>3.3.1", :group => [:development, :test]
8
+ gem "minitest", "~>4.4", :group => [:development, :test]
9
+ gem "rdoc", "~>4.0", :group => [:development, :test]
10
+ gem "hoe", "~>3.5", :group => [:development, :test]
10
11
 
11
12
  # vim: syntax=ruby
data/History.txt CHANGED
@@ -144,7 +144,7 @@
144
144
 
145
145
  * Deprecations
146
146
 
147
- * Support for Subclasses of core classes will be removed in ARel version
147
+ * Support for Subclasses of core classes will be removed in Arel version
148
148
  2.2.0
149
149
 
150
150
  == 2.0.4
@@ -184,7 +184,7 @@
184
184
 
185
185
  * Introduced "SQL compilers" for query generation.
186
186
  * Added support for Oracle (Raimonds Simanovskis) and IBM/DB (Praveen Devarao).
187
- * Improvements to give better support to ActiveRecord.
187
+ * Improvements to give better support to Active Record.
188
188
 
189
189
  == 0.2.1 / 2010-02-05
190
190
 
@@ -195,7 +195,7 @@
195
195
  == 0.2.0 / 2010-01-31
196
196
 
197
197
  * Ruby 1.9 compatibility
198
- * Many improvements to support the Arel integration into ActiveRecord (see `git log v0.1.0..v0.2.0`)
198
+ * Many improvements to support the Arel integration into Active Record (see `git log v0.1.0..v0.2.0`)
199
199
  * Thanks to Emilio Tagua and Pratik Naik for many significant contributions!
200
200
 
201
201
  == 0.1.0 / 2009-08-06
data/README.markdown CHANGED
@@ -1,4 +1,4 @@
1
- # ARel [![Build Status](https://secure.travis-ci.org/rails/arel.png)](http://travis-ci.org/rails/arel) [![Dependency Status](https://gemnasium.com/rails/arel.png)](https://gemnasium.com/rails/arel)
1
+ # Arel [![Build Status](https://secure.travis-ci.org/rails/arel.png)](http://travis-ci.org/rails/arel) [![Dependency Status](https://gemnasium.com/rails/arel.png)](https://gemnasium.com/rails/arel)
2
2
 
3
3
  * http://github.com/rails/arel
4
4
 
@@ -15,11 +15,11 @@ database compatibility and query generation.
15
15
 
16
16
  ## Status
17
17
 
18
- For the moment, Arel uses ActiveRecord's connection adapters to connect to the various engines, connection pooling, perform quoting, and do type conversion.
18
+ For the moment, Arel uses Active Record's connection adapters to connect to the various engines, connection pooling, perform quoting, and do type conversion.
19
19
 
20
20
  ## A Gentle Introduction
21
21
 
22
- Generating a query with ARel is simple. For example, in order to produce
22
+ Generating a query with Arel is simple. For example, in order to produce
23
23
 
24
24
  SELECT * FROM users
25
25
 
@@ -116,3 +116,7 @@ The `parent_id` column is a foreign key from the `comments` table to itself. Now
116
116
  # => SELECT * FROM comments INNER JOIN comments AS comments_2 WHERE comments_2.parent_id = comments.id
117
117
 
118
118
  This will return the first comment's reply's body.
119
+
120
+ ### License
121
+
122
+ Arel is released under the [MIT License](http://opensource.org/licenses/MIT).
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 = "4.0.0.beta2.20130314230643"
5
+ s.version = "4.0.0.20130418133826"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Aaron Patterson", "Bryan Halmkamp", "Emilio Tagua", "Nick Kallen"]
9
- s.date = "2013-03-15"
9
+ s.date = "2013-04-18"
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"]
data/lib/arel.rb CHANGED
@@ -32,7 +32,7 @@ require 'arel/sql_literal'
32
32
  ####
33
33
 
34
34
  module Arel
35
- VERSION = '4.0.0.beta2'
35
+ VERSION = '4.0.0'
36
36
 
37
37
  def self.sql raw_sql
38
38
  Arel::Nodes::SqlLiteral.new raw_sql
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 4.0.0. Please
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 4.0.0. Please
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 4.0.0. Please
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
@@ -170,7 +170,7 @@ module Arel
170
170
  end
171
171
 
172
172
  def wheres
173
- warn "#{caller[0]}: SelectManager#wheres is deprecated and will be removed in ARel 4.0.0 with no replacement"
173
+ warn "#{caller[0]}: SelectManager#wheres is deprecated and will be removed in Arel 4.0.0 with no replacement"
174
174
  Compatibility::Wheres.new @engine.connection, @ctx.wheres
175
175
  end
176
176
 
@@ -276,7 +276,7 @@ module Arel
276
276
  def insert values
277
277
  if $VERBOSE
278
278
  warn <<-eowarn
279
- insert (#{caller.first}) is deprecated and will be removed in ARel 4.0.0. Please
279
+ insert (#{caller.first}) is deprecated and will be removed in Arel 4.0.0. Please
280
280
  switch to `compile_insert`
281
281
  eowarn
282
282
  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 4.0.0
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
@@ -254,7 +254,7 @@ module Arel
254
254
  end
255
255
 
256
256
  def to_dot
257
- "digraph \"ARel\" {\nnode [width=0.375,height=0.25,shape=record];\n" +
257
+ "digraph \"Arel\" {\nnode [width=0.375,height=0.25,shape=record];\n" +
258
258
  @nodes.map { |node|
259
259
  label = "<f0>#{node.name}"
260
260
 
@@ -25,8 +25,9 @@ module Arel
25
25
  SELECT * FROM (
26
26
  SELECT raw_sql_.*, rownum raw_rnum_
27
27
  FROM (#{sql}) raw_sql_
28
+ WHERE rownum <= #{offset.expr.to_i + limit}
28
29
  )
29
- WHERE raw_rnum_ >= #{offset.expr.to_i + 1 } and rownum <= #{limit}
30
+ WHERE #{visit offset}
30
31
  eosql
31
32
  end
32
33
 
@@ -96,7 +96,7 @@ module Arel
96
96
  unless key
97
97
  warn(<<-eowarn) if $VERBOSE
98
98
  (#{caller.first}) Using UpdateManager without setting UpdateManager#key is
99
- deprecated and support will be removed in ARel 4.0.0. Please set the primary
99
+ deprecated and support will be removed in Arel 4.0.0. Please set the primary
100
100
  key on UpdateManager using UpdateManager#key=
101
101
  eowarn
102
102
  key = o.relation.primary_key
@@ -102,8 +102,9 @@ module Arel
102
102
  SELECT * FROM (
103
103
  SELECT raw_sql_.*, rownum raw_rnum_
104
104
  FROM (SELECT) raw_sql_
105
+ WHERE rownum <= 20
105
106
  )
106
- WHERE raw_rnum_ >= 11 and rownum <= 10
107
+ WHERE raw_rnum_ > 10
107
108
  }
108
109
  end
109
110
 
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta2
4
+ version: 4.0.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Aaron Patterson
@@ -11,39 +12,44 @@ authors:
11
12
  autorequire:
12
13
  bindir: bin
13
14
  cert_chain: []
14
- date: 2013-03-15 00:00:00.000000000 Z
15
+ date: 2013-04-18 00:00:00.000000000 Z
15
16
  dependencies:
16
17
  - !ruby/object:Gem::Dependency
17
18
  name: minitest
18
19
  requirement: !ruby/object:Gem::Requirement
20
+ none: false
19
21
  requirements:
20
22
  - - ~>
21
23
  - !ruby/object:Gem::Version
22
- version: '4.6'
24
+ version: '4.4'
23
25
  type: :development
24
26
  prerelease: false
25
27
  version_requirements: !ruby/object:Gem::Requirement
28
+ none: false
26
29
  requirements:
27
30
  - - ~>
28
31
  - !ruby/object:Gem::Version
29
- version: '4.6'
32
+ version: '4.4'
30
33
  - !ruby/object:Gem::Dependency
31
34
  name: rdoc
32
35
  requirement: !ruby/object:Gem::Requirement
36
+ none: false
33
37
  requirements:
34
38
  - - ~>
35
39
  - !ruby/object:Gem::Version
36
- version: '3.10'
40
+ version: '4.0'
37
41
  type: :development
38
42
  prerelease: false
39
43
  version_requirements: !ruby/object:Gem::Requirement
44
+ none: false
40
45
  requirements:
41
46
  - - ~>
42
47
  - !ruby/object:Gem::Version
43
- version: '3.10'
48
+ version: '4.0'
44
49
  - !ruby/object:Gem::Dependency
45
50
  name: hoe
46
51
  requirement: !ruby/object:Gem::Requirement
52
+ none: false
47
53
  requirements:
48
54
  - - ~>
49
55
  - !ruby/object:Gem::Version
@@ -51,19 +57,24 @@ dependencies:
51
57
  type: :development
52
58
  prerelease: false
53
59
  version_requirements: !ruby/object:Gem::Requirement
60
+ none: false
54
61
  requirements:
55
62
  - - ~>
56
63
  - !ruby/object:Gem::Version
57
64
  version: '3.5'
58
- description: |-
59
- Arel is a SQL AST manager for Ruby. It
65
+ description: ! 'Arel is a SQL AST manager for Ruby. It
66
+
60
67
 
61
68
  1. Simplifies the generation of complex SQL queries
69
+
62
70
  2. Adapts to various RDBMS systems
63
71
 
72
+
64
73
  It is intended to be a framework framework; that is, you can build your own ORM
74
+
65
75
  with it, focusing on innovative object and collection modeling as opposed to
66
- database compatibility and query generation.
76
+
77
+ database compatibility and query generation.'
67
78
  email:
68
79
  - aaron@tenderlovemaking.com
69
80
  - bryan@brynary.com
@@ -212,7 +223,6 @@ files:
212
223
  - test/visitors/test_to_sql.rb
213
224
  homepage: http://github.com/rails/arel
214
225
  licenses: []
215
- metadata: {}
216
226
  post_install_message:
217
227
  rdoc_options:
218
228
  - --main
@@ -220,20 +230,22 @@ rdoc_options:
220
230
  require_paths:
221
231
  - lib
222
232
  required_ruby_version: !ruby/object:Gem::Requirement
233
+ none: false
223
234
  requirements:
224
- - - '>='
235
+ - - ! '>='
225
236
  - !ruby/object:Gem::Version
226
237
  version: '0'
227
238
  required_rubygems_version: !ruby/object:Gem::Requirement
239
+ none: false
228
240
  requirements:
229
- - - '>'
241
+ - - ! '>='
230
242
  - !ruby/object:Gem::Version
231
- version: 1.3.1
243
+ version: '0'
232
244
  requirements: []
233
245
  rubyforge_project: arel
234
- rubygems_version: 2.0.2
246
+ rubygems_version: 1.8.23
235
247
  signing_key:
236
- specification_version: 4
248
+ specification_version: 3
237
249
  summary: Arel is a SQL AST manager for Ruby
238
250
  test_files:
239
251
  - test/attributes/test_attribute.rb
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: f4264ab4b4e747b29ec7a97c5d54f79f95ef15db
4
- data.tar.gz: 9122058016114dc381291e8d66d62fcd1327bdb6
5
- SHA512:
6
- metadata.gz: 24d225c695b37c2a1923ff2460ab13a0711fb2659f1440ca3ef898e6bd6cb7cd65ee6001af10d013b4c6d6e7cd41aa983ef48011df036f1db76e868fc2b04695
7
- data.tar.gz: d836640d595a871b8bcb23410ae28412604f51c396ffc3da56017c38af2503bcac1ebe898807a77ab3377390eba48fafb4396856b2d22ed16377f26aa19f07c6