fake_arel 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.2.0
data/fake_arel.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{fake_arel}
8
- s.version = "1.1.0"
8
+ s.version = "1.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Grant Ammons"]
12
- s.date = %q{2013-03-08}
12
+ s.date = %q{2013-05-15}
13
13
  s.description = %q{fake_arel will simulate rails 3 arel syntax for Rails 2.}
14
14
  s.email = %q{grant@pipelinedealsco.com}
15
15
  s.extra_rdoc_files = [
@@ -37,6 +37,8 @@ module WithScopeReplacement
37
37
  else
38
38
  hash[method][key] = merge_conditions(params[key], hash[method][key])
39
39
  end
40
+ elsif key == :select && merge
41
+ hash[method][key] = merge_includes(hash[method][key], params[key]).uniq.join(', ')
40
42
  elsif key == :include && merge
41
43
  hash[method][key] = merge_includes(hash[method][key], params[key]).uniq
42
44
  elsif key == :joins && merge
@@ -257,6 +257,14 @@ describe "NameScope bug" do
257
257
  Reply.group('replies.topic_id').count.should == Reply.count(:group => 'replies.topic_id')
258
258
  end
259
259
  end
260
+
261
+ context "using multiple select statements" do
262
+ it "should respect multiple select statements" do
263
+ topics = Topic.select("distinct(topics.id)").select("topics.title as topic_title").first
264
+ topics.topic_title.should_not be_nil
265
+ topics.id.should_not be_nil
266
+ end
267
+ end
260
268
  end
261
269
 
262
270
  describe "using select with include" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_arel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 1.1.0
10
+ version: 1.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Grant Ammons
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-03-08 00:00:00 -05:00
18
+ date: 2013-05-15 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -30,10 +30,10 @@ dependencies:
30
30
  - 3
31
31
  - 11
32
32
  version: 2.3.11
33
- version_requirements: *id001
33
+ type: :runtime
34
34
  name: activerecord
35
+ version_requirements: *id001
35
36
  prerelease: false
36
- type: :runtime
37
37
  - !ruby/object:Gem::Dependency
38
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
@@ -44,10 +44,10 @@ dependencies:
44
44
  segments:
45
45
  - 0
46
46
  version: "0"
47
- version_requirements: *id002
47
+ type: :development
48
48
  name: bundler
49
+ version_requirements: *id002
49
50
  prerelease: false
50
- type: :development
51
51
  - !ruby/object:Gem::Dependency
52
52
  requirement: &id003 !ruby/object:Gem::Requirement
53
53
  none: false
@@ -60,10 +60,10 @@ dependencies:
60
60
  - 6
61
61
  - 4
62
62
  version: 1.6.4
63
- version_requirements: *id003
63
+ type: :development
64
64
  name: jeweler
65
+ version_requirements: *id003
65
66
  prerelease: false
66
- type: :development
67
67
  - !ruby/object:Gem::Dependency
68
68
  requirement: &id004 !ruby/object:Gem::Requirement
69
69
  none: false
@@ -74,10 +74,10 @@ dependencies:
74
74
  segments:
75
75
  - 0
76
76
  version: "0"
77
- version_requirements: *id004
77
+ type: :development
78
78
  name: rcov
79
+ version_requirements: *id004
79
80
  prerelease: false
80
- type: :development
81
81
  - !ruby/object:Gem::Dependency
82
82
  requirement: &id005 !ruby/object:Gem::Requirement
83
83
  none: false
@@ -88,10 +88,10 @@ dependencies:
88
88
  segments:
89
89
  - 0
90
90
  version: "0"
91
- version_requirements: *id005
91
+ type: :development
92
92
  name: debugger
93
+ version_requirements: *id005
93
94
  prerelease: false
94
- type: :development
95
95
  - !ruby/object:Gem::Dependency
96
96
  requirement: &id006 !ruby/object:Gem::Requirement
97
97
  none: false
@@ -104,10 +104,10 @@ dependencies:
104
104
  - 3
105
105
  - 1
106
106
  version: 1.3.1
107
- version_requirements: *id006
107
+ type: :development
108
108
  name: rspec
109
+ version_requirements: *id006
109
110
  prerelease: false
110
- type: :development
111
111
  - !ruby/object:Gem::Dependency
112
112
  requirement: &id007 !ruby/object:Gem::Requirement
113
113
  none: false
@@ -118,10 +118,10 @@ dependencies:
118
118
  segments:
119
119
  - 0
120
120
  version: "0"
121
- version_requirements: *id007
121
+ type: :development
122
122
  name: sqlite3-ruby
123
+ version_requirements: *id007
123
124
  prerelease: false
124
- type: :development
125
125
  description: fake_arel will simulate rails 3 arel syntax for Rails 2.
126
126
  email: grant@pipelinedealsco.com
127
127
  executables: []