winton-active_wrapper 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +1 -1
- data/active_wrapper.gemspec +1 -1
- data/gemspec.rb +1 -1
- data/lib/active_wrapper.rb +16 -9
- data/lib/active_wrapper/tasks.rb +3 -2
- metadata +1 -1
data/README.markdown
CHANGED
data/active_wrapper.gemspec
CHANGED
data/gemspec.rb
CHANGED
data/lib/active_wrapper.rb
CHANGED
@@ -1,16 +1,23 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'activerecord'
|
3
|
+
require 'logger'
|
4
|
+
require 'yaml'
|
5
|
+
|
1
6
|
require File.dirname(__FILE__) + "/active_wrapper/db"
|
2
7
|
require File.dirname(__FILE__) + "/active_wrapper/log"
|
3
8
|
|
4
|
-
|
5
|
-
|
6
|
-
def initialize(options={})
|
9
|
+
module ActiveWrapper
|
10
|
+
class <<self
|
7
11
|
|
8
|
-
options
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
12
|
+
def setup(options={})
|
13
|
+
|
14
|
+
options = {
|
15
|
+
:base => File.dirname($0),
|
16
|
+
:env => 'development',
|
17
|
+
:log => 'development'
|
18
|
+
}.merge(options.reject { |k, v| v.nil? })
|
13
19
|
|
14
|
-
|
20
|
+
[ Db.new(options), Log.new(options) ]
|
21
|
+
end
|
15
22
|
end
|
16
23
|
end
|
data/lib/active_wrapper/tasks.rb
CHANGED