directiverecord 0.1.18 → 0.1.19

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2I3ZDI1Yzk0OWViMDIxYjFlMGU2ZjM5NjVhMDY4MzI1NDQ0ZGViZA==
4
+ Yzk0MWI2Y2VlNTdlZTlhN2YxYmFhNWUzNjFiYWExMmVkY2FjMTNiZA==
5
5
  data.tar.gz: !binary |-
6
- YjRkYzVkODQwNDNjYzc4ZDZmYWNlNDJhNDMyMjM5ZjhiYTVmZGVkOA==
6
+ MDBiMWY2N2NkYWRlMDkzOGQwNTRmMmU0MzM1NTgwY2FlOTk4N2UyNQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YzM2ODg4NTBjZDc4YmQ5MjExYWZiYzA2MDZhY2U5ZTY0Njg2YzAzM2YyZWFl
10
- ZjFmNjEyM2FiZTczOTBkMjEwZmRkMTU3NTIwNDUxYzhkMDY5YWQ1NDgyNWY3
11
- N2EzZWY0YWI0ODM1YWEwNzJlNzgwNzU5MTNhZWEzY2RlMmY2YWQ=
9
+ ZGI0ZTBhNTY4MGU5NTQ5YTIyNWI3MTJiYWRkMzlkODRhOTNlZWJmZmJjZDM3
10
+ NDcxZTg1YjA0NjU3OGUyMDlkYWVlMzUzMjkzYWZmZjg5MTE5ZjEzMTk4ODZk
11
+ MGU5ODQzOGJiNjE5MzNjZWY4NjBmZjUzZjI2ZTYxZTJiZDc4MDk=
12
12
  data.tar.gz: !binary |-
13
- NGNmNzZlMDRiNGIxZDcyNDZkYTMxNmFlZTQxYzZhNzMyZWRhYjhmMGY4OGIx
14
- Y2ZiYmQ5N2NmYmU3N2UzMmRhMWZhN2VkNWQ5NjYyZTMwZjY2ZGY5MDI5YTRk
15
- NzNjMTBkMWRmNzhmNmQwNDhkOTQ0NTYzZmJlYTU5ODBmNzkwZDg=
13
+ MmEzN2M3ZjhlZWE5YmZkZGRkNDMyN2ZhNDkxZjBkOTc0YWExYjYxMDc5NDQ1
14
+ MmU2N2JjMGRjZTQ1ODMyNTIzNzYwNWY5OWViZjgwMmEwOWY0OGU3YjZlZTQ0
15
+ OTAzYjg1ZjQ3MzcyN2QzMGM2MGFiNzZjMDFkZTg1Y2U2OWU1MmU=
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,9 @@
1
1
  = DirectiveRecord CHANGELOG
2
2
 
3
+ == Version 0.1.19 (March 25, 2015)
4
+
5
+ * Corrected normalize_group_by! when dealing with numerized calculations
6
+
3
7
  == Version 0.1.18 (March 18, 2015)
4
8
 
5
9
  * Being able to “flatten” a subselect (in order to aggregate a subselect within a subselect)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.18
1
+ 0.1.19
@@ -264,9 +264,13 @@ SQL
264
264
 
265
265
  def normalize_group_by!(options)
266
266
  options[:group_by].collect! do |x|
267
- if x.match(/ AS (\w+)$/)
268
- options[:select] << x unless options[:select].include?(x)
269
- $1
267
+ if x.match(/^(.*?) AS (\w+)$/)
268
+ if options[:select].any?{|x| x.include?("#{$1} AS ")}
269
+ $1
270
+ else
271
+ options[:select] << x
272
+ $2
273
+ end
270
274
  else
271
275
  x
272
276
  end
@@ -1,7 +1,7 @@
1
1
  module DirectiveRecord
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
- TINY = 18
4
+ TINY = 19
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.18
4
+ version: 0.1.19
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-18 00:00:00.000000000 Z
11
+ date: 2015-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord