dbi-dbrc 1.3.0-x86-mingw32 → 1.4.0-x86-mingw32

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
  SHA1:
3
- metadata.gz: fdcef58dd5bf5afed6ac6c91da32730af976ba43
4
- data.tar.gz: 06a8071e3da1bf416bcdf460470c75cf5ba2380a
3
+ metadata.gz: d3eab3b520e3f3aaca1bd23096cd53e7ebde8ab6
4
+ data.tar.gz: 62befc4170a150be2254932861e2ae98af54dbec
5
5
  SHA512:
6
- metadata.gz: ca0b0572c80ea722d02c7d973e2bfba4a75db3667a5104b869d4d0a9a36d62be88e65ccee2b07eebefabb0ecc82b42d4a9423e00e9550719cd51a9035ae25c05
7
- data.tar.gz: 830299ec5f71f7f73b9b0a04c7d8f7188e366cbd7c689479dfeecd1fa6db114dd8b9f83060d9384765316ef861532cbaa1d7e814d4e8ca6678988b5fde88bf5e
6
+ metadata.gz: 7c3d3547f54e021b0dc6ccd366d9ebfac6224cd5844dc5997f1045b588e0ce684453bea770b07e5d7979088f16edf3c184882ccfa6cadcf8b0cc046bb5fe050d
7
+ data.tar.gz: 3790d11e3a1b091c4a928b4409d70d958fb2e38ed63a0697e7c234260bdf5842eee5f932b13438a8ca6a1ffa5e3270cb839e7fc3597a01244c8167fddea49ca4
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGES CHANGED
@@ -1,3 +1,12 @@
1
+ == 1.4.0 - 6-Dec-2015
2
+ * Use Dir.home to calculate the home directory on Unixy platforms. Therefore
3
+ Ruby 1.9.3 or later is now required.
4
+ * The DBI::DBRC::YML class looks for "maximum_reconnects" instead of
5
+ "max_reconn" to be consistent with the other classes.
6
+ * Aliases are now universal for all classes.
7
+ * Some gemspec and Rakefile updates.
8
+ * Added a dbi-dbrc.rb file for convenience.
9
+
1
10
  == 1.3.0 - 3-Oct-2015
2
11
  * License changed to Apache 2.0.
3
12
  * Rakefile gem related tasks now assume Rubygems 2.x.
data/README CHANGED
@@ -5,10 +5,12 @@
5
5
  connections, e.g. ssh, ftp, etc.
6
6
 
7
7
  == Requirements
8
+ MS Windows users have these additional requirements:
9
+
8
10
  * sys-admin
9
- * win32-file-attributes (MS Windows only)
10
- * win32-dir (MS Windows only)
11
- * win32-process (MS Windows only)
11
+ * win32-file-attributes
12
+ * win32-dir
13
+ * win32-process
12
14
 
13
15
  == Installation
14
16
  gem install dbi-dbrc
@@ -249,7 +251,7 @@ DBRC#dsn=(dsn)
249
251
  If it's not correct, please let me know.
250
252
 
251
253
  == Copyright
252
- (C) Copyright 2002-2014, Daniel J. Berger, all rights reserved.
254
+ (C) Copyright 2002-2015, Daniel J. Berger, all rights reserved.
253
255
 
254
256
  = Warranty
255
257
  This package is provided "as is" and without any express or
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ namespace :gem do
10
10
  require 'rubygems/package'
11
11
  spec = eval(IO.read('dbi-dbrc.gemspec'))
12
12
  spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
13
- Gem::Package.build(spec)
13
+ Gem::Package.build(spec, true)
14
14
  end
15
15
 
16
16
  desc "Install the dbi-dbrc gem"
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'dbi-dbrc'
5
- spec.version = '1.3.0'
5
+ spec.version = '1.4.0'
6
6
  spec.author = 'Daniel Berger'
7
7
  spec.email = 'djberg96@gmail.com'
8
8
  spec.license = 'Apache 2.0'
@@ -10,14 +10,15 @@ Gem::Specification.new do |spec|
10
10
  spec.homepage = 'https://github.com/djberg96/dbi-dbrc'
11
11
  spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
12
12
  spec.test_files = Dir['test/test*.rb']
13
- spec.cert_chain = ['certs/djberg96_pub.pem']
13
+ spec.cert_chain = Dir['certs/*']
14
14
 
15
15
  spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
16
16
 
17
- spec.add_dependency('sys-admin')
17
+ spec.required_ruby_version = ">= 1.9.3"
18
18
  spec.add_development_dependency('test-unit')
19
19
 
20
20
  if File::ALT_SEPARATOR
21
+ spec.add_dependency('sys-admin')
21
22
  spec.add_dependency('win32-file-attributes')
22
23
  spec.add_dependency('win32-dir')
23
24
  spec.add_dependency('win32-process')
@@ -1,12 +1,12 @@
1
1
  #######################################################################
2
- # test_xml.rb
2
+ # test_yml.rb
3
3
  #
4
- # Simple test script that uses the DBRC::XML subclass.
4
+ # Simple test script that uses the DBRC::YML subclass.
5
5
  #######################################################################
6
6
  if File.basename(Dir.pwd) == "yml"
7
- Dir.chdir "../.."
8
- $LOAD_PATH.unshift Dir.pwd + "/lib"
9
- Dir.chdir "examples/yml"
7
+ Dir.chdir "../.."
8
+ $LOAD_PATH.unshift Dir.pwd + "/lib"
9
+ Dir.chdir "examples/yml"
10
10
  end
11
11
 
12
12
  require "dbi/dbrc"
@@ -0,0 +1 @@
1
+ require_relative 'dbi/dbrc'
@@ -2,9 +2,11 @@ if File::ALT_SEPARATOR
2
2
  require 'win32/dir'
3
3
  require 'win32/file/attributes'
4
4
  require 'win32/process'
5
+ require 'sys/admin'
6
+ else
7
+ require 'etc'
5
8
  end
6
9
 
7
- require 'sys/admin'
8
10
 
9
11
  # The DBI module serves as a namespace only.
10
12
  module DBI
@@ -16,19 +18,27 @@ module DBI
16
18
  class Error < StandardError; end
17
19
 
18
20
  # The version of the dbi-dbrc library
19
- VERSION = '1.3.0'
21
+ VERSION = '1.4.0'
20
22
 
21
- @@windows = File::ALT_SEPARATOR
23
+ WINDOWS = File::ALT_SEPARATOR # :no-doc:
22
24
 
23
25
  # The database or host to be connected to.
24
26
  attr_accessor :database
25
27
 
28
+ alias :db :database
29
+ alias :db= :database=
30
+ alias :host :database
31
+ alias :host= :database=
32
+
26
33
  # The user name used for the database or host connection.
27
34
  attr_accessor :user
28
35
 
29
36
  # The password associated with the database or host.
30
37
  attr_accessor :password
31
38
 
39
+ alias :passwd :password
40
+ alias :passwd= :password=
41
+
32
42
  # The driver associated with the database. This is used to internally to
33
43
  # construct the DSN.
34
44
  attr_accessor :driver
@@ -39,9 +49,15 @@ module DBI
39
49
  # The maximum number of reconnects a program should make before giving up.
40
50
  attr_accessor :maximum_reconnects
41
51
 
52
+ alias :max_reconn :maximum_reconnects
53
+ alias :max_reconn= :maximum_reconnects=
54
+
42
55
  # The timeout, in seconds, for each connection attempt.
43
56
  attr_accessor :timeout
44
57
 
58
+ alias :time_out :timeout
59
+ alias :time_out= :timeout=
60
+
45
61
  # The interval, in seconds, between each connection attempt.
46
62
  attr_accessor :interval
47
63
 
@@ -85,21 +101,16 @@ module DBI
85
101
  #
86
102
  def initialize(database, user=nil, dbrc_dir=nil)
87
103
  if dbrc_dir.nil?
88
- uid = Process.uid
89
- home = ENV['HOME'] || ENV['USERPROFILE']
90
-
91
- if home.nil?
92
- if @@windows
93
- home ||= Sys::Admin.get_user(uid, :localaccount => true).dir
94
- else
95
- home ||= Sys::Admin.get_user(uid).dir
96
- end
104
+ if WINDOWS
105
+ home = Sys::Admin.get_user(Process.uid, :localaccount => true).dir
106
+ else
107
+ home = Dir.home(Etc.getpwuid.name)
97
108
  end
98
109
 
99
110
  # Default to the app data directory on Windows, or root on Unix, if
100
111
  # no home dir can be found.
101
112
  if home.nil?
102
- if @@windows
113
+ if WINDOWS
103
114
  home = Dir::APPDATA
104
115
  else
105
116
  home = '/'
@@ -128,7 +139,7 @@ module DBI
128
139
  # Decrypt and re-encrypt the file if we're on MS Windows and the
129
140
  # file is encrypted.
130
141
  begin
131
- if @@windows && File.encrypted?(@dbrc_file)
142
+ if WINDOWS && File.encrypted?(@dbrc_file)
132
143
  file_was_encrypted = true
133
144
  File.decrypt(@dbrc_file)
134
145
  end
@@ -138,7 +149,7 @@ module DBI
138
149
  convert_numeric_strings()
139
150
  create_dsn_string()
140
151
  ensure
141
- if @@windows && file_was_encrypted
152
+ if WINDOWS && file_was_encrypted
142
153
  File.encrypt(@dbrc_file)
143
154
  end
144
155
  end
@@ -189,7 +200,7 @@ module DBI
189
200
  File.open(file){ |f|
190
201
  # Permissions must be set to 600 or better on Unix systems.
191
202
  # Must be hidden on Win32 systems.
192
- if @@windows
203
+ if WINDOWS
193
204
  unless File.hidden?(file)
194
205
  raise Error, "The .dbrc file must be hidden"
195
206
  end
@@ -209,50 +220,41 @@ module DBI
209
220
  # Parse the text out of the .dbrc file. This is the only method you
210
221
  # need to redefine if writing your own config handler.
211
222
  def parse_dbrc_config_file(file=@dbrc_file)
212
- IO.foreach(file){ |line|
213
- next if line =~ /^#/ # Ignore comments
214
- db, user, pwd, driver, timeout, max, interval = line.split
223
+ IO.foreach(file){ |line|
224
+ next if line =~ /^#/ # Ignore comments
225
+ db, user, pwd, driver, timeout, max, interval = line.split
215
226
 
216
- next unless @database == db
227
+ next unless @database == db
217
228
 
218
- if @user
219
- next unless @user == user
220
- end
229
+ if @user
230
+ next unless @user == user
231
+ end
221
232
 
222
- @user = user
223
- @password = pwd
224
- @driver = driver
225
- @timeout = timeout
226
- @maximum_reconnects = max
227
- @interval = interval
228
- return
229
- }
233
+ @user = user
234
+ @password = pwd
235
+ @driver = driver
236
+ @timeout = timeout
237
+ @maximum_reconnects = max
238
+ @interval = interval
239
+ return
240
+ }
230
241
 
231
- # If we reach here it means the database and/or user wasn't found
232
- if @user
233
- err = "no record found for #{@user}@#{@database}"
234
- else
235
- err = "no record found for #{@database}"
236
- end
242
+ # If we reach here it means the database and/or user wasn't found
243
+ if @user
244
+ err = "no record found for #{@user}@#{@database}"
245
+ else
246
+ err = "no record found for #{@database}"
247
+ end
237
248
 
238
- raise Error, err
249
+ raise Error, err
239
250
  end
240
251
 
241
- alias_method(:db, :database)
242
- alias_method(:db=, :database=)
243
- alias_method(:passwd, :password)
244
- alias_method(:passwd=, :password=)
245
- alias_method(:max_reconn, :maximum_reconnects)
246
- alias_method(:max_reconn=, :maximum_reconnects=)
247
- alias_method(:time_out, :timeout)
248
- alias_method(:time_out=, :timeout=)
249
- alias_method(:host, :database)
250
252
  end
251
253
 
252
254
  # A subclass of DBRC designed to handle .dbrc files in XML format. The
253
255
  # public methods of this class are identical to DBRC.
254
256
  class XML < DBRC
255
- require "rexml/document"
257
+ require 'rexml/document' # Good enough for small files
256
258
  include REXML
257
259
 
258
260
  private
@@ -281,7 +283,7 @@ module DBI
281
283
  # A subclass of DBRC designed to handle .dbrc files in YAML format. The
282
284
  # public methods of this class are identical to DBRC.
283
285
  class YML < DBRC
284
- require "yaml"
286
+ require 'yaml'
285
287
 
286
288
  private
287
289
 
@@ -296,7 +298,7 @@ module DBI
296
298
  @driver = info["driver"]
297
299
  @interval = info["interval"]
298
300
  @timeout = info["timeout"]
299
- @maximum_reconnects = info["max_reconn"]
301
+ @maximum_reconnects = info["maximum_reconnects"]
300
302
  return
301
303
  }
302
304
  }
@@ -33,7 +33,7 @@ class TC_DBI_DBRC < Test::Unit::TestCase
33
33
  end
34
34
 
35
35
  def test_version
36
- assert_equal('1.3.0', DBRC::VERSION)
36
+ assert_equal('1.4.0', DBRC::VERSION)
37
37
  end
38
38
 
39
39
  def test_bad_dbrc_properties
@@ -9,149 +9,149 @@ require 'test-unit'
9
9
  include DBI
10
10
 
11
11
  class TC_DBI_DBRC_YML < Test::Unit::TestCase
12
- def setup
13
- @dir = File.join(Dir.pwd, 'examples/yml')
14
- @file = File.join(@dir, '.dbrc')
15
- @db1 = "foo"
16
- @db2 = "bar"
17
- @user1 = "user1"
18
- @user2 = "user2"
19
- @db_bad = "blah" # Doesn't exist
20
- @user_bad = "user8" # Doesn't exist
21
-
22
- if File::ALT_SEPARATOR && File.respond_to?(:set_attr)
23
- File.set_attr(@file, File::HIDDEN)
24
- else
25
- File.chmod(0600, @file)
26
- end
27
-
28
- @dbrc = DBRC::YML.new(@db1, nil, @dir)
29
- end
30
-
31
- def test_constructor
32
- assert_raises(ArgumentError){ DBRC::YML.new }
33
- assert_nothing_raised{ DBRC::YML.new(@db1, @user1, @dir) }
34
- assert_nothing_raised{ DBRC::YML.new(@db1, nil, @dir) }
35
- end
36
-
37
- def test_bad_database
38
- assert_raises(DBRC::Error){ DBRC::YML.new(@db_bad, nil, @dir) }
39
- end
40
-
41
- def test_bad_user
42
- assert_raises(DBRC::Error){ DBRC::YML.new(@db1, @user_bad, @dir) }
43
- end
44
-
45
- def test_database
46
- assert_respond_to(@dbrc, :database)
47
- assert_respond_to(@dbrc, :database=)
48
- assert_respond_to(@dbrc, :db)
49
- assert_respond_to(@dbrc, :db=)
50
- assert_kind_of(String, @dbrc.db)
51
- end
52
-
53
- def test_dsn
54
- assert_respond_to(@dbrc, :dsn)
55
- assert_respond_to(@dbrc, :dsn=)
56
- end
57
-
58
- def test_user
59
- assert_respond_to(@dbrc, :user)
60
- assert_respond_to(@dbrc, :user=)
61
- assert_kind_of(String, @dbrc.user)
62
- end
63
-
64
- def test_password
65
- assert_respond_to(@dbrc, :password)
66
- assert_respond_to(@dbrc, :password=)
67
- assert_respond_to(@dbrc, :passwd)
68
- assert_respond_to(@dbrc, :passwd=)
69
- assert_kind_of(String, @dbrc.password)
70
- end
71
-
72
- def test_driver
73
- assert_respond_to(@dbrc, :driver)
74
- assert_respond_to(@dbrc, :driver=)
75
- assert_kind_of(String, @dbrc.driver)
76
- end
77
-
78
- def test_interval
79
- assert_respond_to(@dbrc, :interval)
80
- assert_respond_to(@dbrc, :interval=)
81
- assert_kind_of(Fixnum, @dbrc.interval)
82
- end
83
-
84
- def test_timeout
85
- assert_respond_to(@dbrc, :timeout)
86
- assert_respond_to(@dbrc, :timeout=)
87
- assert_respond_to(@dbrc, :time_out)
88
- assert_respond_to(@dbrc, :time_out=)
89
- assert_kind_of(Fixnum, @dbrc.timeout)
90
- end
91
-
92
- def test_max_reconn
93
- assert_respond_to(@dbrc, :max_reconn)
94
- assert_respond_to(@dbrc, :max_reconn=)
95
- assert_respond_to(@dbrc, :maximum_reconnects)
96
- assert_respond_to(@dbrc, :maximum_reconnects=)
97
- assert_kind_of(Fixnum, @dbrc.maximum_reconnects)
98
- end
99
-
100
- def test_sample_values
101
- assert_equal("foo", @dbrc.database)
102
- assert_equal("user1", @dbrc.user)
103
- assert_equal("pwd1", @dbrc.passwd)
104
- assert_equal("Oracle", @dbrc.driver)
105
- assert_equal(60, @dbrc.interval)
106
- assert_equal(40, @dbrc.timeout)
107
- assert_equal(3, @dbrc.max_reconn)
108
- assert_equal("dbi:Oracle:foo", @dbrc.dsn)
109
- end
110
-
111
- # Same database, different user
112
- def test_duplicate_database
113
- db = DBRC::YML.new("foo", "user2", @dir)
114
- assert_equal("user2", db.user)
115
- assert_equal("pwd2", db.passwd)
116
- assert_equal("OCI8", db.driver)
117
- assert_equal(60, db.interval)
118
- assert_equal(60, db.timeout)
119
- assert_equal(4, db.max_reconn)
120
- assert_equal("dbi:OCI8:foo", db.dsn)
121
- end
122
-
123
- # Different database, different user
124
- def test_different_database
125
- db = DBRC::YML.new("bar", "user1", @dir)
126
- assert_equal("user1", db.user)
127
- assert_equal("pwd3", db.passwd)
128
- assert_equal("Oracle", db.driver)
129
- assert_equal(30, db.interval)
130
- assert_equal(30, db.timeout)
131
- assert_equal(2, db.max_reconn)
132
- assert_equal("dbi:Oracle:bar", db.dsn)
133
- end
134
-
135
- # A database with only a couple fields defined
136
- def test_nil_values
137
- db = DBRC::YML.new("baz", "user3", @dir)
138
- assert_equal("user3", db.user)
139
- assert_equal("pwd4", db.passwd)
140
- assert_nil(db.driver)
141
- assert_nil(db.interval)
142
- assert_nil(db.timeout)
143
- assert_nil(db.max_reconn)
144
- assert_nil(db.dsn)
145
- end
146
-
147
- def teardown
148
- @dir = nil
149
- @db1 = nil
150
- @db2 = nil
151
- @user1 = nil
152
- @user2 = nil
153
- @db_bad = nil
154
- @user_bad = nil
155
- @dbrc = nil
156
- end
12
+ def setup
13
+ @dir = File.join(Dir.pwd, 'examples/yml')
14
+ @file = File.join(@dir, '.dbrc')
15
+ @db1 = "foo"
16
+ @db2 = "bar"
17
+ @user1 = "user1"
18
+ @user2 = "user2"
19
+ @db_bad = "blah" # Doesn't exist
20
+ @user_bad = "user8" # Doesn't exist
21
+
22
+ if File::ALT_SEPARATOR && File.respond_to?(:set_attr)
23
+ File.set_attr(@file, File::HIDDEN)
24
+ else
25
+ File.chmod(0600, @file)
26
+ end
27
+
28
+ @dbrc = DBRC::YML.new(@db1, nil, @dir)
29
+ end
30
+
31
+ def test_constructor
32
+ assert_raises(ArgumentError){ DBRC::YML.new }
33
+ assert_nothing_raised{ DBRC::YML.new(@db1, @user1, @dir) }
34
+ assert_nothing_raised{ DBRC::YML.new(@db1, nil, @dir) }
35
+ end
36
+
37
+ def test_bad_database
38
+ assert_raises(DBRC::Error){ DBRC::YML.new(@db_bad, nil, @dir) }
39
+ end
40
+
41
+ def test_bad_user
42
+ assert_raises(DBRC::Error){ DBRC::YML.new(@db1, @user_bad, @dir) }
43
+ end
44
+
45
+ def test_database
46
+ assert_respond_to(@dbrc, :database)
47
+ assert_respond_to(@dbrc, :database=)
48
+ assert_respond_to(@dbrc, :db)
49
+ assert_respond_to(@dbrc, :db=)
50
+ assert_kind_of(String, @dbrc.db)
51
+ end
52
+
53
+ def test_dsn
54
+ assert_respond_to(@dbrc, :dsn)
55
+ assert_respond_to(@dbrc, :dsn=)
56
+ end
57
+
58
+ def test_user
59
+ assert_respond_to(@dbrc, :user)
60
+ assert_respond_to(@dbrc, :user=)
61
+ assert_kind_of(String, @dbrc.user)
62
+ end
63
+
64
+ def test_password
65
+ assert_respond_to(@dbrc, :password)
66
+ assert_respond_to(@dbrc, :password=)
67
+ assert_respond_to(@dbrc, :passwd)
68
+ assert_respond_to(@dbrc, :passwd=)
69
+ assert_kind_of(String, @dbrc.password)
70
+ end
71
+
72
+ def test_driver
73
+ assert_respond_to(@dbrc, :driver)
74
+ assert_respond_to(@dbrc, :driver=)
75
+ assert_kind_of(String, @dbrc.driver)
76
+ end
77
+
78
+ def test_interval
79
+ assert_respond_to(@dbrc, :interval)
80
+ assert_respond_to(@dbrc, :interval=)
81
+ assert_kind_of(Fixnum, @dbrc.interval)
82
+ end
83
+
84
+ def test_timeout
85
+ assert_respond_to(@dbrc, :timeout)
86
+ assert_respond_to(@dbrc, :timeout=)
87
+ assert_respond_to(@dbrc, :time_out)
88
+ assert_respond_to(@dbrc, :time_out=)
89
+ assert_kind_of(Fixnum, @dbrc.timeout)
90
+ end
91
+
92
+ def test_max_reconn
93
+ assert_respond_to(@dbrc, :max_reconn)
94
+ assert_respond_to(@dbrc, :max_reconn=)
95
+ assert_respond_to(@dbrc, :maximum_reconnects)
96
+ assert_respond_to(@dbrc, :maximum_reconnects=)
97
+ assert_kind_of(Fixnum, @dbrc.maximum_reconnects)
98
+ end
99
+
100
+ def test_sample_values
101
+ assert_equal("foo", @dbrc.database)
102
+ assert_equal("user1", @dbrc.user)
103
+ assert_equal("pwd1", @dbrc.passwd)
104
+ assert_equal("Oracle", @dbrc.driver)
105
+ assert_equal(60, @dbrc.interval)
106
+ assert_equal(40, @dbrc.timeout)
107
+ assert_equal(3, @dbrc.max_reconn)
108
+ assert_equal("dbi:Oracle:foo", @dbrc.dsn)
109
+ end
110
+
111
+ # Same database, different user
112
+ def test_duplicate_database
113
+ db = DBRC::YML.new("foo", "user2", @dir)
114
+ assert_equal("user2", db.user)
115
+ assert_equal("pwd2", db.passwd)
116
+ assert_equal("OCI8", db.driver)
117
+ assert_equal(60, db.interval)
118
+ assert_equal(60, db.timeout)
119
+ assert_equal(4, db.max_reconn)
120
+ assert_equal("dbi:OCI8:foo", db.dsn)
121
+ end
122
+
123
+ # Different database, different user
124
+ def test_different_database
125
+ db = DBRC::YML.new("bar", "user1", @dir)
126
+ assert_equal("user1", db.user)
127
+ assert_equal("pwd3", db.passwd)
128
+ assert_equal("Oracle", db.driver)
129
+ assert_equal(30, db.interval)
130
+ assert_equal(30, db.timeout)
131
+ assert_equal(2, db.max_reconn)
132
+ assert_equal("dbi:Oracle:bar", db.dsn)
133
+ end
134
+
135
+ # A database with only a couple fields defined
136
+ def test_nil_values
137
+ db = DBRC::YML.new("baz", "user3", @dir)
138
+ assert_equal("user3", db.user)
139
+ assert_equal("pwd4", db.passwd)
140
+ assert_nil(db.driver)
141
+ assert_nil(db.interval)
142
+ assert_nil(db.timeout)
143
+ assert_nil(db.max_reconn)
144
+ assert_nil(db.dsn)
145
+ end
146
+
147
+ def teardown
148
+ @dir = nil
149
+ @db1 = nil
150
+ @db2 = nil
151
+ @user1 = nil
152
+ @user2 = nil
153
+ @db_bad = nil
154
+ @user_bad = nil
155
+ @dbrc = nil
156
+ end
157
157
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dbi-dbrc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Daniel Berger
@@ -30,16 +30,16 @@ cert_chain:
30
30
  EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
