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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a98cc0e154b28eb92ef5d4aaa1f8df8787ca55e
4
- data.tar.gz: 2a2b9152af2c3ad2f7830e0a7b59822d28275fa7
3
+ metadata.gz: a9cec0899efe87ba343f44b09a0280446fad2d5e
4
+ data.tar.gz: df50a3b223e4694d6e351ab528a1ca201ba48544
5
5
  SHA512:
6
- metadata.gz: 8cd76193d5f39e52e44d543dddbd02847f0e608858d571685e78aae400d479e99e37564fa3a6afa6e9258923ae20fb7e8c90706e578a6996ac18a593421493ce
7
- data.tar.gz: a54777d8b944b07e78511b1d74562690be17b7446e50a032bb757f348ae7c69337a31899dc52eb21fe9d7039fd8e20e87704ed3d2215131bd699acd48cc4214e
6
+ metadata.gz: 9716c6c2816151c76bc1e374363d92a204b49eecf6eb06ce58b716ad27294ec252a0a710865e945e1aefa825f41a2b9570a64c058a2bd52745fdfff377b83649
7
+ data.tar.gz: 752e1302d0e391be203a282eb3b69b8f119e0d0f4598b6b4f9fcf61155828e3fc5e182ca9795723f1462fdff0243be5e8f10d1898aa690288788f501217c5e9b
@@ -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 = Object.new
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.5
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-02-04 00:00:00.000000000 Z
12
+ date: 2015-03-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra