right_support 2.5.2 → 2.5.4

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.
@@ -336,8 +336,10 @@ module RightSupport::DB
336
336
  while (start_row != nil)
337
337
  clause = do_op(:create_idx_clause, [expr], start_row, row_count)
338
338
 
339
- rows = self.conn.get_indexed_slices(column_family, clause, 'account_id',
340
- :key_count => row_count, :key_start => start_row)
339
+ rows = self.conn.get_indexed_slices(column_family, clause, index,
340
+ :key_count => row_count,
341
+ :key_start => start_row)
342
+
341
343
  rows = rows.keys
342
344
  rows.shift unless start_row == ''
343
345
  start_row = rows.last
@@ -353,8 +355,10 @@ module RightSupport::DB
353
355
  :start => start_column,
354
356
  :count => column_count)
355
357
 
358
+ # Get first row's columns, because where are getting only one row [see clause, for more details]
356
359
  key = chunk.keys.first
357
- columns = chunk.values.first
360
+ columns = chunk[key]
361
+
358
362
  columns.shift unless start_column == ''
359
363
  yield(key, columns) unless chunk.empty?
360
364
 
@@ -6,9 +6,8 @@ module RightSupport::Net
6
6
  #take effect.
7
7
  end
8
8
 
9
- if require_succeeds?('restclient')
10
- HAS_REST_CLIENT = true
11
- end
9
+ # Constant to determine whether this class can be instantiated.
10
+ HAS_REST_CLIENT = require_succeeds?('restclient')
12
11
 
13
12
  # Raised to indicate that no suitable provider of REST/HTTP services was found. Since RightSupport's
14
13
  # REST support is merely a wrapper around other libraries, it cannot work in isolation. See the REST
@@ -43,6 +43,27 @@ module RightSupport::Net
43
43
  RegexpError, ThreadError, TypeError, ZeroDivisionError
44
44
  ]
45
45
 
46
+ # As a kindness to unit test authors, count RSpec exceptions as fatal. Use some
47
+ # reflection to handle ALL RSpec-related exceptions.
48
+ spec_namespaces = if require_succeeds?('rspec')
49
+ # RSpec 2.x
50
+ [RSpec::Mocks, RSpec::Expectations]
51
+ elsif require_succeeds?('spec')
52
+ # RSpec 1.x
53
+ [Spec::Expectations]
54
+ else
55
+ # RSpec is not present
56
+ []
57
+ end
58
+ spec_namespaces.each do |namespace|
59
+ namespace.constants.each do |konst|
60
+ konst = namespace.const_get(konst)
61
+ if konst.is_a?(Class) && konst.ancestors.include?(Exception)
62
+ DEFAULT_FATAL_EXCEPTIONS << konst
63
+ end
64
+ end
65
+ end
66
+
46
67
  DEFAULT_FATAL_PROC = lambda do |e|
47
68
  if DEFAULT_FATAL_EXCEPTIONS.any? { |c| e.is_a?(c) }
48
69
  #Some Ruby builtin exceptions indicate program errors
@@ -7,8 +7,8 @@ spec = Gem::Specification.new do |s|
7
7
  s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
8
8
 
9
9
  s.name = 'right_support'
10
- s.version = '2.5.2'
11
- s.date = '2012-09-28'
10
+ s.version = '2.5.4'
11
+ s.date = '2012-10-05'
12
12
 
13
13
  s.authors = ['Tony Spataro', 'Sergey Sergyenko', 'Ryan Williamson', 'Lee Kirchhoff', 'Sergey Enin']
14
14
  s.email = 'support@rightscale.com'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_support
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 5
9
- - 2
10
- version: 2.5.2
9
+ - 4
10
+ version: 2.5.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tony Spataro
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2012-09-28 00:00:00 -07:00
22
+ date: 2012-10-05 00:00:00 -07:00
23
23
  default_executable:
24
24
  dependencies: []
25
25