sinatra-activerecord 2.0.2 → 2.0.3
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/tasks.rake +1 -1
- 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: 6bfc3f65a8360584831ad8e60029eaba8180b1c3
|
4
|
+
data.tar.gz: e1ef87235e5610ed3954a09aca6ad1a99e7ff6d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbf759344df1482aa2183016e352386ddfba1e2c4ab16992f291ed24b97d42a28beab9aa78bcb349e35045a5e32ecbcea061b4163d9e51877c6d12512d419598
|
7
|
+
data.tar.gz: ca63f1b7c6585264fbe22744d1eb5b14a06cbb793ddbaa431dff07b503fcf556a7b53faaa371dec982af09c53abef9819d1279507990c7174c6aa1828dcb4feb
|
data/lib/sinatra/activerecord.rb
CHANGED
@@ -17,7 +17,7 @@ module Sinatra
|
|
17
17
|
module ActiveRecordExtension
|
18
18
|
def self.registered(app)
|
19
19
|
app.set :database, ENV['DATABASE_URL'] if ENV['DATABASE_URL']
|
20
|
-
app.set :database_file, "#{Dir.pwd}/config/database.yml" if File.
|
20
|
+
app.set :database_file, "#{Dir.pwd}/config/database.yml" if File.exist?("#{Dir.pwd}/config/database.yml")
|
21
21
|
ActiveRecord::Base.logger = Logger.new(STDOUT) unless defined?(Rake)
|
22
22
|
|
23
23
|
app.helpers ActiveRecordHelper
|
@@ -14,7 +14,7 @@ namespace :db do
|
|
14
14
|
version = ENV["VERSION"] || Time.now.utc.strftime("%Y%m%d%H%M%S")
|
15
15
|
|
16
16
|
ActiveRecord::Migrator.migrations_paths.each do |directory|
|
17
|
-
next unless File.
|
17
|
+
next unless File.exist?(directory)
|
18
18
|
migration_files = Pathname(directory).children
|
19
19
|
if duplicate = migration_files.find { |path| path.basename.to_s.include?(name) }
|
20
20
|
puts "Another migration is already named \"#{name}\": #{duplicate}."
|
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.3
|
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: 2014-
|
12
|
+
date: 2014-10-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|