cassandra 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ v0.15.0
2
+ - Fixes for ruby 1.8 (issue #158, courtesy @jarib)
3
+ - get_indexed_slices returns an OrderedHash (issue #110)
4
+
1
5
  v0.14.0
2
6
  - Numerous performance improvements (courtesy @nearbuy)
3
7
  - Fixed many 0.6 bugs
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "cassandra"
5
- s.version = "0.14.0"
5
+ s.version = "0.15.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0.8") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Weaver, Ryan King"]
9
- s.date = "2012-08-06"
9
+ s.date = "2012-09-12"
10
10
  s.description = "A Ruby client for the Cassandra distributed database."
11
11
  s.email = ""
12
12
  s.executables = ["cassandra_helper"]
File without changes
File without changes
@@ -5,7 +5,7 @@ class Cassandra
5
5
  :column_or_supercolumn => CassandraThrift::ColumnOrSuperColumn.new(
6
6
  :counter_column => CassandraThrift::CounterColumn.new(
7
7
  :name => column_name_class(column_family).new(column_name).to_s,
8
- :value => value,
8
+ :value => value
9
9
  )
10
10
  )
11
11
  )
@@ -5,7 +5,7 @@ class Cassandra
5
5
  :column_or_supercolumn => CassandraThrift::ColumnOrSuperColumn.new(
6
6
  :counter_column => CassandraThrift::CounterColumn.new(
7
7
  :name => column_name_class(column_family).new(column_name).to_s,
8
- :value => value,
8
+ :value => value
9
9
  )
10
10
  )
11
11
  )
@@ -991,7 +991,7 @@ class Cassandra
991
991
  key_slices = _get_indexed_slices(column_family, index_clause, columns, options[:count], options[:start],
992
992
  options[:finish], options[:reversed], options[:consistency])
993
993
 
994
- key_slices.inject({}){|h, key_slice| h[key_slice.key] = key_slice.columns; h}
994
+ key_slices.inject(OrderedHash.new) {|h, key_slice| h[key_slice.key] = key_slice.columns; h }
995
995
  end
996
996
 
997
997
  protected
File without changes
@@ -35,7 +35,7 @@ class Cassandra
35
35
 
36
36
  packed_types = @types.map do |type|
37
37
  if type.length == 1
38
- [0x8000 | type.ord].pack('n')
38
+ [0x8000 | type[0].ord].pack('n')
39
39
  else
40
40
  [type.length].pack('n') + type
41
41
  end
@@ -304,7 +304,7 @@ class Cassandra
304
304
  idx_clause = create_index_clause(idx_clause, start_key, options[:key_count])
305
305
  end
306
306
 
307
- ret = {}
307
+ ret = OrderedHash.new
308
308
  cf(column_family).each do |key, row|
309
309
  next if idx_clause[:start] != '' && key < idx_clause[:start]
310
310
  next if ret.length == idx_clause[:count]
@@ -1172,23 +1172,23 @@ class CassandraTest < Test::Unit::TestCase
1172
1172
 
1173
1173
  column_slice = @type_conversions.get(:CompositeColumnConversion, key,
1174
1174
  :start => Cassandra::Composite.new([1].pack('N')),
1175
- :finish => Cassandra::Composite.new([10].pack('N')),
1175
+ :finish => Cassandra::Composite.new([10].pack('N'))
1176
1176
  ).keys
1177
1177
  assert_equal(columns_in_order[0..-2], column_slice)
1178
1178
 
1179
1179
  column_slice = @type_conversions.get(:CompositeColumnConversion, key,
1180
1180
  :start => Cassandra::Composite.new([5].pack('N')),
1181
- :finish => Cassandra::Composite.new([5].pack('N'), :slice => :after),
1181
+ :finish => Cassandra::Composite.new([5].pack('N'), :slice => :after)
1182
1182
  ).keys
1183
1183
  assert_equal(columns_in_order[1..2], column_slice)
1184
1184
 
1185
1185
  column_slice = @type_conversions.get(:CompositeColumnConversion, key,
1186
- :start => Cassandra::Composite.new([5].pack('N'), :slice => :after).to_s,
1186
+ :start => Cassandra::Composite.new([5].pack('N'), :slice => :after).to_s
1187
1187
  ).keys
