social_snippet-registry_core 0.0.12 → 0.0.13
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWUxNzRiNTg0MDFiYzA2YmIwODZkMGViMWFhMTEzNzI4NmI2MWY1Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2I2MTVjYjgyZTBjYmI4ZmFjMTMyYmM3YWU3YjY5Nzk0ZGVhZmQzZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTIxNTFmM2Q1YWNiMmZmMThjZDVjYTNlYjEwYTZkMTVjZGM4YmU1ODM4Y2Y4
|
10
|
+
NDY1M2IzYjQyMmFmMTI1OGRiZDM5ZGRkMDk4MzhlNDBhOWY4NGYwZTA0ZDJm
|
11
|
+
Mjk2MmI3MWFkNjRiNGI4MjlkZTU1OWNjMzk2ZjdmZDRmNWJkZDM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjlmOTQ3NmQ0NmJlNWUyYmJiN2RkMjc3MDJlMmZiOGUxZGQ0ZTA5YTExZWM1
|
14
|
+
MTI5ZjM4ODgxYmQ0OTUyZjU1ODUxYmM5MWIyOTE4YWMxYTQzMjQ0YzY1ZGFh
|
15
|
+
MTU2ZmQ0NzI3Y2E0ZjNmZDJlZmE2NmQ5Yzc5Mzg4ODU1YzcwZjc=
|
@@ -45,9 +45,13 @@ class SocialSnippet::Registry::WebAPI::Repository
|
|
45
45
|
validate do
|
46
46
|
errors[:name] << "Invalid name" unless self.class.is_valid_repo_name?(name)
|
47
47
|
errors[:url] << "Invalid URL" unless self.class.is_valid_url?(url)
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
if dependencies.is_a?(Array)
|
49
|
+
errors[:dependencies] << "invalid dependencies" if has_invalid_dependencies?
|
50
|
+
errors[:dependencies] << "The size of dependencies must be less than 64" if dependencies.length > 64
|
51
|
+
end
|
52
|
+
if languages.is_a?(Array)
|
53
|
+
errors[:languages] << "The size of languages must be less than 64" if languages.length > 64
|
54
|
+
end
|
51
55
|
end
|
52
56
|
|
53
57
|
def has_invalid_dependencies?
|