resque-data-warehouse 0.1.0 → 0.1.1

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/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.1 (2011-01-20)
2
+
3
+ * rails 3 support
4
+
1
5
  ## 0.1.0 (2011-01-20)
2
6
 
3
7
  * Initial version.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Resque Data Warehouse
2
2
  =====================
3
3
 
4
- A [Resque][rq] plugin. Requires Resque 1.9.10.
4
+ A [Resque][rq] plugin. Requires Resque 1.9.10 or higher.
5
5
 
6
6
  resque-data-warehouse allows you to use Redis to queue up and then Resque to process transactions
7
7
  on transaction-heavy tables that need to be replicated on other tables optimized for
@@ -10,12 +10,11 @@ reporting.
10
10
  Transactions for a given object (classname + ID) are queued up behind a Redis key,
11
11
  and then processed using Resque jobs. If load is low, each transaction will be processed
12
12
  almost immediately after it occurs; at higher loads, multiple transactions will queue up
13
- before the Resque job gets to them, and then only the last transaction will be applied to the
14
- data warehousing table, thus minimizing database load and dynamically adjusting the delay
15
- in the copy to match the current load.
13
+ before the Resque job gets to them, and then only the cumulative result of the previous transactions
14
+ will be applied to the data warehousing table, thus minimizing database load and dynamically adjusting
15
+ the delay in the copy to match the current load.
16
16
 
17
- This only works with Rails; it has only been tested with Rails 2.3.4 in which case the after_commit
18
- gem is also required.
17
+ This only works with Rails >=3.0; it has been tested with Rails 3.0.5.
19
18
 
20
19
  Usage / Examples
21
20
  ----------------
@@ -58,7 +57,7 @@ Install
58
57
 
59
58
  ### In a Rails app, as a plugin
60
59
 
61
- $ ./script/plugin install git://github.com/mechaferret/resque-data-warehouse
60
+ $ ./script/plugin install git://github.com/Mechaferret/resque-data-warehouse.git
62
61
 
63
62
 
64
63
  Acknowledgements
@@ -1,8 +1,5 @@
1
1
  module Resque
2
2
  module Plugins
3
- #
4
- # data_warehoused
5
- #
6
3
  module DataWarehouse
7
4
  Dir[File.dirname(__FILE__) + '/data_warehouse/*.rb'].each{|g| require g}
8
5
  def self.included(base)
@@ -12,7 +9,7 @@ module Resque
12
9
  module ClassMethods
13
10
  def warehoused
14
11
  include InstanceMethods
15
- after_commit_on_save :record_to_fact
12
+ after_commit :record_to_fact
16
13
  after_destroy :destroy_fact
17
14
  end
18
15
  end
@@ -4,7 +4,7 @@ module Resque
4
4
 
5
5
  module Fact
6
6
  def self.find(type, values)
7
- klass = "#{type}Fact".constantize
7
+ klass = "Facts::#{type}Fact".constantize
8
8
  fact = klass.send(:find, values["id"]) rescue nil
9
9
  fact = klass.new if fact.nil?
10
10
  fact.id = values["id"]
@@ -5,6 +5,7 @@ $TESTING = true
5
5
  require 'rubygems'
6
6
  require 'test/unit'
7
7
  require 'resque'
8
+ gem 'activerecord', '=2.3.4'
8
9
  require 'active_record'
9
10
  require 'active_record/fixtures'
10
11
  require 'active_support'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-data-warehouse
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Monica McArthur
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-21 00:00:00 -08:00
18
+ date: 2011-06-07 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -38,34 +38,18 @@ dependencies:
38
38
  name: rails
39
39
  prerelease: false
40
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- hash: 11
46
- segments:
47
- - 2
48
- - 3
49
- - 4
50
- version: 2.3.4
51
- type: :runtime
52
- version_requirements: *id002
53
- - !ruby/object:Gem::Dependency
54
- name: after_commit
55
- prerelease: false
56
- requirement: &id003 !ruby/object:Gem::Requirement
57
41
  none: false
58
42
  requirements:
59
43
  - - ">="
60
44
  - !ruby/object:Gem::Version
61
45
  hash: 7
62
46
  segments:
63
- - 1
47
+ - 3
64
48
  - 0
65
- - 8
66
- version: 1.0.8
49
+ - 0
50
+ version: 3.0.0
67
51
  type: :runtime
68
- version_requirements: *id003
52
+ version_requirements: *id002
69
53
  description: " A Resque plugin. Allows you to use Redis to queue up and then Resque to process transactions \n on transaction-heavy tables that need to be replicated on other tables optimized for \n reporting.\n"
70
54
  email: mechaferret@gmail.com
71
55
  executables: []