1188
1188
  assert_equal([columns_in_order[-1]], column_slice)
1189
1189
 
1190
1190
  column_slice = @type_conversions.get(:CompositeColumnConversion, key,
1191
- :finish => Cassandra::Composite.new([10].pack('N'), :slice => :before).to_s,
1191
+ :finish => Cassandra::Composite.new([10].pack('N'), :slice => :before).to_s
1192
1192
  ).keys
1193
1193
  assert_equal(columns_in_order[0..-2], column_slice)
1194
1194
 
@@ -1212,23 +1212,23 @@ class CassandraTest < Test::Unit::TestCase
1212
1212
 
1213
1213
  column_slice = @type_conversions.get(:DynamicComposite, key,
1214
1214
  :start => Cassandra::DynamicComposite.new(['i', [1].pack('N')]),
1215
- :finish => Cassandra::DynamicComposite.new(['i', [10].pack('N')]),
1215
+ :finish => Cassandra::DynamicComposite.new(['i', [10].pack('N')])
1216
1216
  ).keys
1217
1217
  assert_equal(columns_in_order[0..-2], column_slice)
1218
1218
 
1219
1219
  column_slice = @type_conversions.get(:DynamicComposite, key,
1220
1220
  :start => Cassandra::DynamicComposite.new(['IntegerType', [5].pack('N')]),
1221
- :finish => Cassandra::DynamicComposite.new(['IntegerType', [5].pack('N')], :slice => :after),
1221
+ :finish => Cassandra::DynamicComposite.new(['IntegerType', [5].pack('N')], :slice => :after)
1222
1222
  ).keys
1223
1223
  assert_equal(columns_in_order[1..2], column_slice)
1224
1224
 
1225
1225
  column_slice = @type_conversions.get(:DynamicComposite, key,
1226
- :start => Cassandra::DynamicComposite.new(['i', [5].pack('N')], :slice => :after).to_s,
1226
+ :start => Cassandra::DynamicComposite.new(['i', [5].pack('N')], :slice => :after).to_s
1227
1227
  ).keys
1228
1228
  assert_equal([columns_in_order[-1]], column_slice)
1229
1229
 
1230
1230
  column_slice = @type_conversions.get(:DynamicComposite, key,
1231
- :finish => Cassandra::DynamicComposite.new(['i', [10].pack('N')], :slice => :before).to_s,
1231
+ :finish => Cassandra::DynamicComposite.new(['i', [10].pack('N')], :slice => :before).to_s
1232
1232
  ).keys
1233
1233
  assert_equal(columns_in_order[0..-2], column_slice)
1234
1234
 
File without changes
metadata CHANGED
@@ -1,81 +1,99 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cassandra
3
- version: !ruby/object:Gem::Version
4
- version: 0.14.0
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 15
8
+ - 0
9
+ version: 0.15.0
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Evan Weaver, Ryan King
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2012-08-06 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2012-09-12 00:00:00 -07:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: thrift_client
16
- requirement: &70277980333560 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: 0.7.0
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
22
25
  - - <
23
- - !ruby/object:Gem::Version
24
- version: '0.9'
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ - 9
30
+ version: "0.9"
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ segments:
34
+ - 0
35
+ - 7
36
+ - 0
37
+ version: 0.7.0
25
38
  type: :runtime
26
- prerelease: false
27
- version_requirements: *70277980333560
28
- - !ruby/object:Gem::Dependency
39
+ version_requirements: *id001
40
+ - !ruby/object:Gem::Dependency
29
41
  name: json
30
- requirement: &70277980332520 !ruby/object:Gem::Requirement
31
- none: false
32
- requirements:
33
- - - ! '>='
34
- - !ruby/object:Gem::Version
35
- version: '0'
36
- type: :runtime
37
42
  prerelease: false
38
- version_requirements: *70277980332520
39
- - !ruby/object:Gem::Dependency
40
- name: rake
41
- requirement: &70277980331940 !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: '0'
43
+ requirement: &id002 !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ segments:
48
+ - 0
49
+ version: "0"
47
50
  type: :runtime
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: rake
48
54
  prerelease: false
49
- version_requirements: *70277980331940
50
- - !ruby/object:Gem::Dependency
55
+ requirement: &id003 !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ">="
58
+ - !ruby/object:Gem::Version
59
+ segments:
60
+ - 0
61
+ version: "0"
62
+ type: :runtime
63
+ version_requirements: *id003
64
+ - !ruby/object:Gem::Dependency
51
65
  name: simple_uuid
52
- requirement: &70277980331080 !ruby/object:Gem::Requirement
53
- none: false
54
- requirements:
66
+ prerelease: false
67
+ requirement: &id004 !ruby/object:Gem::Requirement
68
+ requirements:
55
69
  - - ~>
56
- - !ruby/object:Gem::Version
70
+ - !ruby/object:Gem::Version
71
+ segments:
72
+ - 0
73
+ - 2
74
+ - 0
57
75
  version: 0.2.0
58
76
  type: :runtime
59
- prerelease: false
60
- version_requirements: *70277980331080
61
- - !ruby/object:Gem::Dependency
77
+ version_requirements: *id004
78
+ - !ruby/object:Gem::Dependency
62
79
  name: echoe
63
- requirement: &70277980330380 !ruby/object:Gem::Requirement
64
- none: false
65
- requirements:
66
- - - ! '>='
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- type: :development
70
80
  prerelease: false
71
- version_requirements: *70277980330380
81
+ requirement: &id005 !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ segments:
86
+ - 0
87
+ version: "0"
88
+ type: :development
89
+ version_requirements: *id005
72
90
  description: A Ruby client for the Cassandra distributed database.
73
- email: ''
74
- executables:
91
+ email: ""
92
+ executables:
75
93
  - cassandra_helper
76
- extensions:
94
+ extensions:
77
95
  - ext/extconf.rb
78
- extra_rdoc_files:
96
+ extra_rdoc_files:
79
97
  - CHANGELOG
80
98
  - LICENSE
81
99
  - README.md
@@ -115,7 +133,7 @@ extra_rdoc_files:
115
133
  - lib/cassandra/ordered_hash.rb
116
134
  - lib/cassandra/protocol.rb
117
135
  - lib/cassandra/time.rb
118
- files:
136
+ files:
119
137
  - CHANGELOG
120
138
  - Gemfile
121
139
  - LICENSE
@@ -198,38 +216,44 @@ files:
198
216
  - vendor/1.0/gen-rb/cassandra_constants.rb
199
217
  - vendor/1.0/gen-rb/cassandra_types.rb
200
218
  - cassandra.gemspec
219
+ has_rdoc: true
201
220
  homepage: http://github.com/twitter/cassandra
202
221
  licenses: []
222
+
203
223
  post_install_message:
204
- rdoc_options:
224
+ rdoc_options:
205
225
  - --line-numbers
206
226
  - --inline-source
207
227
  - --title
208
228
  - Cassandra
209
229
  - --main
210
230
  - README.md
211
- require_paths:
231
+ require_paths:
212
232
  - lib
213
233
  - ext
214
- required_ruby_version: !ruby/object:Gem::Requirement
215
- none: false
216
- requirements:
217
- - - ! '>='
218
- - !ruby/object:Gem::Version
219
- version: '0'
220
- required_rubygems_version: !ruby/object:Gem::Requirement
221
- none: false
222
- requirements:
223
- - - ! '>='
224
- - !ruby/object:Gem::Version
225
- version: '0.8'
234
+ required_ruby_version: !ruby/object:Gem::Requirement
235
+ requirements:
236
+ - - ">="
237
+ - !ruby/object:Gem::Version
238
+ segments:
239
+ - 0
240
+ version: "0"
241
+ required_rubygems_version: !ruby/object:Gem::Requirement
242
+ requirements:
243
+ - - ">="
244
+ - !ruby/object:Gem::Version
245
+ segments:
246
+ - 0
247
+ - 8
248
+ version: "0.8"
226
249
  requirements: []
250
+
227
251
  rubyforge_project: cassandra
228
- rubygems_version: 1.8.17
252
+ rubygems_version: 1.3.6
229
253
  signing_key:
230
254
  specification_version: 3
231
255
  summary: A Ruby client for the Cassandra distributed database.
232
- test_files:
256
+ test_files:
233
257
  - test/cassandra_client_test.rb
234
258
  - test/cassandra_mock_test.rb
235
259
  - test/cassandra_test.rb