preload_counts 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: df7e7e5e2c7c650635bde6f479c71b9ade401b08
4
+ data.tar.gz: 3ce8526debbc0c8cd1aec23416bfd265b525cc96
5
+ SHA512:
6
+ metadata.gz: f2363d843cb7e77813f4d79918aafe6ff5ff7e53b046faa12bf3fdc3257ae54dc568f812507390891dec2e19e2d79354e8e7b6cad80013bc636088d3127e938b
7
+ data.tar.gz: 41e37ad43b98d39c9001254840684b2fb5bf96b200b6b63771ff13b5f814214dfbd1473655240b326131f7c1e30818f7734da91e02061360b14685c05a405898
data/Rakefile CHANGED
@@ -1,5 +1,4 @@
1
1
  require "bundler/gem_tasks"
2
- require "load_multi_rails_rake_tasks"
3
2
 
4
3
  require 'rspec/core/rake_task'
5
4
 
@@ -26,7 +26,7 @@ module PreloadCounts
26
26
  name = "preload_#{association.to_s.singularize}_counts"
27
27
  singleton = class << self; self end
28
28
  singleton.send :define_method, name do
29
- sql = ['*'] + scopes_to_select(association, scopes)
29
+ sql = ["#{table_name}.*"] + scopes_to_select(association, scopes)
30
30
  sql = sql.join(', ')
31
31
  scoped(:select => sql)
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module PreloadCounts
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -21,6 +21,4 @@ Gem::Specification.new do |s|
21
21
  s.add_development_dependency "rspec"
22
22
  s.add_development_dependency "activerecord", "~> 3.2.0"
23
23
  s.add_development_dependency "sqlite3"
24
- s.add_development_dependency "ruby-debug"
25
- s.add_development_dependency "multi_rails"
26
24
  end
metadata CHANGED
@@ -1,104 +1,65 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: preload_counts
3
- version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 2
10
- version: 0.0.2
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.3
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Simon Mathieu
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-08-01 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2013-05-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: rspec
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
23
- none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- hash: 3
28
- segments:
29
- - 0
30
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
31
20
  type: :development
32
- requirement: *id001
33
21
  prerelease: false
34
- - !ruby/object:Gem::Dependency
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
35
28
  name: activerecord
36
- version_requirements: &id002 !ruby/object:Gem::Requirement
37
- none: false
38
- requirements:
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
39
31
  - - ~>
40
- - !ruby/object:Gem::Version
41
- hash: 15
42
- segments:
43
- - 3
44
- - 2
45
- - 0
32
+ - !ruby/object:Gem::Version
46
33
  version: 3.2.0
47
34
  type: :development
48
- requirement: *id002
49
35
  prerelease: false
50
- - !ruby/object:Gem::Dependency
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: 3.2.0
41
+ - !ruby/object:Gem::Dependency
51
42
  name: sqlite3
52
- version_requirements: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
61
- type: :development
62
- requirement: *id003
63
- prerelease: false
64
- - !ruby/object:Gem::Dependency
65
- name: ruby-debug
66
- version_requirements: &id004 !ruby/object:Gem::Requirement
67
- none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
75
- type: :development
76
- requirement: *id004
77
- prerelease: false
78
- - !ruby/object:Gem::Dependency
79
- name: multi_rails
80
- version_requirements: &id005 !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
- version: "0"
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
89
48
  type: :development
90
- requirement: *id005
91
49
  prerelease: false
92
- description: Preload association or scope counts. This can greatly reduce the number of queries you have to perform and thus yield great performance gains.
93
- email:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Preload association or scope counts. This can greatly reduce the number
56
+ of queries you have to perform and thus yield great performance gains.
57
+ email:
94
58
  - simon.math@gmail.com
95
59
  executables: []
96
-
97
60
  extensions: []
98
-
99
61
  extra_rdoc_files: []
100
-
101
- files:
62
+ files:
102
63
  - .gitignore
103
64
  - .rvmrc
104
65
  - Gemfile
@@ -112,37 +73,27 @@ files:
112
73
  - spec/spec_helper.rb
113
74
  homepage: https://github.com/smathieu/preload_counts
114
75
  licenses: []
115
-
76
+ metadata: {}
116
77
  post_install_message:
117
78
  rdoc_options: []
118
-
119
- require_paths:
79
+ require_paths:
120
80
  - lib
121
- required_ruby_version: !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ">="
125
- - !ruby/object:Gem::Version
126
- hash: 3
127
- segments:
128
- - 0
129
- version: "0"
130
- required_rubygems_version: !ruby/object:Gem::Requirement
131
- none: false
132
- requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- hash: 3
136
- segments:
137
- - 0
138
- version: "0"
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
139
91
  requirements: []
140
-
141
92
  rubyforge_project: preload_counts
142
- rubygems_version: 1.8.24
93
+ rubygems_version: 2.0.3
143
94
  signing_key:
144
- specification_version: 3
95
+ specification_version: 4
145
96
  summary: Preload association or scope counts.
146
- test_files:
97
+ test_files:
147
98
  - spec/active_record_spec.rb
148
99
  - spec/spec_helper.rb