marples 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/lib/marples/client.rb +10 -9
- data/lib/marples/version.rb +1 -1
- metadata +14 -14
data/.gitignore
CHANGED
data/lib/marples/client.rb
CHANGED
@@ -33,18 +33,20 @@ module Marples
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def when application, object_type, action
|
36
|
-
logger.
|
36
|
+
logger.info "Listening for #{application} notifiying us of #{action} #{object_type}"
|
37
37
|
destination = destination_for application, object_type, action
|
38
38
|
logger.debug "Underlying destination is #{destination}"
|
39
39
|
transport.subscribe destination do |message|
|
40
|
-
logger.
|
41
|
-
logger.debug "Message body: #{message.body}"
|
40
|
+
logger.info "Received message #{message.headers['message-id']} from #{destination}"
|
41
|
+
#logger.debug "Message body: #{message.body}"
|
42
42
|
hash = Hash.from_xml message.body
|
43
|
-
logger.debug "Constructed hash: #{hash.inspect}"
|
43
|
+
#logger.debug "Constructed hash: #{hash.inspect}"
|
44
44
|
attributes = hash.values[0]
|
45
|
-
logger.debug "Yielding hash: #{attributes.inspect}"
|
45
|
+
#logger.debug "Yielding hash: #{attributes.inspect}"
|
46
|
+
logger.info("About to yield")
|
47
|
+
|
46
48
|
yield attributes
|
47
|
-
logger.
|
49
|
+
logger.info "Finished processing message #{message.headers['message-id']}"
|
48
50
|
end
|
49
51
|
end
|
50
52
|
|
@@ -56,12 +58,11 @@ module Marples
|
|
56
58
|
raise "Provide Marples::Client with a client_name to publish messages"
|
57
59
|
end
|
58
60
|
destination = destination_for client_name, object_type, action
|
59
|
-
logger.debug "Using transport #{transport}"
|
61
|
+
#logger.debug "Using transport #{transport}"
|
60
62
|
logger.debug "Sending XML to #{destination}"
|
61
63
|
payload = generate_payload_for object
|
62
|
-
logger.debug "XML: #{payload}"
|
64
|
+
#logger.debug "XML: #{payload}"
|
63
65
|
transport.publish destination, payload
|
64
|
-
logger.debug "Message sent"
|
65
66
|
end
|
66
67
|
private :publish
|
67
68
|
|
data/lib/marples/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marples
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-12-
|
13
|
+
date: 2011-12-20 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: null_logger
|
17
|
-
requirement: &
|
17
|
+
requirement: &70142564751640 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70142564751640
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: activesupport
|
28
|
-
requirement: &
|
28
|
+
requirement: &70142564750780 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70142564750780
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: i18n
|
39
|
-
requirement: &
|
39
|
+
requirement: &70142564750000 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70142564750000
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rake
|
50
|
-
requirement: &
|
50
|
+
requirement: &70142564748880 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70142564748880
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: activerecord
|
61
|
-
requirement: &
|
61
|
+
requirement: &70142564741580 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70142564741580
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: activerecord-nulldb-adapter
|
72
|
-
requirement: &
|
72
|
+
requirement: &70142564740720 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,7 +77,7 @@ dependencies:
|
|
77
77
|
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70142564740720
|
81
81
|
description: Message destination arbiter
|
82
82
|
email:
|
83
83
|
- craig@barkingiguana.com
|