upfluence-thrift 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thrift/bytes.rb +6 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe021f1ee3ffa17f4e03313559749305b3fe4e5b
|
4
|
+
data.tar.gz: 9a3b75b02146b4ad62ca3924bf8bbd37b75b8cda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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-
|
11
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|