wraithdb 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,12 @@ module WraithDB
34
34
  def load
35
35
  return if @loaded
36
36
  @loaded = true
37
- file = ENV['SCHEMA'] || "#{Rails.root}/db/schema.rb"
37
+ schema_locations = [
38
+ ENV["SCHEMA"],
39
+ "#{Rails.root}/db/#{Rails.env}_schema.rb",
40
+ "#{Rails.root}/db/schema.rb"
41
+ ]
42
+ file = schema_locations.find { |f| f.present? && File.exist?(f) }
38
43
  source = File.read(file)
39
44
  if (source =~ SCHEMA_REGEX && source =~ END_REGEX)
40
45
  source.sub!(SCHEMA_REGEX, "")
@@ -1,3 +1,3 @@
1
1
  module Wraithdb
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wraithdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-11 00:00:00.000000000 Z
12
+ date: 2013-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord