droonga-message-pack-packer 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cd0c2ea3bfe7003cddef67677e1799b60532c292
4
- data.tar.gz: c5822a0aa546e579bcb4ce1097c968c328194a9e
3
+ metadata.gz: aca651e3a98e1bb4a7c52bc7beeeb1f1b222db11
4
+ data.tar.gz: c5290c2c7fbec492109fdebdef2d654f00ef343d
5
5
  SHA512:
6
- metadata.gz: a17a757f7d24e53b60a8dbccf7fadc91a15d77a65bb3ca8d18948bd6ea57dd2c83f4162596dbb19e82b90528d420bf1480658881bc1e3668772bfa01c2fe0226
7
- data.tar.gz: 95f15321681b559ac975a8017e9d638aa6606ef894d84d28e46a9e48028f2f003e6d454d41adaa5ae5706a3705f4a49719971a5c94546090ebdc01e00b1617ec
6
+ metadata.gz: 2cefca8044151a6079a265bd570f6e434d3910938f9434a1b16bb8be610c074ff305ba3ba955f844d812577bd399da05c46323f048245076b19b9df09033d8f2
7
+ data.tar.gz: 11b0ed9fdd956b39f196c0695fc6eddebd6cd4cc467a22d10d8e71292401b43811943dafd907527a66c7421ddf6987f0fd7d2d44f8d0eae66ddc91cd809b6b61
@@ -1,7 +1,15 @@
1
1
  # News
2
2
 
3
+ ## 1.0.2: 2014-09-07
4
+
5
+ ### Improvements
6
+
7
+ * Added `Droonga::MessagePackPacker#clear` to reuse packer instance.
8
+
3
9
  ## 1.0.1: 2014-05-29
4
10
 
11
+ ### Improvements
12
+
5
13
  * Support packing of `Groonga::WGS84GeoPoint` and `Groonga::TokyoGeoPoint` values.
6
14
 
7
15
  ## 1.0.0: 2014-04-10
@@ -62,5 +62,9 @@ module Droonga
62
62
  def to_s
63
63
  @packer.to_s
64
64
  end
65
+
66
+ def clear
67
+ @packer.clear
68
+ end
65
69
  end
66
70
  end
@@ -15,6 +15,6 @@
15
15
 
16
16
  module Droonga
17
17
  class MessagePackPacker
18
- VERSION = "1.0.1"
18
+ VERSION = "1.0.2"
19
19
  end
20
20
  end
@@ -96,4 +96,23 @@ class PackerTest < Test::Unit::TestCase
96
96
  def unpack(msgpack)
97
97
  MessagePack.unpack(msgpack)
98
98
  end
99
+
100
+ class ClearTest < self
101
+ def setup
102
+ @packer = Droonga::MessagePackPacker.new
103
+ end
104
+
105
+ def test_empty
106
+ assert_equal("", @packer.to_s)
107
+ @packer.clear
108
+ assert_equal("", @packer.to_s)
109
+ end
110
+
111
+ def test_have_content
112
+ @packer.pack("string")
113
+ assert_equal("string", unpack(@packer.to_s))
114
+ @packer.clear
115
+ assert_equal("", @packer.to_s)
116
+ end
117
+ end
99
118
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: droonga-message-pack-packer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Droonga Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-29 00:00:00.000000000 Z
11
+ date: 2014-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack