zendesk_apps_support 1.3.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,6 +46,6 @@ en:
46
46
  other: ! '%{invalid_types} are invalid parameter types.'
47
47
  warning:
48
48
  app_build:
49
- deprecated_version: You are targeting a deprecated version of the framework,
50
- your App will still work but might break as soon as the new framework
51
- version is deployed.
49
+ deprecated_version: You are targeting a deprecated version of the framework.
50
+ Your app will work, but it might break when the new framework version
51
+ is deployed.
@@ -74,7 +74,7 @@ parts:
74
74
  - translation:
75
75
  key: "txt.apps.admin.warning.app_build.deprecated_version"
76
76
  title: "App builder job: deprecated version specified"
77
- value: 'You are targeting a deprecated version of the framework, your App will still work but might break as soon as the new framework version is deployed.'
77
+ value: 'You are targeting a deprecated version of the framework. Your app will work, but it might break when the new framework version is deployed.'
78
78
  - translation:
79
79
  key: "txt.apps.admin.error.app_build.invalid_version"
80
80
  title: "App builder job: invalid framework version"
@@ -0,0 +1,10 @@
1
+ <header>
2
+ <span class="logo"/>
3
+ <h3>{{setting "name"}}</h3>
4
+ </header>
5
+ <section data-main />
6
+ <footer>
7
+ <a href="mailto:{{author.email}}">
8
+ {{author.name}}
9
+ </a>
10
+ </footer>
@@ -5,8 +5,9 @@ require 'json'
5
5
  module ZendeskAppsSupport
6
6
  class Package
7
7
 
8
- DEFAULT_SCSS = File.read(File.expand_path('../default_styles.scss', __FILE__))
9
- SRC_TEMPLATE = Erubis::Eruby.new( File.read(File.expand_path('../src.js.erb', __FILE__)) )
8
+ DEFAULT_LAYOUT = Erubis::Eruby.new( File.read(File.expand_path('../assets/default_template.html.erb', __FILE__)) )
9
+ DEFAULT_SCSS = File.read(File.expand_path('../assets/default_styles.scss', __FILE__))
10
+ SRC_TEMPLATE = Erubis::Eruby.new( File.read(File.expand_path('../assets/src.js.erb', __FILE__)) )
10
11
 
11
12
  attr_reader :root, :warnings
12
13
 
@@ -48,7 +49,7 @@ module ZendeskAppsSupport
48
49
  author = manifest[:author]
49
50
  translations = JSON.parse(File.read(File.join(root, "translations/en.json")))
50
51
  framework_version = manifest[:frameworkVersion]
51
- templates = compiled_templates(app_id, asset_url_prefix)
52
+ templates = manifest[:noTemplate] ? {} : compiled_templates(app_id, asset_url_prefix)
52
53
 
53
54
  settings["title"] = name
54
55
 
@@ -86,8 +87,10 @@ module ZendeskAppsSupport
86
87
  end
87
88
  end
88
89
 
90
+ layout = templates['layout'] || DEFAULT_LAYOUT.result
91
+
89
92
  templates.tap do |templates|
90
- templates['layout'] = "<style>\n#{compiled_css}</style>\n#{templates['layout']}"
93
+ templates['layout'] = "<style>\n#{compiled_css}</style>\n#{layout}"
91
94
  end
92
95
  end
93
96
 
data/spec/package_spec.rb CHANGED
@@ -8,7 +8,7 @@ describe ZendeskAppsSupport::Package do
8
8
 
9
9
  describe 'files' do
10
10
  it 'should return all the files within the app folder excluding files in tmp folder' do
11
- @package.files.map(&:relative_path).should == %w(app.css app.js assets/logo-small.png assets/logo.png manifest.json templates/layout.hdbs translations/en.json)
11
+ @package.files.map(&:relative_path).should =~ %w(app.css app.js assets/logo-small.png assets/logo.png manifest.json templates/layout.hdbs translations/en.json)
12
12
  end
13
13
  end
14
14
 
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.3.0
4
+ version: 1.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-08-14 00:00:00.000000000 Z
14
+ date: 2013-09-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: i18n
@@ -150,12 +150,13 @@ extra_rdoc_files: []
150
150
  files:
151
151
  - lib/zendesk_apps_support/app_file.rb
152
152
  - lib/zendesk_apps_support/app_version.rb
153
- - lib/zendesk_apps_support/default_styles.scss
153
+ - lib/zendesk_apps_support/assets/default_styles.scss
154
+ - lib/zendesk_apps_support/assets/default_template.html.erb
155
+ - lib/zendesk_apps_support/assets/src.js.erb
154
156
  - lib/zendesk_apps_support/engine.rb
155
157
  - lib/zendesk_apps_support/i18n.rb
156
158
  - lib/zendesk_apps_support/package.rb
157
159
  - lib/zendesk_apps_support/sass_functions.rb
158
- - lib/zendesk_apps_support/src.js.erb
159
160
  - lib/zendesk_apps_support/stylesheet_compiler.rb
160
161
  - lib/zendesk_apps_support/validations/manifest.rb
161
162
  - lib/zendesk_apps_support/validations/source.rb
@@ -207,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
208
  version: 1.3.6
208
209
  requirements: []
209
210
  rubyforge_project:
210
- rubygems_version: 1.8.23
211
+ rubygems_version: 1.8.25
211
212
  signing_key:
212
213
  specification_version: 3
213
214
  summary: Support to help you develop Zendesk Apps.