yasarg 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/yasarg/connection.rb +2 -5
- data/lib/yasarg/tasks.rb +0 -10
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/yasarg/connection.rb
CHANGED
@@ -2,11 +2,8 @@ module Yasarg
|
|
2
2
|
class Connection
|
3
3
|
class << self
|
4
4
|
def establish
|
5
|
-
|
6
|
-
|
7
|
-
configuration = Yasarg::RailsFakeApp.config.database_configuration[Rails.env]
|
8
|
-
ActiveRecord::Base.establish_connection(configuration)
|
9
|
-
end
|
5
|
+
configuration = Yasarg::RailsFakeApp.config.database_configuration[Rails.env]
|
6
|
+
ActiveRecord::Base.establish_connection(configuration)
|
10
7
|
end
|
11
8
|
end
|
12
9
|
end
|
data/lib/yasarg/tasks.rb
CHANGED
@@ -1,18 +1,8 @@
|
|
1
1
|
module Yasarg
|
2
2
|
class Tasks
|
3
3
|
def self.load_tasks
|
4
|
-
require "rails"
|
5
|
-
|
6
|
-
require File.expand_path('../../yasarg/rails_fake_app', __FILE__)
|
7
4
|
app = Yasarg::RailsFakeApp
|
8
5
|
app.load_tasks
|
9
|
-
|
10
|
-
require "active_record"
|
11
|
-
if !ActiveRecord::Base.connected?
|
12
|
-
configuration = app.config.database_configuration[Rails.env]
|
13
|
-
ActiveRecord::Base.establish_connection(configuration)
|
14
|
-
end
|
15
|
-
|
16
6
|
load "active_record/railties/databases.rake"
|
17
7
|
end
|
18
8
|
end
|