directiverecord 0.1.16 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmEyYjEwZjExYzg4OTE0ZjE2MTc5NjhmNTU4NzgyOGFhZGY5MzVhZA==
4
+ YmQwN2FkODM3MTk4NjFkOTFhYjViYjIxYjdlYzlhZmM0YmMzZTIwMg==
5
5
  data.tar.gz: !binary |-
6
- ZjQxZDk5OGUyMWU2MjkyZTcyNTA5Yzc3OTFhOTY5OWU0ZDU3YjQyYw==
6
+ Y2RjZjMwNTUzODkxYjgwNWRmODAxNTZiZTlhZTIzZWMyZjNjNDc4Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTgzNDFjMGJmNTY5ZTcxN2Q5ZjRmNDhlMTIwZDA2Y2RjMTI0YTRjN2YzMmI0
10
- Yjk0NjM5Zjc2ZmNhMmEwNzY2YjkxOThlZjA1YzBmYzQ4YmI4NDI4NTg3YjBh
11
- MmZhZDliY2Y3YzBjMDM2NTNjMjZlMTVkZWRkYzllNjU2MGQ1ZTM=
9
+ NmZiMmEwMTgxNThjZGVlZjA0NjFlYTE2OGZhZWU3ZGQyMjU4NjVjNGRkYTg1
10
+ MjlhNDNlYTFhMTNhMGI3MzI4YTRhZjZjYmJhNDk3M2U2NTExYjkzZGI2ZTU5
11
+ MzA3MjM5ZjQ3Yzk5YTcwZWFmZWI4MDIyZmI1MTY5YmQ0NWMyMzA=
12
12
  data.tar.gz: !binary |-
13
- MWMwODE0ZjUxZTJiOGExMjhkODBjM2JlZjhkZjg0YWNkNmUzNTM2Mjc0YTYy
14
- MDUxZWM1MmYzYWE1MDA5ZjA4NjYxMGUyNDhiNDZkYjA5YWEzNzcwMTBkZGJl
15
- NGQxOTZhOWVkZmVhOGY5Y2E1NmVjOWMzODRlMTZjNzU4YTI1M2Q=
13
+ ZWYyYmY0OGI2YmQwZGZmNWIyMTEyNDA2ZDNiY2M1ZjAwN2M1ZjUyNGI5NWFh
14
+ MjgwMzA0Yjg4YTk1ZmE1ZDgxMjhmZWY5OGFiNjI1NmZmYzRiMTc4OWZiMjg0
15
+ ZDBkNzUxNWMwNmI4YzE0ODA3MmQ0NTAxZjBiMzE4M2E3MzQyMGE=
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = DirectiveRecord CHANGELOG
2
2
 
3
+ == Version 0.1.17 (March 13, 2015)
4
+
5
+ * Corrected normalize_subselect!
6
+
3
7
  == Version 0.1.16 (March 12, 2015)
4
8
 
5
9
  * Made ActiveRecord::Relation#count(:all) override more strict: only overrule behavior when having detected a possible path in the query options
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.16
1
+ 0.1.17
@@ -190,8 +190,11 @@ SQL
190
190
 
191
191
  if opts[:join] && !qry_options[:group_by].blank?
192
192
  joins = qry_options[:group_by].collect do |path|
193
- qry_options[:select].unshift(column = path.gsub(/\.\w+$/, "_id").strip)
194
- "#{query_alias}.#{column} = #{base_alias}.#{column}"
193
+ column = path.gsub(/\.\w+$/, "_id").strip
194
+ column.match(/(.*) AS (\w+)$/)
195
+ select_sql, select_alias = $1, $2
196
+ qry_options[:select].unshift(column)
197
+ "#{query_alias}.#{select_alias || column} = #{select_sql || "#{base_alias}.#{column}"}"
195
198
  end
196
199
  prefix = "LEFT JOIN\n "
197
200
  postfix = " ON #{joins.join(" AND ")}"
@@ -1,7 +1,7 @@
1
1
  module DirectiveRecord
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
- TINY = 16
4
+ TINY = 17
5
5
 
6
6
  VERSION = [MAJOR, MINOR, TINY].join(".")
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: directiverecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Engel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-12 00:00:00.000000000 Z
11
+ date: 2015-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord