slonik_migration 1.1.0 → 1.1.1

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: 0a9bac5e2a100f82b528a7e361791da8861df69c
4
- data.tar.gz: 4f0d8060ee2efc0e090468e47269dbc1fd83667a
3
+ metadata.gz: e7f59b19e63ab08d448c89360b96bf1e8df8f972
4
+ data.tar.gz: 7814afd531e95d7dc175d904e6a84274a3555005
5
5
  SHA512:
6
- metadata.gz: 96882aac71029ddd3c17ef983b3701955d0bb6eee73ed333d127b4e1c51a29ddfbcea5638855daa71536a4b07aad32b7b641ff52de2ae485bc9388ba41488412
7
- data.tar.gz: 71141e836529b0059b2434619ecd1aa4efb9778f4e46f7c0ec055006b15f391bdde0fa6a067b5b214ffc34dabb3f523ef01fc303aff85061c35b9db6c874bae9
6
+ metadata.gz: c6846939a8d285ec47c7986bc89d0e046efdb99972d19e95b03457e910ee9e617545a8d893528dfd7e89cb3db17330b26f65586d881af300d6425cce5b9fd2c5
7
+ data.tar.gz: 75e95134b2bcb54b6b9e7dfc9e2dc70b2a7ad10e34bf1a4028174a540be5621c872fa19391c58fb663ab0de022f7c1e8dce2398c42526a92fb896cff1c3512b7
@@ -6,7 +6,13 @@ module SlonikMigration
6
6
  def load
7
7
  file = config_file
8
8
  env = ENV['RAILS_ENV'] || 'development'
9
- OpenStruct.new(YAML.load(ERB.new(IO.read(file)).result)[env]).freeze
9
+
10
+ hash = if File.exist?(file)
11
+ YAML.load(ERB.new(IO.read(file)).result)[env]
12
+ else
13
+ {}
14
+ end
15
+ OpenStruct.new(hash).freeze
10
16
  end
11
17
 
12
18
  private
@@ -1,3 +1,3 @@
1
1
  module SlonikMigration
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slonik_migration
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-09 00:00:00.000000000 Z
11
+ date: 2018-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord