biran 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/biran/config_defaults.rb +19 -7
- data/lib/biran/configurinator.rb +5 -8
- data/lib/biran/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5889906b3c4456f766a2c5204bb4441e3add107cba9db0b1189ba12adb9a55ef
|
4
|
+
data.tar.gz: 41799ef23de8827c738b3e9cb0f584782fbab60759e2f742f32327e686fc09f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e06d5684a5c05f46fab522863f68f352f27b4eb176e26feaf5dc7fc31a696498103cb92f861fed51454fc269d04049ae2fabc986043bd9e7d4277852c429885
|
7
|
+
data.tar.gz: 02ae8db4a54fb74ccdbb17d1464a56ab6ec5180f5c8c0fd1d34ea6cc5e06aa9a461374d574b84d0185c4c922f965ab5496bbe1ea3fd238ac7699da3c4aae1b8e
|
@@ -11,11 +11,11 @@ module Biran
|
|
11
11
|
shared_dir: configuration.shared_dir,
|
12
12
|
base_dir: configuration.base_dir,
|
13
13
|
use_capistrano: configuration.use_capistrano,
|
14
|
-
db_config: configuration.db_config,
|
15
|
-
secrets: configuration.secrets,
|
16
14
|
bindings: configuration.bindings,
|
17
15
|
vhost_public_dirname: configuration.vhost_public_dirname
|
18
|
-
}
|
16
|
+
},
|
17
|
+
db_config: configuration.db_config,
|
18
|
+
secrets: configuration.secrets,
|
19
19
|
}
|
20
20
|
end
|
21
21
|
|
@@ -47,7 +47,11 @@ module Biran
|
|
47
47
|
|
48
48
|
def local_config_file
|
49
49
|
ENV['BIRAN_LOCAL_CONFIG_FILE'] ||
|
50
|
-
File.join(app_shared_dir, configuration.config_dirname,
|
50
|
+
File.join(app_shared_dir, configuration.config_dirname, local_config_filename)
|
51
|
+
end
|
52
|
+
|
53
|
+
def local_config_filename
|
54
|
+
ENV['BIRAN_LOCAL_CONFIG_FILENAME'] || app_config_defaults[:app][:local_config_filename] || configuration.local_config_filename
|
51
55
|
end
|
52
56
|
|
53
57
|
def vhost_public_dirname
|
@@ -55,15 +59,23 @@ module Biran
|
|
55
59
|
end
|
56
60
|
|
57
61
|
def db_config_override_file
|
58
|
-
File.join(app_shared_dir, configuration.config_dirname,
|
62
|
+
File.join(app_shared_dir, configuration.config_dirname, db_config_filename)
|
63
|
+
end
|
64
|
+
|
65
|
+
def db_config_filename
|
66
|
+
app_config_defaults[:app][:db_config_filename] || configuration.db_config_filename
|
59
67
|
end
|
60
68
|
|
61
69
|
def secrets_file
|
62
|
-
File.join(configuration.base_path, configuration.config_dirname,
|
70
|
+
File.join(configuration.base_path, configuration.config_dirname, secrets_filename)
|
71
|
+
end
|
72
|
+
|
73
|
+
def secrets_filename
|
74
|
+
app_config_defaults[:app][:secrets_filename] || configuration.secrets_filename
|
63
75
|
end
|
64
76
|
|
65
77
|
def default_db_config_file
|
66
|
-
File.join(config_dir,
|
78
|
+
File.join(config_dir, db_config_filename)
|
67
79
|
end
|
68
80
|
|
69
81
|
def use_capistrano?
|
data/lib/biran/configurinator.rb
CHANGED
@@ -53,8 +53,8 @@ module Biran
|
|
53
53
|
}
|
54
54
|
|
55
55
|
app_config.deep_merge! app_config_defaults
|
56
|
-
app_config[:secrets].deep_merge!
|
57
|
-
app_config[:db_config]
|
56
|
+
app_config[:secrets].deep_merge! get_secrets_content(app_config[:secrets_file_path])
|
57
|
+
app_config[:db_config].deep_merge! build_db_config
|
58
58
|
|
59
59
|
app_config.deep_merge! local_config_file_contents
|
60
60
|
end
|
@@ -103,12 +103,9 @@ module Biran
|
|
103
103
|
@local_config_contents = process_config_file(local_config_file)
|
104
104
|
end
|
105
105
|
|
106
|
-
def
|
107
|
-
|
108
|
-
|
109
|
-
secrets_file_contents = process_config_file app_config[:secrets_file_path]
|
110
|
-
end
|
111
|
-
secrets_file_contents
|
106
|
+
def get_secrets_content(secrets_file)
|
107
|
+
return {} unless File.exists? secrets_file
|
108
|
+
process_config_file secrets_file
|
112
109
|
end
|
113
110
|
|
114
111
|
def sanitize_config_files files_list
|
data/lib/biran/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biran
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- javierg
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-04-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: railties
|