upfluence-thrift 1.0.5 → 1.0.6

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/thrift/bytes.rb +6 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b84e7df301a19628eda2d2ed1f76c03131dc241
4
- data.tar.gz: dfb0a06b60bbdb4b016df2ce1863b9abd0bd67b9
3
+ metadata.gz: fe021f1ee3ffa17f4e03313559749305b3fe4e5b
4
+ data.tar.gz: 9a3b75b02146b4ad62ca3924bf8bbd37b75b8cda
5
5
  SHA512:
6
- metadata.gz: 50a24565afbdbe7384580d9f509c2c0935e388cab191d308a31af739f9b10cfd83e1b42ea0213f47294b491a64b142870f8f1f3ed4bd6a4954451dd1b7c94fe5
7
- data.tar.gz: 9664fb1d0e3d5479a23966b6afffdc32a677369e270ac6b3a8e671121ced3e97d78b676dbe5626bf2cc9ec6bb4cd1dd4a5be3838b0590b15557bf63f24302aab
6
+ metadata.gz: 5a47c37136de837bb54d1f08dd4f1554ed20ed3fb71580913b2a179bf5fa0ba6851eda2204fc891a547e96b6b15e4d73ca275293b88f141f48d6a83e0648dca7
7
+ data.tar.gz: f3eb8cc5a124809252626eabceea49891f9586fdcc1d72cf9517bcd542045a47b1e62525516f325d822a10406ae5c3f4c19b271667e15cdc5271cf791a46508d
data/lib/thrift/bytes.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: ascii-8bit
2
- #
2
+ #
3
3
  # Licensed to the Apache Software Foundation (ASF) under one
4
4
  # or more contributor license agreements. See the NOTICE file
5
5
  # distributed with this work for additional information
@@ -7,9 +7,9 @@
7
7
  # to you under the Apache License, Version 2.0 (the
8
8
  # "License"); you may not use this file except in compliance
9
9
  # with the License. You may obtain a copy of the License at
10
- #
10
+ #
11
11
  # http://www.apache.org/licenses/LICENSE-2.0
12
- #
12
+ #
13
13
  # Unless required by applicable law or agreed to in writing,
14
14
  # software distributed under the License is distributed on an
15
15
  # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -26,7 +26,7 @@ module Thrift
26
26
  #
27
27
  # size - The Integer size of the buffer (default: nil) to create
28
28
  #
29
- # Returns a String with BINARY encoding, filled with null characters
29
+ # Returns a String with BINARY encoding, filled with null characters
30
30
  # if size is greater than zero
31
31
  def self.empty_byte_buffer(size = nil)
32
32
  if (size && size > 0)
@@ -76,6 +76,8 @@ module Thrift
76
76
  # Returns a new String with BINARY encoding, containing the UTF-8
77
77
  # bytes of the original string.
78
78
  def self.convert_to_utf8_byte_buffer(string)
79
+ string = string.to_s if string.is_a?(Symbol)
80
+
79
81
  if string.encoding != Encoding::UTF_8
80
82
  # transcode to UTF-8
81
83
  string = string.encode(Encoding::UTF_8)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upfluence-thrift
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thrift Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-24 00:00:00.000000000 Z
11
+ date: 2017-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec