sinatra-activerecord 2.0.5 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sinatra/activerecord.rb +1 -1
- data/lib/sinatra/activerecord/rake/activerecord_4.rb +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9cec0899efe87ba343f44b09a0280446fad2d5e
|
4
|
+
data.tar.gz: df50a3b223e4694d6e351ab528a1ca201ba48544
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9716c6c2816151c76bc1e374363d92a204b49eecf6eb06ce58b716ad27294ec252a0a710865e945e1aefa825f41a2b9570a64c058a2bd52745fdfff377b83649
|
7
|
+
data.tar.gz: 752e1302d0e391be203a282eb3b69b8f119e0d0f4598b6b4f9fcf61155828e3fc5e182ca9795723f1462fdff0243be5e8f10d1898aa690288788f501217c5e9b
|
data/lib/sinatra/activerecord.rb
CHANGED
@@ -16,8 +16,8 @@ module Sinatra
|
|
16
16
|
|
17
17
|
module ActiveRecordExtension
|
18
18
|
def self.registered(app)
|
19
|
-
app.set :database, ENV['DATABASE_URL'] if ENV['DATABASE_URL']
|
20
19
|
app.set :database_file, "#{Dir.pwd}/config/database.yml" if File.exist?("#{Dir.pwd}/config/database.yml")
|
20
|
+
app.set :database, ENV['DATABASE_URL'] if ENV['DATABASE_URL']
|
21
21
|
unless defined?(Rake) || [:test, :production].include?(app.settings.environment)
|
22
22
|
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
23
23
|
end
|
@@ -1,5 +1,4 @@
|
|
1
|
-
seed_loader =
|
2
|
-
seed_loader.instance_eval do
|
1
|
+
seed_loader = Class.new do
|
3
2
|
def load_seed
|
4
3
|
load "#{ActiveRecord::Tasks::DatabaseTasks.db_dir}/seeds.rb"
|
5
4
|
end
|
@@ -11,7 +10,7 @@ ActiveRecord::Tasks::DatabaseTasks.tap do |config|
|
|
11
10
|
config.db_dir = "db"
|
12
11
|
config.migrations_paths = ["db/migrate"]
|
13
12
|
config.fixtures_path = "test/fixtures"
|
14
|
-
config.seed_loader = seed_loader
|
13
|
+
config.seed_loader = seed_loader.new
|
15
14
|
config.database_configuration = ActiveRecord::Base.configurations
|
16
15
|
end
|
17
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Mizerany
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-03-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|