dohruby 0.1.32 → 0.1.33

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -100,3 +100,5 @@
100
100
  * fix my silly bug
101
101
  *0.1.32* (Jun 11th, 2008)
102
102
  * add default values for host_files_directory config entry
103
+ *0.1.33* (Jun 13th, 2008)
104
+ * added new app_no_stdio where console logging is disabled
@@ -26,15 +26,25 @@ def self.use_default_runnable_development_config
26
26
  root_cfg['database'] = {'username' => 'root', 'host' => 'localhost'}
27
27
  end
28
28
 
29
- def self.init_runnable(file_or_directory)
29
+ def self.init_runnable(file_or_directory, block = nil)
30
30
  DohApp::init(file_or_directory)
31
31
  unless DohApp::load_config_file('active_runnable')
32
32
  unless DohApp::load_config_file('development_runnable')
33
33
  DohApp::use_default_runnable_development_config
34
34
  end
35
35
  end
36
+ block.call(DohApp::config) if block
36
37
  DohApp::activate_logger
37
38
  DohApp::activate_database
38
39
  end
39
40
 
41
+ def self.init_runnable_prog(&block)
42
+ DohApp::init_runnable($PROGRAM_NAME, block)
43
+ end
44
+
45
+ def self.init_runnable_pwd(&block)
46
+ require 'fileutils'
47
+ init_runnable(FileUtils::pwd, block)
48
+ end
49
+
40
50
  end
data/lib/doh/app.rb CHANGED
@@ -1,2 +1,2 @@
1
1
  require 'doh/app/init_runnable'
2
- DohApp::init_runnable($PROGRAM_NAME)
2
+ DohApp::init_runnable_prog
@@ -0,0 +1,2 @@
1
+ require 'doh/app/init_runnable'
2
+ DohApp::init_runnable_prog {|cfg| cfg['logger'].delete('stdout_acceptor')}
data/lib/doh/app_pwd.rb CHANGED
@@ -1,3 +1,2 @@
1
1
  require 'doh/app/init_runnable'
2
- require 'fileutils'
3
- DohApp::init_runnable(FileUtils::pwd)
2
+ DohApp::init_runnable_pwd
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.32
4
+ version: 0.1.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makani & Kem Mason
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-06-11 00:00:00 -06:00
12
+ date: 2008-06-13 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -48,6 +48,7 @@ files:
48
48
  - lib/doh/app/init_unit_test.rb
49
49
  - lib/doh/app/options.rb
50
50
  - lib/doh/app.rb
51
+ - lib/doh/app_no_stdio.rb
51
52
  - lib/doh/app_pwd.rb
52
53
  - lib/doh/app_util.rb
53
54
  - lib/doh/core