dohruby 0.1.23 → 0.1.24

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/CHANGELOG CHANGED
@@ -74,3 +74,5 @@
74
74
  * move Doh::Options into DohApp
75
75
  *0.1.23* (May 28th, 2008)
76
76
  * tweak new DohApp stuff some for more flexibility
77
+ *0.1.24* (May 28th, 2008)
78
+ * more DohApp tweaks
data/bin/run_tests.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
- require 'doh/app_pwd'
3
- require 'doh/util/run_tests'
2
+ require 'doh/app/home'
3
+
4
+ start_dir = ARGV[0] || '.'
5
+ DohApp::find_home(start_dir)
4
6
 
5
- Doh::run_tests('.')
7
+ require 'doh/app_init'
8
+ require 'doh/util/run_tests'
6
9
 
10
+ Doh::run_tests(start_dir)
@@ -1,3 +1,3 @@
1
1
  require 'doh/app/home'
2
2
 
3
- DohApp::set_home(DohApp::find_home(File.dirname($0)))
3
+ DohApp::find_home(File.dirname($PROGRAM_NAME))
data/lib/doh/app/home.rb CHANGED
@@ -1,23 +1,19 @@
1
1
  module DohApp
2
2
 
3
+ @@home = nil
4
+ def self.home
5
+ @@home
6
+ end
7
+
3
8
  def self.find_home(dir, max_tries = 20)
4
9
  abspath = File.expand_path(dir)
5
10
  raise "unable to find a DohApp home" if (abspath == '/') || (max_tries <= 0)
6
11
 
7
12
  if File.exist?(File.join(abspath, 'dohapp_home'))
8
- abspath
13
+ @@home = abspath
9
14
  else
10
15
  find_home(File.join(abspath, '..'), max_tries - 1)
11
16
  end
12
17
  end
13
18
 
14
- @@home = nil
15
- def self.home
16
- @@home
17
- end
18
-
19
- def self.set_home(home)
20
- @@home = home
21
- end
22
-
23
19
  end
data/lib/doh/app.rb ADDED
@@ -0,0 +1,2 @@
1
+ require 'doh/app/find_home_from_main_source'
2
+ require 'doh/app_init'
@@ -1,7 +1,7 @@
1
1
  module DohLogger
2
2
 
3
3
  def self.default_logfile_name
4
- File.basename($0, '.rb') + '.log'
4
+ File.basename($PROGRAM_NAME, '.rb') + '.log'
5
5
  end
6
6
 
7
7
  end
@@ -1,4 +1,4 @@
1
- require 'doh/logger/interface'
1
+ require 'doh/logger'
2
2
  require 'doh/mysql/handle'
3
3
  require 'doh/mysql/raw_row_builder'
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.23
4
+ version: 0.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makani & Kem Mason
@@ -39,12 +39,10 @@ files:
39
39
  - lib/doh/app
40
40
  - lib/doh/app/add_lib_to_load_path.rb
41
41
  - lib/doh/app/find_home_from_main_source.rb
42
- - lib/doh/app/find_home_from_pwd.rb
43
42
  - lib/doh/app/home.rb
44
43
  - lib/doh/app/options.rb
45
- - lib/doh/app_pwd.rb
46
- - lib/doh/app_shared.rb
47
- - lib/doh/app_src.rb
44
+ - lib/doh/app.rb
45
+ - lib/doh/app_init.rb
48
46
  - lib/doh/core
49
47
  - lib/doh/core/bigdecimal.rb
50
48
  - lib/doh/core/date.rb
@@ -1,4 +0,0 @@
1
- require 'doh/app/home'
2
- require 'fileutils'
3
-
4
- DohApp::set_home(DohApp::find_home(FileUtils.pwd))
data/lib/doh/app_pwd.rb DELETED
@@ -1,2 +0,0 @@
1
- require 'doh/app/find_home_from_pwd'
2
- require 'doh/app_shared'
data/lib/doh/app_src.rb DELETED
@@ -1,2 +0,0 @@
1
- require 'doh/app/find_home_from_pwd'
2
- require 'doh/app_shared'
File without changes