sishen-hbase-ruby 0.2.1 → 0.2.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.
data/hbase-ruby.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{hbase-ruby}
3
- s.version = "0.2.1"
3
+ s.version = "0.2.2"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Ye Dingding"]
@@ -1,3 +1,5 @@
1
+ require 'cgi'
2
+
1
3
  module HBase
2
4
  module Request
3
5
  class BasicRequest
@@ -6,9 +6,9 @@ module HBase
6
6
  attr_reader :timestamp
7
7
 
8
8
  def initialize(table_name, name, timestamp)
9
- @table_name, @name, @timestamp = table_name, name, timestamp
10
- path = "/#{table_name}/row/#{name}"
11
- path << "/#{timestamp}" if timestamp
9
+ @table_name, @name, @timestamp = CGI.escape(table_name), CGI.escape(name), timestamp
10
+ path = "/#{@table_name}/row/#{@name}"
11
+ path << "/#{@timestamp}" if timestamp
12
12
  super(path)
13
13
  end
14
14
 
@@ -6,7 +6,7 @@ module HBase
6
6
 
7
7
  def initialize(name)
8
8
  super("")
9
- @name = name
9
+ @name = CGI.escape(name) if name
10
10
  end
11
11
 
12
12
  def show
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sishen-hbase-ruby
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
  - Ye Dingding