social_snippet-registry_core 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MzRlNWE5ZGRjNDFlZWQ1YWZmN2NmNzc0YzVjYjJjNGUwYTQxMDU1YQ==
4
+ YWUxNzRiNTg0MDFiYzA2YmIwODZkMGViMWFhMTEzNzI4NmI2MWY1Nw==
5
5
  data.tar.gz: !binary |-
6
- NTVjOGNlOTM2NmU5NjliODE5ZjlkNDMzYjJmMzVkZGJjNWMyZjc1ZA==
6
+ Y2I2MTVjYjgyZTBjYmI4ZmFjMTMyYmM3YWU3YjY5Nzk0ZGVhZmQzZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZWU2MDRmMjkxNjk4NzcxYTU2NDhjMzg2YzdlZmMxNWU4MzU3MjYwZTQ2NWZk
10
- MWQ1MjM5Y2YyNjExMWVhNTYyZTU4NDM2OTZiNWI4ODJlOTIyYmUxYjRhOGU2
11
- MGZhNTRlNmJiYWUxZDI1Y2I5YWYyNDhlOTcxNjgwOTJiNmQyYjI=
9
+ ZTIxNTFmM2Q1YWNiMmZmMThjZDVjYTNlYjEwYTZkMTVjZGM4YmU1ODM4Y2Y4
10
+ NDY1M2IzYjQyMmFmMTI1OGRiZDM5ZGRkMDk4MzhlNDBhOWY4NGYwZTA0ZDJm
11
+ Mjk2MmI3MWFkNjRiNGI4MjlkZTU1OWNjMzk2ZjdmZDRmNWJkZDM=
12
12
  data.tar.gz: !binary |-
13
- ODQzYTFiODcyYWNiMmZlZDliMDU5ZmZiMjc4ODYyYzM4MzA1Njc2NTJiMjFm
14
- M2E2MmRlZTRmMzQ0OWEzMWRkNzUwODZjNGJhYTkyM2ZiNzQ3MWVjMTUyZjUw
15
- MjA4YzkyYWIyNzRmNDJjYTBjOWM3ODZhYzYzNWZkOWY1NTliOTg=
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
- errors[:dependencies] << "invalid dependencies" if has_invalid_dependencies?
49
- errors[:dependencies] << "The size of dependencies must be less than 64" if dependencies.length > 64
50
- errors[:languages] << "The size of languages must be less than 64" if languages.length > 64
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?
@@ -1,5 +1,5 @@
1
1
  module SocialSnippet
2
2
  module RegistryCore
3
- VERSION = "0.0.12"
3
+ VERSION = "0.0.13"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_snippet-registry_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyuki Sano