validation_profiler 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: cc1402be1d084455b493173d1ef7c46c1e41a15e
4
- data.tar.gz: e6fa95cbf2ff55f75708e184811fa4b8dc399f53
3
+ metadata.gz: baeca9907ceff378745b670ce9c27f2ec426fc75
4
+ data.tar.gz: f8f7eccde03ed9e1150bd09580171c66bffcf1d3
5
5
  SHA512:
6
- metadata.gz: 8f7b57a394eac4212a9f258ee6e6f4d7c6756d31f4a207d97c4961ef362d8babcfae28265d1b48b893142082e4bed15b0c9f43f5b36cb5b4dc489046b5ac91b9
7
- data.tar.gz: ea770e0ef033ac41aa13977cab161fd172b7cfc252d4ebeb6e12d17b9ad3c5fa5ca34de3ffd56820f3704cacce390e6c943d506d18b688402d74731586e569f4
6
+ metadata.gz: 412d6af8cfea9c35be540af66c79b4caf916db726b95eb59a3ebc231e15e222dfa348b90a62d71a8c185e7c6eb67d2e6fec7a399b15358b85fa30c673b29a7c0
7
+ data.tar.gz: 84bfc375d6152154baddde7f97b66c2e0a9ecad5149df7214fbfc27d5cc1cfd306321c1f6914508d2584f65e01c8d40f4260c4ef7e5403ac8bb06587c8484aec
@@ -1,6 +1,7 @@
1
1
  require 'validation_profiler/version'
2
2
  require 'validation_profiler/rules/rules'
3
3
  require 'validation_profiler/rules/validation_rule_manager'
4
+
4
5
  class Class
5
6
 
6
7
  # Specifies a validation rule to use within a validation profile.
@@ -10,7 +11,7 @@ class Class
10
11
  # @param attributes [Hash] [Optional] A has containing the validation rule options
11
12
  def validates(field, rule, attributes = {})
12
13
 
13
- if !defined?(self.validation_rules)
14
+ if !self.class_variable_defined?(:@@validation_rules)
14
15
  self.class_variable_set(:@@validation_rules, [])
15
16
  end
16
17
 
@@ -21,6 +22,10 @@ class Class
21
22
 
22
23
  end
23
24
 
25
+ def self.sides
26
+ @@sides
27
+ end
28
+
24
29
  end
25
30
 
26
31
  class ValidationManager
@@ -36,6 +41,7 @@ class ValidationManager
36
41
  result = ValidationManagerResult.new
37
42
 
38
43
  validation_rules = profile.class_variable_get(:@@validation_rules)
44
+
39
45
  validation_rules.each do |r|
40
46
 
41
47
  if ValidationRuleManager.instance == nil
@@ -1,3 +1,3 @@
1
1
  module ValidationProfiler
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validation_profiler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: A Validation framework for creating validation profiles, allowing for
56
70
  the separation & reuse of validation logic from the object being validated.
57
71
  email: