the_force 0.2.1 → 0.3.0

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/Rakefile CHANGED
@@ -7,7 +7,7 @@ exclude_file_globs = []
7
7
 
8
8
  spec = Gem::Specification.new do |s|
9
9
  s.name = "the_force"
10
- s.version = '0.2.1'
10
+ s.version = '0.3.0'
11
11
  s.author = "Ryan Ziegler"
12
12
  s.email = "info@symbolforce.com"
13
13
  s.homepage = "http://www.symbolforce.com"
@@ -0,0 +1,20 @@
1
+ module TheForce
2
+ module ActiveRecordSupport
3
+ module InstanceMethods
4
+ def collect_column(column_name, conditions = {})
5
+ collection = []
6
+ column_name = column_name.to_s
7
+
8
+ self.find_each(:select => column_name, :conditions => conditions) do |record|
9
+ collection << record.attributes[column_name]
10
+ end
11
+
12
+ collection
13
+ end
14
+ end
15
+ end
16
+ end
17
+
18
+ class Object
19
+ include TheForce::ActiveRecordSupport::InstanceMethods
20
+ end
@@ -0,0 +1,8 @@
1
+ require 'test/unit'
2
+ require 'rails_support'
3
+
4
+ class TestRailsSupport < Test::Unit::TestCase
5
+ def test_rails_support
6
+ assert false
7
+ end
8
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_force
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 1
10
- version: 0.2.1
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Ziegler
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-10-20 00:00:00 -04:00
18
+ date: 2010-11-02 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -35,6 +35,7 @@ files:
35
35
  - lib/the_force/keep_trying.rb
36
36
  - lib/the_force/memoize.rb
37
37
  - lib/the_force/object_support.rb
38
+ - lib/the_force/rails_support.rb
38
39
  - lib/the_force/remote_includes.rb
39
40
  - lib/the_force/thread_pool.rb
40
41
  - lib/the_force/timer.rb
@@ -43,6 +44,7 @@ files:
43
44
  - test/unit/test_keep_trying.rb
44
45
  - test/unit/test_memoize.rb
45
46
  - test/unit/test_object_support.rb
47
+ - test/unit/test_rails_support.rb
46
48
  has_rdoc: true
47
49
  homepage: http://www.symbolforce.com
48
50
  licenses: []
@@ -83,3 +85,4 @@ test_files:
83
85
  - test/unit/test_keep_trying.rb
84
86
  - test/unit/test_memoize.rb
85
87
  - test/unit/test_object_support.rb
88
+ - test/unit/test_rails_support.rb