serverkit 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +2 -0
- data/lib/serverkit/errors/missing_action_name_argument_error.rb +1 -1
- data/lib/serverkit/errors/missing_recipe_path_argument_error.rb +1 -1
- data/lib/serverkit/resource_builder.rb +3 -1
- data/lib/serverkit/version.rb +1 -1
- data/lib/type_validator.rb +3 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5b26c6d22c758ec66cc5435e50d8289c591da71
|
4
|
+
data.tar.gz: 3324355b6866cbff2a99117b0643449617f54eb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a7e75d9406ddfc9266015b7cf210bf25069bc5142747f06e99bb51ee72c3df1342ed644d099114fd9354c05e82a6ea3bc396a33d4d7d1c3deb11ab78a248052
|
7
|
+
data.tar.gz: 50816a5d8ad6bccadf3e1359edc4a3d4c0280cbcb72231be70bd6aa2dc6873c6d30692b134da1f146f8a97ad2ad35b72ac38ed58317b42b847722362440f19f9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -169,6 +169,8 @@ A resource must have a type property. Currently the following types are availabl
|
|
169
169
|
- recipe
|
170
170
|
- service
|
171
171
|
- symlink
|
172
|
+
- [defaults](https://github.com/r7kamura/serverkit-defaults)
|
173
|
+
- [rbenv_ruby](https://github.com/r7kamura/serverkit-rbenv)
|
172
174
|
|
173
175
|
### Example
|
174
176
|
An example package resource that has id, type, and name attributes.
|
data/lib/serverkit/version.rb
CHANGED
data/lib/type_validator.rb
CHANGED
@@ -6,8 +6,9 @@ class TypeValidator < ActiveModel::EachValidator
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def validate_each(record, attribute, value)
|
9
|
-
|
10
|
-
|
9
|
+
classes = options[:in] || [options[:with]]
|
10
|
+
if classes.all? { |klass| !value.is_a?(klass) }
|
11
|
+
record.errors.add(attribute, "must be a #{classes.join(' or ')}, not a #{value.class}")
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverkit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -251,4 +251,3 @@ signing_key:
|
|
251
251
|
specification_version: 4
|
252
252
|
summary: Configuration management toolkit for IT automation.
|
253
253
|
test_files: []
|
254
|
-
has_rdoc:
|