postgresql_cursor 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
@@ -64,7 +64,7 @@ class PostgreSQLCursor
64
64
  break if has_do_until && rc == @options[:until]
65
65
  break if has_do_while && rc != @options[:while]
66
66
  end
67
- rescue e
67
+ rescue Exception => e
68
68
  close
69
69
  raise e
70
70
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "postgresql_cursor"
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Allen Fair"]
12
- s.date = "2012-07-21"
12
+ s.date = "2013-02-20"
13
13
  s.description = "PostgreSQL Cursor is an extension to the ActiveRecord PostgreSQLAdapter for very large result sets. It provides a cursor open/fetch/close interface to access data without loading all rows into memory, and instead loads the result rows in \"chunks\" (default of 10_000 rows), buffers them, and returns the rows one at a time."
14
14
  s.email = "allen.fair@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  ]
30
30
  s.homepage = "http://github.com/afair/postgresql_cursor"
31
31
  s.require_paths = ["lib"]
32
- s.rubygems_version = "1.8.16"
32
+ s.rubygems_version = "1.8.24"
33
33
  s.summary = "ActiveRecord PostgreSQL Adapter extension for using a cursor to return a large result set"
34
34
 
35
35
  if s.respond_to? :specification_version then
@@ -41,5 +41,15 @@ class TestPostgresqlCursor < Test::Unit::TestCase
41
41
  assert_equal 1000, nn
42
42
  assert_equal Model, row.class
43
43
  end
44
+
45
+ def test_exception
46
+ begin
47
+ Model.each_row_by_sql("select * from records") do |r|
48
+ raise "Oops"
49
+ end
50
+ rescue Exception => e
51
+ assert_equal e.message, 'Oops'
52
+ end
53
+ end
44
54
 
45
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgresql_cursor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-21 00:00:00.000000000 Z
12
+ date: 2013-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &2164034600 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2164034600
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: pg
27
- requirement: &2164034040 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,7 +37,12 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *2164034040
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  description: PostgreSQL Cursor is an extension to the ActiveRecord PostgreSQLAdapter
37
47
  for very large result sets. It provides a cursor open/fetch/close interface to access
38
48
  data without loading all rows into memory, and instead loads the result rows in
@@ -73,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
83
  version: '0'
74
84
  requirements: []
75
85
  rubyforge_project:
76
- rubygems_version: 1.8.16
86
+ rubygems_version: 1.8.24
77
87
  signing_key:
78
88
  specification_version: 3
79
89
  summary: ActiveRecord PostgreSQL Adapter extension for using a cursor to return a