dynamic-active-model 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/dynamic-db-explorer +8 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7571255175f1555d4f3980437f6b83616103cb0f05fc5b97ec0b158d61c0053c
4
- data.tar.gz: 0e488c069a054e738d3371278faf1503cdca374e3c0cc9f08bafadce39d5fb38
3
+ metadata.gz: c42ba085fec588cc54f0dfb2412f779a000f24844173500447b96715e5b4d824
4
+ data.tar.gz: 42650ca61f8c7a6748df8ebc77dfd0cc080ac7c53966e6f38c22720b41812d42
5
5
  SHA512:
6
- metadata.gz: 5ce391d25b3b91ce0a1e1bb9e462323c4a73db1efef2fc2ad969076e58b2015b46aa89336afb7bc815e04a40e9adde194e30105f8bb2a41657907329f967a377
7
- data.tar.gz: a9b64ca5089117f41ce26770e5ffa788cfbb6d4b37aeaf01eb201e0d2ba942565bfcb62f9c90cfe481e44dde6aac78f5e88f19024e847b44b6055a18a2c4445f
6
+ metadata.gz: 6feba211353f6825a46de00879d7d0fe10eebd69f3bbbd2d97380cdde303ea5b7c09cf39cfaf3757d08a6853ed9895c96a3f52bd58d69da330020a42b566ffd5
7
+ data.tar.gz: 5fa1bb1f1486b3619d8142b490a2e11226e30e3a795ae4df2bd6d65a649a460282ebfe6fd56f4532bd479457dc8c67225779b3cbd0522cb5d0974cb7211efb90
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic-active-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch