directiverecord 0.1.28 → 0.1.29

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4972f8c98aa0d771e6f66d7b969a7d17d3882b49
4
- data.tar.gz: f320a5b19abc343d0ed9b71d078490d29c3d8b76
3
+ metadata.gz: 1bfe5ca92925fd12668d8679e9a93f5db099f29f
4
+ data.tar.gz: b77c4c85e6ecd7ab12b3cf3dbb685ef29bb7f74e
5
5
  SHA512:
6
- metadata.gz: 8c68d43a7a1328c44d0b064e1ee90d95334c70a816b7f1c6b75bb877743e75b20cbc8bde43352edc4623052184c8a93e3582b024363a362c02c9ba23694906b8
7
- data.tar.gz: 7f2e85e313ba57b2e9d37a50c40dce288256348a7265ce3b164b3ee34a96bcb51299bc10a02eadde3e326be6338e535eae7aeadfc25ff7a7ccf28368418fd356
6
+ metadata.gz: 7dd096afe893a680a35ebe1132f046cf6bee6c5f335a83f43c844ebe0c7a5b699dc1672615f1c7f264e31ca6f11ca1eeeeb67627cd2f11f9672b9d2d2476edae
7
+ data.tar.gz: c215ece54c252766a1ef0163bca6d135549752947bbbb2dd8f66df5f96b84592f2c0f8ab73a0c260959b7dc2d71c547f2468defca5c87283f99a3a6605d56f07
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = DirectiveRecord CHANGELOG
2
2
 
3
+ == Version 0.1.29 (August 17, 2015)
4
+
5
+ * Not normalizing select option again after having encountered new calculated columns in the GROUP BY statement, instead just register the alias
6
+
3
7
  == Version 0.1.28 (August 13, 2015)
4
8
 
5
9
  * Corrected handling HAVING statements for “virtual columns” defined in the GROUP BY
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.28
1
+ 0.1.29
@@ -237,25 +237,19 @@ SQL
237
237
  end
238
238
 
239
239
  def normalize_group_by!(options)
240
- normalize_select = false
241
-
242
240
  options[:group_by].collect! do |x|
243
241
  if x.match(/^(.*?) AS (\w+)$/)
244
242
  if options[:select].any?{|x| x.include?("#{$1} AS ")}
245
243
  $1
246
244
  else
247
245
  options[:select] << x
248
- normalize_select = true
246
+ options[:aliases][$1] = $2
249
247
  $2
250
248
  end
251
249
  else
252
250
  x
253
251
  end
254
252
  end if options[:group_by]
255
-
256
- if normalize_select
257
- normalize_select!(options)
258
- end
259
253
  end
260
254
 
261
255
  def normalize_where!(options)
@@ -276,10 +270,7 @@ SQL
276
270
  options[:aggregated].merge!(opts[:aggregated])
277
271
  false
278
272
  else
279
- !(
280
- (aliases[path] || path).match(/\b(count|sum|min|max|avg)\(/i) ||
281
- aliases.include?(path)
282
- )
273
+ !(aliases.include?(path) || path.match(/\b(count|sum|min|max|avg)\(/i))
283
274
  end
284
275
  end
285
276
  end
@@ -1,7 +1,7 @@
1
1
  module DirectiveRecord
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
- TINY = 28
4
+ TINY = 29
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.28
4
+ version: 0.1.29
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-08-13 00:00:00.000000000 Z
11
+ date: 2015-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord