dripdrop 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.5.0
data/dripdrop.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dripdrop}
8
- s.version = "0.4.2"
8
+ s.version = "0.5.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew Cholakian"]
@@ -90,19 +90,20 @@ class DripDrop
90
90
  @opts = opts
91
91
  end
92
92
 
93
- def send_message(msg,&block)
94
- if msg.class == DripDrop::Message
93
+ def send_message(message,&block)
94
+ dd_message = dd_messagify(message)
95
+ if dd_message.class == DripDrop::Message
95
96
  req = EM::Protocols::HttpClient.request(
96
97
  :host => @uri.host, :port => @uri.port,
97
98
  :request => '/', :verb => 'POST',
98
99
  :contenttype => 'application/json',
99
- :content => msg.encode_json
100
+ :content => dd_message.encode_json
100
101
  )
101
102
  req.callback do |response|
102
103
  block.call(DripDrop::Message.decode_json(response[:content]))
103
104
  end
104
105
  else
105
- raise "Unsupported message type '#{msg.class}'"
106
+ raise "Unsupported message type '#{dd_message.class}'"
106
107
  end
107
108
  end
108
109
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dripdrop
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 11
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 4
8
- - 2
9
- version: 0.4.2
8
+ - 5
9
+ - 0
10
+ version: 0.5.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Andrew Cholakian
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 3
28
30
  segments:
29
31
  - 0
30
32
  version: "0"
@@ -38,6 +40,7 @@ dependencies:
38
40
  requirements:
39
41
  - - ">="
40
42
  - !ruby/object:Gem::Version
43
+ hash: 3
41
44
  segments:
42
45
  - 0
43
46
  version: "0"
@@ -51,6 +54,7 @@ dependencies:
51
54
  requirements:
52
55
  - - ">="
53
56
  - !ruby/object:Gem::Version
57
+ hash: 3
54
58
  segments:
55
59
  - 0
56
60
  version: "0"
@@ -64,6 +68,7 @@ dependencies:
64
68
  requirements:
65
69
  - - ">="
66
70
  - !ruby/object:Gem::Version
71
+ hash: 3
67
72
  segments:
68
73
  - 0
69
74
  version: "0"
@@ -77,6 +82,7 @@ dependencies:
77
82
  requirements:
78
83
  - - ">="
79
84
  - !ruby/object:Gem::Version
85
+ hash: 3
80
86
  segments:
81
87
  - 0
82
88
  version: "0"
@@ -90,6 +96,7 @@ dependencies:
90
96
  requirements:
91
97
  - - ">="
92
98
  - !ruby/object:Gem::Version
99
+ hash: 3
93
100
  segments:
94
101
  - 0
95
102
  version: "0"
@@ -103,6 +110,7 @@ dependencies:
103
110
  requirements:
104
111
  - - ">="
105
112
  - !ruby/object:Gem::Version
113
+ hash: 3
106
114
  segments:
107
115
  - 0
108
116
  version: "0"
@@ -182,6 +190,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
190
  requirements:
183
191
  - - ">="
184
192
  - !ruby/object:Gem::Version
193
+ hash: 3
185
194
  segments:
186
195
  - 0
187
196
  version: "0"
@@ -190,6 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
199
  requirements:
191
200
  - - ">="
192
201
  - !ruby/object:Gem::Version
202
+ hash: 3
193
203
  segments:
194
204
  - 0
195
205
  version: "0"