arel 2.0.8.beta.20110131120940 → 2.0.8

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.
@@ -1,4 +1,11 @@
1
- == 2.0.7 (unreleased)
1
+ == 2.0.8 / 2010/02/08
2
+
3
+ * Bug Fixes
4
+
5
+ * Added set operation support
6
+ * Fixed problems with *_any / *_all methods.
7
+
8
+ == 2.0.7
2
9
 
3
10
  * Bug Fixes
4
11
 
@@ -29,7 +29,7 @@ require 'arel/sql_literal'
29
29
  ####
30
30
 
31
31
  module Arel
32
- VERSION = '2.0.8.beta'
32
+ VERSION = '2.0.8'
33
33
 
34
34
  def self.sql raw_sql
35
35
  Arel::Nodes::SqlLiteral.new raw_sql
@@ -163,6 +163,7 @@ module Arel
163
163
  private
164
164
 
165
165
  def grouping_any method_id, others
166
+ others = others.dup
166
167
  first = send method_id, others.shift
167
168
 
168
169
  Nodes::Grouping.new others.inject(first) { |memo,expr|
@@ -171,6 +172,7 @@ module Arel
171
172
  end
172
173
 
173
174
  def grouping_all method_id, others
175
+ others = others.dup
174
176
  first = send method_id, others.shift
175
177
 
176
178
  Nodes::Grouping.new others.inject(first) { |memo,expr|
@@ -366,6 +366,14 @@ module Arel
366
366
  SELECT "users"."id" FROM "users" WHERE ("users"."id" = 1 OR "users"."id" = 2)
367
367
  }
368
368
  end
369
+
370
+ it 'should not eat input' do
371
+ relation = Table.new(:users)
372
+ mgr = relation.project relation[:id]
373
+ values = [1,2]
374
+ mgr.where relation[:id].eq_any(values)
375
+ values.must_equal [1,2]
376
+ end
369
377
  end
370
378
 
371
379
  describe '#eq_all' do
@@ -382,6 +390,14 @@ module Arel
382
390
  SELECT "users"."id" FROM "users" WHERE ("users"."id" = 1 AND "users"."id" = 2)
383
391
  }
384
392
  end
393
+
394
+ it 'should not eat input' do
395
+ relation = Table.new(:users)
396
+ mgr = relation.project relation[:id]
397
+ values = [1,2]
398
+ mgr.where relation[:id].eq_all(values)
399
+ values.must_equal [1,2]
400
+ end
385
401
  end
386
402
 
387
403
  describe '#matches' do
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 40220250905851
5
- prerelease: true
4
+ hash: 31
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
9
  - 8
10
- - beta
11
- - 20110131120940
12
- version: 2.0.8.beta.20110131120940
10
+ version: 2.0.8
13
11
  platform: ruby
14
12
  authors:
15
13
  - Aaron Patterson
@@ -20,7 +18,7 @@ autorequire:
20
18
  bindir: bin
21
19
  cert_chain: []
22
20
 
23
- date: 2011-01-31 00:00:00 -08:00
21
+ date: 2011-02-08 00:00:00 -08:00
24
22
  default_executable:
25
23
  dependencies:
26
24
  - !ruby/object:Gem::Dependency
@@ -249,18 +247,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
249
247
  required_rubygems_version: !ruby/object:Gem::Requirement
250
248
  none: false
251
249
  requirements:
252
- - - ">"
250
+ - - ">="
253
251
  - !ruby/object:Gem::Version
254
- hash: 25
252
+ hash: 3
255
253
  segments:
256
- - 1
257
- - 3
258
- - 1
259
- version: 1.3.1
254
+ - 0
255
+ version: "0"
260
256
  requirements: []
261
257
 
262
258
  rubyforge_project: arel
263
- rubygems_version: 1.3.7
259
+ rubygems_version: 1.5.0
264
260
  signing_key:
265
261
  specification_version: 3
266
262
  summary: Arel is a Relational Algebra for Ruby