config_templates 0.0.5 → 0.0.6
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 +4 -4
- data/lib/config_templates/errors.rb +0 -1
- data/lib/config_templates/models/renderer.rb +3 -1
- data/lib/config_templates/models/template.rb +2 -0
- data/lib/config_templates/repositories/validators.rb +1 -2
- data/lib/config_templates/validators/composite.rb +5 -3
- data/lib/config_templates/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08ccd70861b7d8fd9590fd9d544e3f7daefdb1b0'
|
4
|
+
data.tar.gz: 3b7cca27e154893572af8a4229563906b2db97d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28057f8fc95de5ae959ad65e781ed2f95796b0c5aeddc040b10d10287375bd518da235b4698a6330329e3dae8f662e95f5d78a057d65601dbed8841dc647de1e
|
7
|
+
data.tar.gz: 29ad9918306ff5043244c509b7185efa8cea73cdec468eb595213be0a562e377ec4e8da94fb64339eaefc8fdb46191e63207f60f36ac3935ac8ace349d45852f
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module ConfigTemplates::Repositories
|
2
2
|
class Validators
|
3
3
|
def initialize
|
4
|
-
@default = ::ConfigTemplates::Validators::Composite.new
|
5
4
|
@validators = {}
|
6
5
|
end
|
7
6
|
|
@@ -11,7 +10,7 @@ module ConfigTemplates::Repositories
|
|
11
10
|
|
12
11
|
def find_by_file_name(file_name)
|
13
12
|
::ConfigTemplates::Validators::Composite.new(
|
14
|
-
|
13
|
+
find_all_by ::ConfigTemplates::Criteria::Name.new file_name
|
15
14
|
)
|
16
15
|
end
|
17
16
|
|
@@ -1,11 +1,13 @@
|
|
1
1
|
module ConfigTemplates::Validators
|
2
2
|
class Composite
|
3
|
-
def initialize(
|
3
|
+
def initialize(validators)
|
4
4
|
@validators = validators
|
5
5
|
end
|
6
6
|
|
7
|
-
def
|
8
|
-
@validators.
|
7
|
+
def valid?(view)
|
8
|
+
@validators.inject(true) do |result, validator|
|
9
|
+
result && validator.valid?(view)
|
10
|
+
end
|
9
11
|
end
|
10
12
|
end
|
11
13
|
end
|