dohruby 0.1.24 → 0.1.25
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/bin/run_tests.rb +12 -4
- data/lib/doh/mysql/database_creator.rb +2 -2
- metadata +1 -1
data/CHANGELOG
CHANGED
data/bin/run_tests.rb
CHANGED
@@ -1,10 +1,18 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'doh/app/home'
|
3
3
|
|
4
|
-
|
4
|
+
what_to_run = ARGV[0] || '.'
|
5
|
+
if File.directory?(what_to_run)
|
6
|
+
start_dir = what_to_run
|
7
|
+
else
|
8
|
+
start_dir = File.dirname(what_to_run)
|
9
|
+
end
|
5
10
|
DohApp::find_home(start_dir)
|
6
|
-
|
7
11
|
require 'doh/app_init'
|
8
|
-
require 'doh/util/run_tests'
|
9
12
|
|
10
|
-
|
13
|
+
if File.directory?(what_to_run)
|
14
|
+
require 'doh/util/run_tests'
|
15
|
+
Doh::run_tests(start_dir)
|
16
|
+
else
|
17
|
+
require what_to_run
|
18
|
+
end
|
@@ -7,8 +7,8 @@ require 'yaml'
|
|
7
7
|
module DohDb
|
8
8
|
|
9
9
|
class DatabaseCreator
|
10
|
-
def initialize(data_directory, connector = nil)
|
11
|
-
@data_directory = data_directory
|
10
|
+
def initialize(data_directory = nil, connector = nil)
|
11
|
+
@data_directory = data_directory || File.join(DohApp::home, 'database')
|
12
12
|
@connector = connector || DohDb::connector_instance
|
13
13
|
end
|
14
14
|
|