zendesk_apps_tools 1.21.2 → 1.21.3

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: 3f8e6b79aced2f157e01d6a0d133fbee07f1f82a
4
- data.tar.gz: a003cfef2eb60656a75289b8086925ac9e6dbe98
3
+ metadata.gz: c55f8457e8611cc4111573447ba6a92a1212a62a
4
+ data.tar.gz: 43a7be9a4dab6fecced7ac375f17068b17d181f4
5
5
  SHA512:
6
- metadata.gz: 0bb36b96d341ed0a0e58cb0654f8842607d213a8d418bc53a3c10e24407b29939488a5772a888f4f57062869e189cb1614b79d2539aae2a07b6717691977849b
7
- data.tar.gz: 4d848d14c6c2f16e2c139d76eaa7a0751fc8269f80f998a617e3ecdcf88a2f1044307b3bc0ceb8460a6045c8ef3c4baed89b021543dfe7bd5a6b1ad1fe18eb89
6
+ metadata.gz: 3718ab94a6ff4593ec105804c05c5e4bf9712b67e0515190546983b06b75cd12495302c598b5856098f91ec1697c9bd9440a24f505b0d2b8e4f7cb8d999ef294
7
+ data.tar.gz: c2c77eabc04e0329e7578b7ffbf8b8450d55a7830d7c242a694798594c4987e2be33a66ae67bb45d60ca25b08368ecf14eb145f06e0e781dbc96b5aa42985081
@@ -110,6 +110,8 @@ module ZendeskAppsTools
110
110
  server.set :port, options[:port]
111
111
  server.set :root, options[:path]
112
112
  server.set :parameters, settings
113
+ server.set :manifest, manifest[:parameters]
114
+ server.set :config, options[:config]
113
115
  server.run!
114
116
  end
115
117
  end
@@ -4,9 +4,20 @@ require 'zendesk_apps_support/package'
4
4
  module ZendeskAppsTools
5
5
  class Server < Sinatra::Base
6
6
  set :public_folder, proc { "#{settings.root}/assets" }
7
+ last_mtime = Time.new(0)
7
8
 
8
9
  get '/app.js' do
9
10
  content_type 'text/javascript'
11
+
12
+ if File.exists? settings.config
13
+ curr_mtime = File.stat(settings.config).mtime
14
+ if curr_mtime > last_mtime
15
+ settings_helper = ZendeskAppsTools::Settings.new
16
+ settings.parameters = settings_helper.get_settings_from_file(settings.config, settings.manifest)
17
+ last_mtime = curr_mtime
18
+ end
19
+ end
20
+
10
21
  ZendeskAppsSupport::Package.new(settings.root).readified_js(nil, 0, "http://localhost:#{settings.port}/", settings.parameters)
11
22
  end
12
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zendesk_apps_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.21.2
4
+ version: 1.21.3
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-02-02 00:00:00.000000000 Z
14
+ date: 2015-02-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: thor