dbi-dbrc 1.1.5 → 1.1.6
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.
- data/CHANGES +4 -0
- data/dbi-dbrc.gemspec +1 -1
- data/lib/dbi/dbrc.rb +2 -3
- data/test/test_dbi_dbrc.rb +7 -3
- metadata +2 -2
data/CHANGES
CHANGED
data/dbi-dbrc.gemspec
CHANGED
data/lib/dbi/dbrc.rb
CHANGED
@@ -18,7 +18,7 @@ module DBI
|
|
18
18
|
class Error < StandardError; end
|
19
19
|
|
20
20
|
# The version of the dbi-dbrc library
|
21
|
-
VERSION = '1.1.
|
21
|
+
VERSION = '1.1.6'
|
22
22
|
|
23
23
|
@@windows = Config::CONFIG['host_os'] =~ /mswin|win32|dos/i
|
24
24
|
|
@@ -88,8 +88,6 @@ module DBI
|
|
88
88
|
#
|
89
89
|
def initialize(database, user=nil, dbrc_dir=nil)
|
90
90
|
if dbrc_dir.nil?
|
91
|
-
raise Error, 'bad directory' unless File.directory?(dbrc_dir)
|
92
|
-
|
93
91
|
uid = Process.uid
|
94
92
|
home = ENV['HOME'] || ENV['USERPROFILE']
|
95
93
|
|
@@ -109,6 +107,7 @@ module DBI
|
|
109
107
|
@dbrc_file = File.join(Sys::Admin.get_user(uid).dir, '.dbrc')
|
110
108
|
end
|
111
109
|
else
|
110
|
+
raise Error, 'bad directory' unless File.directory?(dbrc_dir)
|
112
111
|
@dbrc_file = File.join(dbrc_dir, '.dbrc')
|
113
112
|
end
|
114
113
|
|
data/test/test_dbi_dbrc.rb
CHANGED
@@ -36,7 +36,7 @@ class TC_DBI_DBRC < Test::Unit::TestCase
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def test_version
|
39
|
-
assert_equal('1.1.
|
39
|
+
assert_equal('1.1.6', DBRC::VERSION)
|
40
40
|
end
|
41
41
|
|
42
42
|
def test_bad_dbrc_properties
|
@@ -56,11 +56,15 @@ class TC_DBI_DBRC < Test::Unit::TestCase
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def test_bad_database
|
59
|
-
|
59
|
+
assert_raise(DBRC::Error){ DBRC.new(@db_bad, nil, @dir) }
|
60
60
|
end
|
61
61
|
|
62
62
|
def test_bad_user
|
63
|
-
|
63
|
+
assert_raise(DBRC::Error){ DBRC.new(@db1, @user_bad, @dir) }
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_bad_dir
|
67
|
+
assert_raise(DBI::DBRC::Error){ DBI::DBRC.new(@db1, @user1, '/bogusXX') }
|
64
68
|
end
|
65
69
|
|
66
70
|
def test_database
|
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.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Berger
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-10 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|