arql 0.1.29 → 0.1.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/arql/app.rb +14 -4
- data/lib/arql/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8fb2d02931fdd0af7a9eec6b20db222f6f2fff93e0c506186316157987a443f
|
4
|
+
data.tar.gz: ae61f43b49612c316a82aac8e0c63dfc70c34527026c62201397f267ace5c188
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8deb0c597de52fe5d1dd24f7eaa60c07133d7c0d583eb93f746b416d660a5911f556820b1937cb5f0d2d9667de3a53a1b8057e7bc6ad36321eb96b0e93f454e2
|
7
|
+
data.tar.gz: 77ba16537c3fa67c65518db3e5fbca9fa012452c2135a0d26ffabbb47ec9c65f6a3de1c052a98553b65640d9c534467a77ef5993013cb9f3d265c830db70e613
|
data/Gemfile.lock
CHANGED
data/lib/arql/app.rb
CHANGED
@@ -64,13 +64,23 @@ module Arql
|
|
64
64
|
if @options.env.present? && !config[@options.env].present?
|
65
65
|
STDERR.puts "Specified ENV `#{@options.env}' not exists"
|
66
66
|
end
|
67
|
-
|
68
|
-
|
69
|
-
|
67
|
+
if env = @options.env
|
68
|
+
config[env]
|
69
|
+
else
|
70
|
+
{}
|
71
|
+
end
|
70
72
|
end
|
71
73
|
|
72
74
|
def effective_config
|
73
|
-
@@effective_config ||=
|
75
|
+
@@effective_config ||= nil
|
76
|
+
unless @@effective_config
|
77
|
+
@@effective_config = selected_config.deep_merge(@options.to_h)
|
78
|
+
if @@effective_config[:adapter].blank?
|
79
|
+
@@effective_config[:adapter] = 'sqlite3'
|
80
|
+
end
|
81
|
+
@@effective_config[:database] = File.expand_path(@@effective_config[:database]) if @@effective_config[:adapter] == 'sqlite3'
|
82
|
+
end
|
83
|
+
@@effective_config
|
74
84
|
end
|
75
85
|
|
76
86
|
def run!
|
data/lib/arql/version.rb
CHANGED