plutonium 0.15.17 → 0.15.18

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c5b52e10ff664f2ecc1e4b86ec73a1001d115d269385edc93791dfc362418ba9
4
- data.tar.gz: 35df7064e49d6c219cfd92ea24a995363ec73864101b7fdeb970014113b6aca2
3
+ metadata.gz: 101dea0b2a6fa8d1cc3fcf5d16f5ab1d932efd7ab90fa9d23561c78bfa3af777
4
+ data.tar.gz: dc712fdd97f6783eec587fb8ad5066326be59c93f603027e11410e7f9d66ed7a
5
5
  SHA512:
6
- metadata.gz: 72770427e5337b78f2d9f7e1e56eed617b2341d8952f0a51de0041ab63e63a795958a0f35a2170d90a3745dc855a41c7fa0cb5c3b82ea32cb72764685a464ed0
7
- data.tar.gz: 1d25b16a2cf39ce759eeb22a93c185e07e8898197ca182e382eb9fa649f40086f8f09557c16c6921aa6fab240b7b7eb82e0f8c510c41d969ffacafe593e496f2
6
+ metadata.gz: a0e86bf5065b802c8808ac2704a134cf8cdbc6730602fc29864d34e163599e71c981c8f3a0730d3de9270ba37b9698c5ff58acfba8558318a760c3bfde1804fa
7
+ data.tar.gz: ad31b7f1e0ca7dd07c249bfceed34ff136bd7dda5b8815786a443882da9fd8dd8429355e175afce71a488de7639324c866a794196a24bf57c6085c6dc112c139
@@ -18,7 +18,10 @@ module Pu
18
18
  source_module = (source_feature == "main_app") ? "ApplicationRecord" : "#{source_feature.camelize}::ResourceRecord"
19
19
 
20
20
  Plutonium.eager_load_rails!
21
- available_resources = source_module.constantize.descendants.map(&:to_s).sort
21
+ available_resources = source_module.constantize.descendants.reject do |model|
22
+ next true if model.abstract_class?
23
+ next true if source_module == "ApplicationRecord" && model.ancestors.any? { |ancestor| ancestor.to_s.end_with?("::ResourceRecord") }
24
+ end.map(&:to_s).sort
22
25
  error "No resources found" if available_resources.blank?
23
26
  selected_resources = prompt.multi_select("Select resources", available_resources)
24
27
 
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.15.17"
2
+ VERSION = "0.15.18"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.17
4
+ version: 0.15.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich