dynamic-active-model 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dynamic-db-explorer +8 -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: c42ba085fec588cc54f0dfb2412f779a000f24844173500447b96715e5b4d824
|
4
|
+
data.tar.gz: 42650ca61f8c7a6748df8ebc77dfd0cc080ac7c53966e6f38c22720b41812d42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6feba211353f6825a46de00879d7d0fe10eebd69f3bbbd2d97380cdde303ea5b7c09cf39cfaf3757d08a6853ed9895c96a3f52bd58d69da330020a42b566ffd5
|
7
|
+
data.tar.gz: 5fa1bb1f1486b3619d8142b490a2e11226e30e3a795ae4df2bd6d65a649a460282ebfe6fd56f4532bd479457dc8c67225779b3cbd0522cb5d0974cb7211efb90
|
data/bin/dynamic-db-explorer
CHANGED
@@ -14,7 +14,8 @@ options = {
|
|
14
14
|
relationships: {},
|
15
15
|
config_file: nil,
|
16
16
|
config_section: nil,
|
17
|
-
class_files_dir: nil
|
17
|
+
class_files_dir: nil,
|
18
|
+
id_suffix: nil
|
18
19
|
}
|
19
20
|
|
20
21
|
# rubocop:disable Metrics/BlockLength
|
@@ -55,6 +56,10 @@ OptionParser.new do |opts|
|
|
55
56
|
options[:base_module] = Object.const_get(v)
|
56
57
|
end
|
57
58
|
|
59
|
+
opts.on('--id-suffix ID_SUFFIX', 'foreign key ID pattern') do |v|
|
60
|
+
options[:id_suffix] = v
|
61
|
+
end
|
62
|
+
|
58
63
|
opts.on('-c', '--config FILE', "config file, default #{DEFAULT_CONFIG_FILE}") do |v|
|
59
64
|
options[:config_file] = v
|
60
65
|
end
|
@@ -72,6 +77,8 @@ OptionParser.new do |opts|
|
|
72
77
|
end.parse!
|
73
78
|
# rubocop:enable Metrics/BlockLength
|
74
79
|
|
80
|
+
DynamicActiveModel::ForeignKey.id_suffix = options[:id_suffix] if options[:id_suffix]
|
81
|
+
|
75
82
|
if options[:config_file]
|
76
83
|
raise('must specify a section') unless options[:config_section]
|
77
84
|
|