sysvmq 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9b62bd6b368c988aa1821158c4a68eade4d2dd28
4
- data.tar.gz: 1722201de77944fd64324927a0c681f08b700596
3
+ metadata.gz: dca403d32733e9e161c9e1f5a3fa31d2b5fce1c5
4
+ data.tar.gz: f2aa09248715a7e67f3276114fdaf1bd4ed3d10e
5
5
  SHA512:
6
- metadata.gz: 6810448b3b02f863bb4a0989d0b45b36693ecdb3ef68252a2beb5578367741910b5e7193d61307d65d7fe252e8c5dcdfe73995a4eb659ad2ba399f1f22ba2bec
7
- data.tar.gz: e986084ee94f00982699a93cc67063a58d7f43db3c2e15b4d4d36bcd506cccfc25e2b386b77c49d6f92ff7f5fb4e3be1426b076296c9553e017fe5c88f2adf4a
6
+ metadata.gz: 8b885eb6c8d5a988190542a421cc97df868d335dd90e36ebe1c377985c8c76024286d6d39f820d9620376d39a2a6f19b52cfd388f61ae4edcca324c751a2ac7d
7
+ data.tar.gz: e3e501ce8b8a98266c7f0bfa2c90f388f5e78dce1468e3dadf595d8fbe9336dd8dae4f8220b26be39e4f9c811eb536179190250a38ea400cab3c97db267fb40d
data/README.md CHANGED
@@ -12,9 +12,12 @@ implemented on OS X, which POSIX MQs are not.
12
12
  Note that `sysvmq` doesn't rely on any third-party message broker. The message
13
13
  queue is handled by the kernel. It's extremely stable and performant.
14
14
 
15
+ `sysvmq` has been tested heavily in production at Shopify, under more than `100k
16
+ RPM`.
17
+
15
18
  ## Installation
16
19
 
17
- Add `sysvm` to your Gemfile.
20
+ Add `sysvmq` to your Gemfile.
18
21
 
19
22
  `gem 'sysvmq'`
20
23
 
@@ -282,6 +282,8 @@ sysvmq_send(int argc, VALUE *argv, VALUE self)
282
282
  if (argc >= 2) priority = argv[1];
283
283
  if (argc == 3) flags = argv[2];
284
284
 
285
+ message = rb_funcall(message, rb_intern("to_s"), 0);
286
+
285
287
  TypedData_Get_Struct(self, sysvmq_t, &sysvmq_type, sysv);
286
288
 
287
289
  Check_Type(flags, T_FIXNUM);
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "sysvmq"
7
- spec.version = '0.2.1'
7
+ spec.version = '0.2.2'
8
8
  spec.authors = ["Simon Eskildsen"]
9
9
  spec.email = ["sirup@sirupsen.com"]
10
10
  spec.summary = %q{Ruby wrapper for SysV Message Queues}
@@ -130,4 +130,18 @@ class SysVMQTest < MiniTest::Unit::TestCase
130
130
  @mq.send(message)
131
131
  assert_equal message, @mq.receive
132
132
  end
133
+
134
+ def test_number_converted_to_string
135
+ message = 1
136
+ @mq.send(message)
137
+ assert_equal "1", @mq.receive
138
+ end
139
+
140
+ class Walrus; def to_s; "walrus"; end; end
141
+
142
+ def test_object_converted_to_string
143
+ message = Walrus.new
144
+ @mq.send(message)
145
+ assert_equal "walrus", @mq.receive
146
+ end
133
147
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sysvmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Eskildsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-25 00:00:00.000000000 Z
11
+ date: 2014-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.2.0
97
+ rubygems_version: 2.2.2
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: Ruby wrapper for SysV Message Queues