revocare 0.2.0 → 0.2.1

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: 9cd27b1f9b7fde54066e3c955b49303a8a97f14edba9f8f5996657d3c041bb01
4
- data.tar.gz: e22cda783a276cfff9edad8b20e82f4eb8d482b9f187ddf7187b212d43054a53
3
+ metadata.gz: e43ceb2584f78094a31fb9289b40ccd9bbf8650ddb9905bb9cf37004ccc1c9fc
4
+ data.tar.gz: 6d65f5b9409553aa60dd0193a641252af0e2581463ce84cade6bbc697f9e59e6
5
5
  SHA512:
6
- metadata.gz: 9a1f089200fa2e7b8cd79084173bc2b130b2b51edd0e88a11aba87446455ea03038113d6d508e75a2918e6cf01a7eae03b7ac1a4ad77758d6b33b1acf974013c
7
- data.tar.gz: 85b44534562826126299802dac6b44573ec6621c63f1fe88c8cfa1872d171f7ab820e1d6c58b867b69976a8e264eab266f60077ebd301d4c796f17a28e8efca8
6
+ metadata.gz: 25281b5ad2fed87409376d50df06f9d1c79bca374ca25fac74610dcecfeebab29287fd83e08034033cacd94922cd62c99bc1deb32f85da7b81133da03f356718
7
+ data.tar.gz: e2e30482a99d39910ea928c4f47b1af946048424bccead1fc5a4856b7a376828325561ba9489f9f056ddd028e43a97805ca3e714d4bd9078422654842f7d854b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # `revocare`
2
2
 
3
+ ## [0.2.1] (Unreleased)
4
+ - Properly handle custom validators
5
+ - Show validator class name instead of underscore-d name
6
+
3
7
  ## [0.2.0]
4
8
  - Create a directory to hold all files. Also, create a file for each model rather than a single file for all models. This vastly improves readability.
5
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- revocare (0.2.0)
4
+ revocare (0.2.1)
5
5
  activerecord (>= 5.2, < 7.1)
6
6
  activesupport (>= 5.2, < 7.1)
7
7
  ruby-graphviz (~> 1.2)
@@ -65,9 +65,14 @@ module Revocare
65
65
 
66
66
  def extract_methods(callback_filter)
67
67
  if callback_filter.is_a?(ActiveModel::Validator)
68
- name = callback_filter.class.name.demodulize.underscore
69
- callback_filter.attributes.map do |attr|
70
- [name, attr].join(":")
68
+ name = callback_filter.class.name.demodulize
69
+
70
+ if callback_filter.respond_to?(:attributes)
71
+ callback_filter.attributes.map do |attribute|
72
+ [name, attribute].join(":")
73
+ end
74
+ else
75
+ [name]
71
76
  end
72
77
  else
73
78
  [callback_filter.to_s]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Revocare
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revocare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Ewing