hbase-ruby 1.1.2 → 1.1.3

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/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.2
1
+ 1.1.3
@@ -12,20 +12,20 @@ module HBase
12
12
  end
13
13
 
14
14
  def show(columns = nil, options = { })
15
- @path << "/#{pack_params(columns)}" if columns
15
+ @path << (columns ? "/#{pack_params(columns)}" : "/")
16
16
  @path << "/#{@timestamp}" if @timestamp
17
17
  @path << "?v=#{options[:version]}" if options[:version]
18
18
  @path
19
19
  end
20
20
 
21
21
  def create(columns = nil)
22
- @path << "/#{pack_params(columns)}" if columns
22
+ @path << (columns ? "/#{pack_params(columns)}" : "/")
23
23
  @path << "/#{@timestamp}" if @timestamp
24
24
  @path
25
25
  end
26
26
 
27
27
  def delete(columns = nil)
28
- @path << "/#{pack_params(columns)}" if columns
28
+ @path << (columns ? "/#{pack_params(columns)}" : "/")
29
29
  @path << "/#{@timestamp}" if @timestamp
30
30
  @path
31
31
  end
@@ -44,13 +44,28 @@ describe HBase::Operation::RowOperation do
44
44
  end
45
45
  end
46
46
 
47
- it "should delete the rows 'row1'" do
47
+ it "should delete rows when timestamps are defined" do
48
+ row1 = @client.show_row("test-hbase-ruby", "row1")
49
+ timestamp = row1.columns.map(&:timestamp).uniq.first
50
+
51
+ lambda {
52
+ @client.delete_row('test-hbase-ruby', 'row1', timestamp).should be_true
53
+ }.should_not raise_error
54
+
55
+ lambda {
56
+ @client.show_row('test-hbase-ruby', 'row1')
57
+ }.should raise_error
58
+ end
59
+
60
+ it "should delete rows without a timestamp provided" do
61
+ row2 = @client.show_row("test-hbase-ruby", "row2")
62
+
48
63
  lambda {
49
- row1 = @client.delete_row('test-hbase-ruby', 'row1').should be_true
64
+ @client.delete_row('test-hbase-ruby', 'row2').should be_true
50
65
  }.should_not raise_error
51
66
 
52
67
  lambda {
53
- row_verify = @client.show_row('test-hbase-ruby', 'row1')
68
+ @client.show_row('test-hbase-ruby', 'row2')
54
69
  }.should raise_error
55
70
  end
56
71
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hbase-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ye Dingding
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-11-08 00:00:00 -05:00
13
+ date: 2009-11-25 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -125,23 +125,23 @@ signing_key:
125
125
  specification_version: 3
126
126
  summary: A pure ruby client for HBase using the Stargate interface.
127
127
  test_files:
128
- - spec/hbase/request/row_request_spec.rb
129
- - spec/hbase/request/table_request_spec.rb
130
- - spec/hbase/request/meta_request_spec.rb
131
- - spec/hbase/request/scanner_request_spec.rb
132
- - spec/hbase/model/scanner.rb
128
+ - spec/spec_helper.rb
129
+ - spec/hbase/record_spec.rb
130
+ - spec/hbase/response/table_response_spec.rb
131
+ - spec/hbase/response/row_response_spec.rb
132
+ - spec/hbase/response/scanner_response_spec.rb
133
+ - spec/hbase/response/meta_response_spec.rb
133
134
  - spec/hbase/model/column_spec.rb
134
- - spec/hbase/model/row_spec.rb
135
135
  - spec/hbase/model/column_descriptor_spec.rb
136
+ - spec/hbase/model/scanner.rb
136
137
  - spec/hbase/model/region_descriptor_spec.rb
137
138
  - spec/hbase/model/table_descriptor_spec.rb
138
- - spec/hbase/operation/row_operation_spec.rb
139
- - spec/hbase/operation/meta_operation_spec.rb
139
+ - spec/hbase/model/row_spec.rb
140
+ - spec/hbase/request/table_request_spec.rb
141
+ - spec/hbase/request/meta_request_spec.rb
142
+ - spec/hbase/request/row_request_spec.rb
143
+ - spec/hbase/request/scanner_request_spec.rb
140
144
  - spec/hbase/operation/scanner_operation_spec.rb
141
145
  - spec/hbase/operation/table_operation_spec.rb
142
- - spec/hbase/record_spec.rb
143
- - spec/hbase/response/scanner_response_spec.rb
144
- - spec/hbase/response/meta_response_spec.rb
145
- - spec/hbase/response/table_response_spec.rb
146
- - spec/hbase/response/row_response_spec.rb
147
- - spec/spec_helper.rb
146
+ - spec/hbase/operation/meta_operation_spec.rb
147
+ - spec/hbase/operation/row_operation_spec.rb