active_record_to_simpledb 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.3.3
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{active_record_to_simpledb}
8
- s.version = "0.3.2"
8
+ s.version = "0.3.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ivan Acosta-Rubio"]
@@ -105,7 +105,7 @@ class ActiveRecordToSimpledb
105
105
  elsif RAILS_ENV == "prueba"
106
106
  ActiveRecordToSimpledb::Client.create(domain_name, self.attributes)
107
107
  else
108
- Resque.enqueue(ActiveRecordToSimpledb::JobQueue::Create, self.attributes)
108
+ Resque.enqueue(ActiveRecordToSimpledb::JobQueue::Create, self.class.name, domain_name , self.id)
109
109
  end
110
110
  end
111
111
 
@@ -123,11 +123,14 @@ class ActiveRecordToSimpledb
123
123
  #
124
124
  # Private: a module with the resque jos
125
125
  #
126
- module JobQueue
126
+ module JobQueue
127
127
  class Create
128
128
  @queue = :active_record_to_simple_db_create
129
- def self.perform(attributes)
130
- ActiveRecordToSimpledb::Client.create(attributes)
129
+ def self.perform(klass, domain_name, id)
130
+
131
+ record = klass.camelize.constantize.find(id)
132
+ ActiveRecordToSimpledb::Client.create( domain_name , record.attributes)
133
+
131
134
  end
132
135
  end
133
136
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 2
9
- version: 0.3.2
8
+ - 3
9
+ version: 0.3.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ivan Acosta-Rubio