revocare 0.2.0 → 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/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/lib/revocare/callback_data.rb +8 -3
- data/lib/revocare/data_writer.rb +6 -2
- data/lib/revocare/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: 9637b980eeb643afddb2be646bbb1fbb1c8fb578230bd7bff5c059d55c7e5e35
|
4
|
+
data.tar.gz: 1a167f2baf8e5a4088f03f0e678d5c80673a71665c408772376836d68f3c5576
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b52b19f77bc34c45d2fe31c84b8136f4a38838b43f35c9a542ec372b0bffc4597f9b21b2c336af84626b8b58f1afd370b6ea539a271432a7eab0fbfe9affa98f
|
7
|
+
data.tar.gz: a0ff65143b452f9afdf3b0b31edde55160bca276438e2f31f40c4c533d5acf882cb48e7bbbf70361ec192d1f85c65aa8bd3120cb2b0d0690a47fc6675a0d8c61
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# `revocare`
|
2
2
|
|
3
|
+
## [0.2.2]
|
4
|
+
- Use "left-to-right" direction for diagrams for better readability
|
5
|
+
- Only add "#" to method names and not validator class names
|
6
|
+
|
7
|
+
## [0.2.1]
|
8
|
+
- Properly handle custom validators
|
9
|
+
- Show validator class name instead of underscore-d name
|
10
|
+
|
3
11
|
## [0.2.0]
|
4
12
|
- 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
13
|
|
data/Gemfile.lock
CHANGED
@@ -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
|
69
|
-
|
70
|
-
|
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]
|
data/lib/revocare/data_writer.rb
CHANGED
@@ -34,7 +34,7 @@ module Revocare
|
|
34
34
|
|
35
35
|
if format == GRAPHVIZ_FORMAT
|
36
36
|
data.each_with_index do |model_data, index|
|
37
|
-
@current_graph = GraphViz.new(:G, type: :digraph)
|
37
|
+
@current_graph = GraphViz.new(:G, type: :digraph, rankdir: "LR")
|
38
38
|
|
39
39
|
model_name = model_data[:model]
|
40
40
|
model_node = add_model_node(model_name)
|
@@ -76,7 +76,11 @@ module Revocare
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def add_callback_chain_node(name, index, order)
|
79
|
-
label =
|
79
|
+
label = if name[0].match(/[[:upper:]]/)
|
80
|
+
"#{order + 1}) #{name}"
|
81
|
+
else
|
82
|
+
"#{order + 1}) ##{name}"
|
83
|
+
end
|
80
84
|
add_node(name, index, :ellipse, label)
|
81
85
|
end
|
82
86
|
|
data/lib/revocare/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: revocare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler Ewing
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|