communicator 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
data/communicator.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{communicator}
8
- s.version = "0.1.4"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christoph Olszowka"]
12
- s.date = %q{2010-11-09}
12
+ s.date = %q{2010-11-16}
13
13
  s.description = %q{Data push/pull between apps with local inbound/outbound queue and easy publish/process interface}
14
14
  s.email = %q{christoph at olszowka de}
15
15
  s.extra_rdoc_files = [
@@ -43,8 +43,8 @@ class Communicator::InboundMessage < ActiveRecord::Base
43
43
  # Figure out who is the receiver of this message and process the message
44
44
  def process!
45
45
  return if processed_at.present? # Do not process if already processed!
46
- source, message = JSON.parse(body).first
47
- Communicator.receiver_for(source).find_or_initialize_by_id(message["id"]).process_message(message)
46
+ source, content = message_content.first
47
+ Communicator.receiver_for(source).find_or_initialize_by_id(content["id"]).process_message(content)
48
48
  self.processed_at = Time.now
49
49
  self.save!
50
50
  end
@@ -16,7 +16,7 @@ namespace :communicator do
16
16
  end
17
17
 
18
18
  desc "Runs Communicator::Client.push and Communicator::Client.pull in current Rails.env"
19
- task :communicate do
19
+ task :communicate => :environment do
20
20
  Communicator::Client.push
21
21
  Communicator::Client.pull
22
22
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: communicator
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Christoph Olszowka
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-09 00:00:00 +01:00
18
+ date: 2010-11-16 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency