postgresql_cursor 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e5f4a26d515960d1540480268329773c23a4e99453216b5bcd54aba599b27938
4
- data.tar.gz: 0fa28ed9b5f9e5a981dda5783135c20c120657edc2ef7077bcfee7eeafc8128e
3
+ metadata.gz: 3f0d7815c65eeeeb83cc41344d0e4a76906236c43392f837e9e2ba7bb14277a7
4
+ data.tar.gz: 66b9dbcb6a17046a2d1338297f0b9e4233b46467bd0efb76a663db5d6cfcb4be
5
5
  SHA512:
6
- metadata.gz: 26ad2f87253cda10a5ebec49b7ed80e44be294460b0a6dea4128a3b6c36e6ad70583921ae1c8cfc89acb00a81e6f744bb0e44c3929adcd97ad360759d2758f8e
7
- data.tar.gz: 2667b5fee47be190f4cd58f068db030fc7ab34087b1ad56449d2b6722e2205baceae18142ae4692241b1c92cc9382076446283b5807fa9234e70af7799489dba
6
+ metadata.gz: cc42f9f219afb24cbbe15abf0829de57b8f3c8002a3658e931bfbc97a065d080706e500ba86b3a3bacf8778ca824032556497f520ee1153348f8f9057fc98b6b
7
+ data.tar.gz: ec58f29782cfac48985b1c8d491726cfb23ebc1cefae89766045bff36989b238e01a10fa0eb6f436efdc0446b73395b6fdb32f13cfd239166b3713736c4d8f20
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ end
11
11
 
12
12
  desc "Open and IRB Console with the gem and test-app loaded"
13
13
  task :console do
14
- sh "bundle exec irb -Ilib -I . -r postgresql_cursor -r test-app/app"
14
+ sh "bundle exec irb -Ilib -I . -r pg -r postgresql_cursor -r test-app/app"
15
15
  #require 'irb'
16
16
  #ARGV.clear
17
17
  #IRB.start
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'postgresql_cursor/version'
4
+ require 'active_support'
4
5
 
5
6
  ActiveSupport.on_load :active_record do
6
7
  require 'postgresql_cursor/cursor'
@@ -232,14 +232,14 @@ module PostgreSQLCursor
232
232
  fields.each_with_index do |fname, i|
233
233
  ftype = @result.ftype i
234
234
  fmod = @result.fmod i
235
- types[fname] = @connection.get_type_map.fetch(ftype, fmod) { |oid, mod|
235
+ types[fname] = @connection.get_type_map.fetch(ftype, fmod) do |oid, mod|
236
236
  warn "unknown OID: #{fname}(#{oid}) (#{sql})"
237
237
  if ::ActiveRecord::VERSION::MAJOR <= 4
238
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Identity.new
238
+ ::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Identity.new
239
239
  else
240
- ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Identity.new
240
+ ::ActiveRecord::Type::Value.new
241
241
  end
242
- }
242
+ end
243
243
  end
244
244
 
245
245
  @column_types = types
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PostgresqlCursor
2
- VERSION = "0.6.3"
4
+ VERSION = '0.6.4'
3
5
  end
@@ -1,32 +1,44 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'postgresql_cursor/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "postgresql_cursor"
8
+ spec.name = 'postgresql_cursor'
8
9
  spec.version = PostgresqlCursor::VERSION
9
- spec.authors = ["Allen Fair"]
10
- spec.email = ["allen.fair@gmail.com"]
11
- spec.summary = "ActiveRecord PostgreSQL Adapter extension for using a cursor to return a large result set"
12
- spec.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 1_000 rows), buffers them, and returns the rows one at a time."
13
- spec.homepage = "http://github.com/afair/postgresql_cursor"
14
- spec.license = "MIT"
10
+ spec.authors = ['Allen Fair']
11
+ spec.email = ['allen.fair@gmail.com']
12
+ spec.summary = <<-SUMMARY
13
+ ActiveRecord PostgreSQL Adapter extension for using a cursor to return a
14
+ large result set
15
+ SUMMARY
16
+ spec.description = <<-DESCRIPTION
17
+ PostgreSQL Cursor is an extension to the ActiveRecord PostgreSQLAdapter for
18
+ very large result sets. It provides a cursor open/fetch/close interface to
19
+ access data without loading all rows into memory, and instead loads the result
20
+ rows in 'chunks' (default of 1_000 rows), buffers them, and returns the rows
21
+ one at a time.
22
+ DESCRIPTION
23
+ spec.homepage = 'http://github.com/afair/postgresql_cursor'
24
+ spec.license = 'MIT'
15
25
 
16
26
  spec.files = `git ls-files -z`.split("\x0")
17
27
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
28
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
29
+ spec.require_paths = ['lib']
30
+
31
+ # Remove this for jruby which should use 'activerecord-jdbcpostgresql-adapter'
32
+ # spec.add_dependency 'pg'
20
33
 
21
- #spec.add_dependency "pg" # Remove this for jruby, which should specify 'activerecord-jdbcpostgresql-adapter'
22
- spec.add_dependency "activerecord", ">= 3.1.0"
23
- #spec.add_dependency "activerecord", "~> 3.1.0"
24
- # Tests don't run on 4.0.0 since AR/AS have an older version of minitest as a run-time dependency(!) than our tests support
25
- #spec.add_dependency "activerecord", "~> 4.0.0";# spec.add_dependency "minitest", "~> 4.2.0"
26
- #spec.add_dependency "activerecord", "~> 4.1.0"
27
- #spec.add_dependency "activerecord", "~> 5.0.0.beta2"
34
+ spec.add_dependency 'activerecord', '>= 3.1.0'
35
+ # spec.add_dependency 'activerecord', '~> 3.1.0'
36
+ # spec.add_dependency 'activerecord', '~> 4.1.0'
37
+ # spec.add_dependency 'activerecord', '~> 5.0.0'
38
+ # spec.add_dependency 'activerecord', '~> 6.0.0'
28
39
 
29
- spec.add_development_dependency "pg"
30
- spec.add_development_dependency "rake"
31
- spec.add_development_dependency "minitest"
40
+ spec.add_development_dependency 'irb'
41
+ spec.add_development_dependency 'minitest'
42
+ spec.add_development_dependency 'pg'
43
+ spec.add_development_dependency 'rake'
32
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgresql_cursor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen Fair
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-30 00:00:00.000000000 Z
11
+ date: 2019-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 3.1.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: pg
28
+ name: irb
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,21 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: minitest
56
+ name: pg
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - ">="
@@ -66,10 +80,12 @@ dependencies:
66
80
  - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
- description: PostgreSQL Cursor is an extension to the ActiveRecord PostgreSQLAdapter
70
- for very large result sets. It provides a cursor open/fetch/close interface to access
71
- data without loading all rows into memory, and instead loads the result rows in
72
- "chunks" (default of 1_000 rows), buffers them, and returns the rows one at a time.
83
+ description: |2
84
+ PostgreSQL Cursor is an extension to the ActiveRecord PostgreSQLAdapter for
85
+ very large result sets. It provides a cursor open/fetch/close interface to
86
+ access data without loading all rows into memory, and instead loads the result
87
+ rows in 'chunks' (default of 1_000 rows), buffers them, and returns the rows
88
+ one at a time.
73
89
  email:
74
90
  - allen.fair@gmail.com
75
91
  executables: []