self_msgproto 0.0.9 → 0.0.10

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
  SHA256:
3
- metadata.gz: 48e361d23d4dcd09aca2e053666f340703bc99c345991700203acc0a7135cc4f
4
- data.tar.gz: 8c8320a08ee30316c4d82d64b8b480bc4afba8758ae596f3de374d3f4dde8965
3
+ metadata.gz: b41848085e3168bb4fcd9d40ec312c386bf6e0d21e6ad0514bd78e458e65e7eb
4
+ data.tar.gz: 293c5a942344da9edfe27f0d9b542c2d03a5037f117cb0ce69990c0e0e4e6550
5
5
  SHA512:
6
- metadata.gz: acab917323d1f4f8c3c614230f6e9b22b476d6a1931fd1b53fb1b0e1700ab2462b32e01d888397b231ab3dc30e32ebfffc2dd80149a0e58a07fb4cca4f5de985
7
- data.tar.gz: 19fd66580d5afad7ef089b3dfd4f6dd32c5dde613d51e24ca0072312e7fc75979273b7d17022edbfdcee2e942dd9fcf2530a5ef69519ee6e8fde07aed26dc0b5
6
+ metadata.gz: 7d0e4d5ed89740b736a2944e5a5f4c29e50254bdcda810ada5ada42677fece84a5a423accd1a9a7d6ed5c3a9073551094c5997e37481215cd9885f2bd0acd584
7
+ data.tar.gz: 9146689eecc6e9b025c6fc7e85918608bd6d1fde76aa5b9b81e39254012c02cb8a3536bb1a9c41e32ddb0719fe083a3e2b457959d04e3f874d5fcdbf27bcbb74
@@ -105,8 +105,8 @@ VALUE message_to_fb(VALUE self)
105
105
  VALUE message_type_v = rb_ivar_get(self, rb_intern("@message_type"));
106
106
 
107
107
  if (message_type_v != Qnil) {
108
- u_char *message_type_str = (u_char *)RSTRING_PTR(message_type_v);
109
- long message_type_len = RSTRING_LEN(message_type_v);
108
+ message_type_str = (u_char *)RSTRING_PTR(message_type_v);
109
+ message_type_len = RSTRING_LEN(message_type_v);
110
110
  }
111
111
 
112
112
  VALUE ciphertext_v = rb_ivar_get(self, rb_intern("@ciphertext"));
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SelfMsg
4
4
 
5
- VERSION="0.0.9"
5
+ VERSION="0.0.10"
6
6
 
7
7
  end
@@ -7,6 +7,32 @@ class TestMessage < Minitest::Test
7
7
  include SelfMsg
8
8
 
9
9
  def test_new_message
10
+ m = SelfMsg::Message.new
11
+ m.id = "id"
12
+ m.type = MsgTypeMSG
13
+ m.sender = "sender"
14
+ m.recipient = "recipient"
15
+ m.ciphertext = "ciphertext"
16
+ m.message_type = "message_type"
17
+ m.priority = 1
18
+
19
+ d = m.to_fb
20
+ p d
21
+
22
+ m = SelfMsg::Message.new(data: d)
23
+
24
+ p m.id
25
+ p m.type
26
+ p m.offset
27
+ p m.timestamp
28
+ p m.sender
29
+ p m.recipient
30
+ p m.ciphertext
31
+ p m.message_type
32
+ p m.priority
33
+ end
34
+
35
+ def test_new_message_with_data
10
36
  d = Base64.decode64('HAAAABgALAAoAAAAAAAkACAADAAcAAAACAAEABgAAAAoAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAGAAAACAAAAAoAAAAAAAAAAQAAAB0ZXN0BwAAAGFsaWNlOjEABgAAAHRlc3Q6MQAAJAAAADlhMGY2YzY5LTJiNmUtNGIwNi04NzFlLTBjNWJhYTkyYmM5NgAAAAA')
11
37
  m = SelfMsg::Message.new(data: d)
12
38
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: self_msgproto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Bevan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-11 00:00:00.000000000 Z
11
+ date: 2022-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rice