zendesk_apps_support 1.20.0 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21a2a6da05c4d89d23d1322dfd5f279c3191381b
4
- data.tar.gz: 3f48e22275d82ea5b2c4ecd444e4a362d81f4943
3
+ metadata.gz: 009359f73088ae44d54a08f53abd893b3a04ef91
4
+ data.tar.gz: 2e92ee8a0f9553c70176fcf9b456e0eb4043d982
5
5
  SHA512:
6
- metadata.gz: 7fd547a41b3f5210d912bab54c0564747552fd0d03b787e7482c97257534199fb34367166edfc6e58e7000be07f65bc18b54bcef47c0f8a36b8add12f4916041
7
- data.tar.gz: ac53d9ddc31416ed8f7381554c1efe5f50e10032c73c0ab7f91f6add6cf982232ac17802be5bac1175c48230e4a3cf7b670794ee2ac3ca3a3508ccb8fc891afe
6
+ metadata.gz: 8d68dd79073e10cb6924c7c857d63b839c19b75a2d5bc58b8f70c0afa3129ef366de1ee8cfebcd9fdc603165d76a82c41f92b3b5128e56f30ed339020b24e6d3
7
+ data.tar.gz: f010c99af6e8f772088e0488f73e2e80fcac0034882a8d0ac64a81765aa3d996dc4d3e7be19c4f3b13863af188613ebbe36db80885a3f457b02d294b3d28b71f
@@ -37,7 +37,7 @@ parts:
37
37
  value: "Could not find manifest.json"
38
38
  - translation:
39
39
  key: "txt.apps.admin.error.app_build.symlink_in_zip"
40
- title: "App builder job: symlinks not allowed"
40
+ title: "App builder job: symlinks not allowed. https://en.wikipedia.org/wiki/Symbolic_link"
41
41
  value: "Symlinks are not allowed in the zip file"
42
42
  - translation:
43
43
  key: "txt.apps.admin.error.app_build.missing_requirements"
@@ -77,11 +77,22 @@ module ZendeskAppsSupport
77
77
  end
78
78
 
79
79
  def files
80
- non_tmp_files
80
+ files = []
81
+ Dir[root.join('**/**')].each do |f|
82
+ next unless File.file?(f)
83
+ relative_file_name = f.sub(/#{root}\/?/, '')
84
+ next if relative_file_name =~ /^tmp\//
85
+ files << AppFile.new(self, relative_file_name)
86
+ end
87
+ files
88
+ end
89
+
90
+ def js_files
91
+ @js_files ||= files.select { |f| f =~ /\.js$/ }
81
92
  end
82
93
 
83
94
  def lib_files
84
- @lib_files ||= non_tmp_files.select { |f| f =~ /^lib\/.*\.js$/ }
95
+ @lib_files ||= js_files.select { |f| f =~ /^lib\// }
85
96
  end
86
97
 
87
98
  def template_files
@@ -89,7 +100,7 @@ module ZendeskAppsSupport
89
100
  end
90
101
 
91
102
  def translation_files
92
- non_tmp_files.select { |f| f =~ /^translations\// }
103
+ files.select { |f| f =~ /^translations\// }
93
104
  end
94
105
 
95
106
  def compile_js(options)
@@ -259,17 +270,6 @@ module ZendeskAppsSupport
259
270
  read_file('app.js')
260
271
  end
261
272
 
262
- def non_tmp_files
263
- files = []
264
- Dir[root.join('**/**')].each do |f|
265
- next unless File.file?(f)
266
- relative_file_name = f.sub(/#{root}\/?/, '')
267
- next if relative_file_name =~ /^tmp\//
268
- files << AppFile.new(self, relative_file_name)
269
- end
270
- files
271
- end
272
-
273
273
  def commonjs_modules
274
274
  return {} unless has_lib_js?
275
275
 
@@ -7,7 +7,7 @@ module ZendeskAppsSupport
7
7
  OAUTH_REQUIRED_FIELDS = %w( client_id client_secret authorize_uri access_token_uri ).freeze
8
8
  TYPES_AVAILABLE = %w( text password checkbox url number multiline hidden ).freeze
9
9
  LOCATIONS_AVAILABLE = {
10
- 'zendesk' => %w( top_bar nav_bar ticket_sidebar new_ticket_sidebar user_sidebar organization_sidebar ),
10
+ 'zendesk' => %w( top_bar nav_bar ticket_sidebar new_ticket_sidebar user_sidebar organization_sidebar background ),
11
11
  'zopim' => %w( chat_sidebar )
12
12
  }.freeze
13
13
 
@@ -16,13 +16,15 @@ module ZendeskAppsSupport
16
16
  # predefined globals:
17
17
  predef: %w(_ console services helpers alert confirm window document self
18
18
  JSON Base64 clearInterval clearTimeout setInterval setTimeout
19
- require module exports top frames parent moment)
19
+ require module exports top frames parent moment),
20
+
21
+ browser: true
20
22
  }.freeze
21
23
 
22
24
  class <<self
23
25
  def call(package)
24
- app = package.files.find { |file| file.relative_path == 'app.js' }
25
- files = package.lib_files << app
26
+ files = package.js_files
27
+ app = files.find { |file| file.relative_path == 'app.js' }
26
28
 
27
29
  if package.manifest_json['requirementsOnly']
28
30
  return app ? [ValidationError.new(:no_app_js_required)] : []
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.20.0
4
+ version: 1.21.0
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-11-27 00:00:00.000000000 Z
14
+ date: 2015-12-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: i18n
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
195
195
  version: 1.3.6
196
196
  requirements: []
197
197
  rubyforge_project:
198
- rubygems_version: 2.2.2
198
+ rubygems_version: 2.4.5.1
199
199
  signing_key:
200
200
  specification_version: 4
201
201
  summary: Support to help you develop Zendesk Apps.