rocket_tag 0.5.1 → 0.5.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
@@ -11,11 +11,7 @@ module Squeel
11
11
  #
12
12
  # This call isolates the group by behaviours.
13
13
  def isolate_group_by_as(type)
14
- type.from("(#{to_sql}) #{type.table_name}")
15
- end
16
-
17
- def select_all
18
- select('*')
14
+ type.from(self.arel.as(type.table_name))
19
15
  end
20
16
 
21
17
  # We really only want to group on id for practical
@@ -167,8 +163,13 @@ module RocketTag
167
163
  # Provides the tag counting functionality by adding an
168
164
  # aggregate count on id. Assumes valid a join has been
169
165
  # made.
166
+ #
167
+ # Note that I should be able to chain count tags to
168
+ # the relation instead of passing the rel parameter in
169
+ # however my tests fails with wrong counts. This is
170
+ # not so elegant
170
171
  def count_tags(rel)
171
- rel.select_all.
172
+ rel.select('*').
172
173
  select{count(~id).as(tags_count)}.
173
174
  group_by_all_columns.
174
175
  order("tags_count DESC").
data/rocket_tag.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rocket_tag"
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brad Phelan"]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rocket_tag
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.1
5
+ version: 0.5.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brad Phelan
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
- hash: 88231840862745454
147
+ hash: -4599710415322138836
148
148
  segments:
149
149
  - 0
150
150
  version: "0"