zendesk_apps_support 1.17.1 → 1.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zendesk_apps_support/app_version.rb +2 -2
- data/lib/zendesk_apps_support/validations/manifest.rb +3 -3
- data/lib/zendesk_apps_support/validations/requirements.rb +3 -3
- data/lib/zendesk_apps_support/validations/translations.rb +3 -2
- data/lib/zendesk_apps_support/validations/validation_error.rb +4 -4
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a4456bc6e8b042ab159e7cdc95c70343796525d
|
4
|
+
data.tar.gz: 1277915e7d74645722c62932010cee346b3ea580
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6d3dc0bd36bdefde2f8896189a544281bfa81d791f79f43104024486adbe6593426e00f08d0d3cdc811188a972e0ba80d44282d7c772b0c6fc37b6216c7c95b
|
7
|
+
data.tar.gz: 9998cd1f7bdbc622567685375453090868296c3fabacfaa119f20c27628f5de5b456f52d8c6c5aafe69a109b6439ae6724e0c27c0e48501aa9ebc0e26101d724
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'json'
|
2
2
|
|
3
3
|
module ZendeskAppsSupport
|
4
4
|
# At any point in time, we support up to three versions:
|
@@ -52,7 +52,7 @@ module ZendeskAppsSupport
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def to_json(*)
|
55
|
-
|
55
|
+
@version.inspect
|
56
56
|
end
|
57
57
|
|
58
58
|
def ==(other)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'json'
|
2
2
|
|
3
3
|
module ZendeskAppsSupport
|
4
4
|
module Validations
|
@@ -14,7 +14,7 @@ module ZendeskAppsSupport
|
|
14
14
|
|
15
15
|
return [ValidationError.new(:missing_manifest)] unless manifest
|
16
16
|
|
17
|
-
manifest =
|
17
|
+
manifest = JSON.load(manifest.read)
|
18
18
|
|
19
19
|
[].tap do |errors|
|
20
20
|
errors << missing_keys_error(manifest)
|
@@ -40,7 +40,7 @@ module ZendeskAppsSupport
|
|
40
40
|
|
41
41
|
errors.compact!
|
42
42
|
end
|
43
|
-
rescue
|
43
|
+
rescue JSON::ParserError => e
|
44
44
|
return [ValidationError.new(:manifest_not_json, errors: e)]
|
45
45
|
end
|
46
46
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'json'
|
2
2
|
require 'json/stream'
|
3
3
|
|
4
4
|
module ZendeskAppsSupport
|
@@ -18,7 +18,7 @@ module ZendeskAppsSupport
|
|
18
18
|
return [ValidationError.new(:duplicate_requirements, duplicate_keys: duplicates.join(', '), count: duplicates.length)]
|
19
19
|
end
|
20
20
|
|
21
|
-
requirements =
|
21
|
+
requirements = JSON.load(requirements_stream)
|
22
22
|
[].tap do |errors|
|
23
23
|
errors << invalid_requirements_types(requirements)
|
24
24
|
errors << excessive_requirements(requirements)
|
@@ -26,7 +26,7 @@ module ZendeskAppsSupport
|
|
26
26
|
errors.flatten!
|
27
27
|
errors.compact!
|
28
28
|
end
|
29
|
-
rescue
|
29
|
+
rescue JSON::ParserError => e
|
30
30
|
return [ValidationError.new(:requirements_not_json, errors: e)]
|
31
31
|
end
|
32
32
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'jshintrb'
|
2
|
+
require 'json'
|
2
3
|
|
3
4
|
module ZendeskAppsSupport
|
4
5
|
module Validations
|
@@ -27,7 +28,7 @@ module ZendeskAppsSupport
|
|
27
28
|
end
|
28
29
|
|
29
30
|
def json_error(file)
|
30
|
-
json =
|
31
|
+
json = JSON.load(file.read)
|
31
32
|
if json.is_a?(Hash)
|
32
33
|
if json['app'] && json['app']['package']
|
33
34
|
json['app'].delete('package')
|
@@ -41,7 +42,7 @@ module ZendeskAppsSupport
|
|
41
42
|
else
|
42
43
|
ValidationError.new('translation.not_json_object', file: file.relative_path)
|
43
44
|
end
|
44
|
-
rescue
|
45
|
+
rescue JSON::ParserError => e
|
45
46
|
ValidationError.new('translation.not_json', file: file.relative_path, errors: e)
|
46
47
|
end
|
47
48
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'json'
|
2
2
|
|
3
3
|
module ZendeskAppsSupport
|
4
4
|
module Validations
|
@@ -14,10 +14,10 @@ module ZendeskAppsSupport
|
|
14
14
|
class << self
|
15
15
|
# Turn a JSON string into a ValidationError.
|
16
16
|
def from_json(json)
|
17
|
-
hash =
|
17
|
+
hash = JSON.load(json)
|
18
18
|
fail DeserializationError.new(json) unless hash.is_a?(Hash)
|
19
19
|
from_hash(hash)
|
20
|
-
rescue
|
20
|
+
rescue JSON::ParserError, NameError
|
21
21
|
raise DeserializationError.new(json)
|
22
22
|
end
|
23
23
|
|
@@ -51,7 +51,7 @@ module ZendeskAppsSupport
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def to_json(*)
|
54
|
-
|
54
|
+
JSON.generate(as_json)
|
55
55
|
end
|
56
56
|
|
57
57
|
def as_json(*)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zendesk_apps_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.17.
|
4
|
+
version: 1.17.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James A. Rosen
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-
|
14
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: i18n
|
@@ -27,20 +27,6 @@ dependencies:
|
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: multi_json
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
requirements:
|
34
|
-
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '0'
|
37
|
-
type: :runtime
|
38
|
-
prerelease: false
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '0'
|
44
30
|
- !ruby/object:Gem::Dependency
|
45
31
|
name: sass
|
46
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
191
|
version: 1.3.6
|
206
192
|
requirements: []
|
207
193
|
rubyforge_project:
|
208
|
-
rubygems_version: 2.
|
194
|
+
rubygems_version: 2.4.6
|
209
195
|
signing_key:
|
210
196
|
specification_version: 4
|
211
197
|
summary: Support to help you develop Zendesk Apps.
|