dbi-dbrc 1.0.0 → 1.0.1

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 CHANGED
@@ -1,3 +1,6 @@
1
+ == 1.0.1 - 7-Oct-2005
2
+ * Improved the error message when an entry isn't found.
3
+
1
4
  == 1.0.0 - 15-Jun-2005
2
5
  * Ditches the use of 'etc'. Now requires the 'sys-admin' package as its
3
6
  replacement (for all platforms).
data/lib/dbi/dbrc.rb CHANGED
@@ -14,7 +14,7 @@ module DBI
14
14
 
15
15
  # The main class.
16
16
  class DBRC
17
- VERSION = "1.0.0"
17
+ VERSION = "1.0.1"
18
18
  attr_accessor :database, :user, :password, :driver, :dsn
19
19
  attr_accessor :maximum_reconnects, :timeout, :interval, :dbrc_dir
20
20
 
@@ -147,7 +147,12 @@ module DBI
147
147
  }
148
148
 
149
149
  # If we reach here it means the database and/or user wasn't found
150
- raise DBRCError, "No record found for #{@user}@#{@database}"
150
+ if @user
151
+ err = "no record found for #{@user}@#{@database}"
152
+ else
153
+ err = "no record found for #{@database}"
154
+ end
155
+ raise DBRCError, err
151
156
  end
152
157
 
153
158
  alias_method(:db,:database)
data/test/tc_dbrc.rb CHANGED
@@ -36,7 +36,7 @@ class TC_DBRC < Test::Unit::TestCase
36
36
  end
37
37
 
38
38
  def test_version
39
- assert_equal("1.0.0", DBRC::VERSION)
39
+ assert_equal("1.0.1", DBRC::VERSION)
40
40
  end
41
41
 
42
42
  def test_bad_dbrc_properties
data/test/tc_dbrc_xml.rb CHANGED
@@ -33,7 +33,7 @@ class TC_DBRC_XML < Test::Unit::TestCase
33
33
  end
34
34
 
35
35
  def test_version
36
- assert_equal("1.0.0", DBRC::XML::VERSION)
36
+ assert_equal("1.0.1", DBRC::XML::VERSION)
37
37
  end
38
38
 
39
39
  def test_constructor
data/test/tc_dbrc_yml.rb CHANGED
@@ -36,7 +36,7 @@ class TC_DBRC_YML < Test::Unit::TestCase
36
36
  end
37
37
 
38
38
  def test_version
39
- assert_equal("1.0.0", DBRC::YML::VERSION)
39
+ assert_equal("1.0.1", DBRC::YML::VERSION)
40
40
  end
41
41
 
42
42
  def test_constructor
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.10
2
+ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: dbi-dbrc
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2005-06-15
6
+ version: 1.0.1
7
+ date: 2005-10-07 00:00:00 -06:00
8
8
  summary: A simple way to avoid hard-coding passwords with DBI
9
9
  require_paths:
10
- - lib
10
+ - lib
11
11
  email: djberg96@gmail.com
12
12
  homepage: http://www.rubyforge.org/projects/shards
13
13
  rubyforge_project:
@@ -18,40 +18,38 @@ bindir: bin
18
18
  has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
21
+ -
22
+ - ">"
23
+ - !ruby/object:Gem::Version
24
+ version: 0.0.0
24
25
  version:
25
26
  platform: ruby
27
+ signing_key:
28
+ cert_chain:
26
29
  authors:
27
- - Daniel Berger
30
+ - Daniel Berger
28
31
  files:
29
- - examples/plain
30
- - examples/xml
31
- - examples/yml
32
- - examples/plain/test.rb
33
- - examples/xml/test_xml.rb
34
- - examples/yml/test_yml.rb
35
- - lib/dbi
36
- - lib/dbi/dbrc.rb
37
- - test/tc_dbrc.rb
38
- - test/tc_dbrc_xml.rb
39
- - test/tc_dbrc_yml.rb
40
- - test/ts_all.rb
41
- - README
42
- - CHANGES
32
+ - examples/plain
33
+ - examples/xml
34
+ - examples/yml
35
+ - examples/plain/test.rb
36
+ - examples/xml/test_xml.rb
37
+ - examples/yml/test_yml.rb
38
+ - lib/dbi
39
+ - lib/dbi/dbrc.rb
40
+ - test/tc_dbrc.rb
41
+ - test/tc_dbrc_xml.rb
42
+ - test/tc_dbrc_yml.rb
43
+ - test/ts_all.rb
44
+ - README
45
+ - CHANGES
43
46
  test_files:
44
- - test/ts_all.rb
47
+ - test/ts_all.rb
45
48
  rdoc_options: []
46
-
47
49
  extra_rdoc_files:
48
- - README
49
- - CHANGES
50
+ - README
51
+ - CHANGES
50
52
  executables: []
51
-
52
53
  extensions: []
53
-
54
54
  requirements: []
55
-
56
- dependencies: []
57
-
55
+ dependencies: []