31
31
  tGSHgAmcLlkdGgan182qsE/4kKM=
32
32
  -----END CERTIFICATE-----
33
- date: 2015-10-05 00:00:00.000000000 Z
33
+ date: 2015-12-06 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
- name: sys-admin
36
+ name: test-unit
37
37
  requirement: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
- type: :runtime
42
+ type: :development
43
43
  prerelease: false
44
44
  version_requirements: !ruby/object:Gem::Requirement
45
45
  requirements:
@@ -47,13 +47,13 @@ dependencies:
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  - !ruby/object:Gem::Dependency
50
- name: test-unit
50
+ name: sys-admin
51
51
  requirement: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
- type: :development
56
+ type: :runtime
57
57
  prerelease: false
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  requirements:
@@ -119,16 +119,25 @@ extra_rdoc_files:
119
119
  - CHANGES
120
120
  - MANIFEST
121
121
  files:
122
- - CHANGES
123
- - MANIFEST
124
- - README
125
- - Rakefile
122
+ - certs
126
123
  - certs/djberg96_pub.pem
124
+ - CHANGES
127
125
  - dbi-dbrc.gemspec
126
+ - examples
127
+ - examples/plain
128
128
  - examples/plain/test.rb
129
+ - examples/xml
129
130
  - examples/xml/test_xml.rb
131
+ - examples/yml
130
132
  - examples/yml/test_yml.rb
133
+ - lib
134
+ - lib/dbi
131
135
  - lib/dbi/dbrc.rb
136
+ - lib/dbi-dbrc.rb
137
+ - MANIFEST
138
+ - Rakefile
139
+ - README
140
+ - test
132
141
  - test/test_dbi_dbrc.rb
133
142
  - test/test_dbi_dbrc_xml.rb
134
143
  - test/test_dbi_dbrc_yml.rb
@@ -144,7 +153,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
153
  requirements:
145
154
  - - ">="
146
155
  - !ruby/object:Gem::Version
147
- version: '0'
156
+ version: 1.9.3
148
157
  required_rubygems_version: !ruby/object:Gem::Requirement
149
158
  requirements:
150
159
  - - ">="
metadata.gz.sig CHANGED
Binary file