confetti 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- confetti (0.5.3)
4
+ confetti (0.5.4)
5
5
  mustache (~> 0.11.2)
6
6
 
7
7
  GEM
@@ -5,5 +5,6 @@
5
5
  "type": "web",
6
6
  "main": "index.html",
7
7
  "title": "{{ app_name }}",
8
- "icon": "icon.png"
8
+ "icon": "icon.png",
9
+ "uiRevision": "{{# tablet_support? }}2{{/ tablet_support? }}"
9
10
  }
@@ -27,6 +27,10 @@ module Confetti
27
27
  def vendor
28
28
  @config.author.name
29
29
  end
30
+
31
+ def tablet_support?
32
+ true unless @config.preference("target-device")
33
+ end
30
34
  end
31
35
  end
32
36
  end
@@ -1,3 +1,3 @@
1
1
  module Confetti
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
@@ -5,5 +5,6 @@
5
5
  "type": "web",
6
6
  "main": "index.html",
7
7
  "title": "Confetti Sample App",
8
- "icon": "icon.png"
8
+ "icon": "icon.png",
9
+ "uiRevision": "2"
9
10
  }
@@ -0,0 +1,10 @@
1
+ {
2
+ "id": "com.whoever.awesome.app",
3
+ "version": "1.0.0",
4
+ "vendor": "Bruce Lee",
5
+ "type": "web",
6
+ "main": "index.html",
7
+ "title": "Awesome App",
8
+ "icon": "icon.png",
9
+ "uiRevision": ""
10
+ }
@@ -5,5 +5,6 @@
5
5
  "type": "web",
6
6
  "main": "index.html",
7
7
  "title": "Awesome App",
8
- "icon": "icon.png"
8
+ "icon": "icon.png",
9
+ "uiRevision": "2"
9
10
  }
@@ -98,4 +98,24 @@ describe Confetti::Template::WebosAppinfo do
98
98
  end
99
99
  end
100
100
  end
101
+
102
+ describe "with tablets disabled" do
103
+ before do
104
+ handset_pref = Confetti::Config::Preference.new "target-device", "handset"
105
+
106
+ @config = Confetti::Config.new
107
+ @config.name.name = "Awesome App"
108
+ @config.package = "com.whoever.awesome.app"
109
+ @config.author.name = "Bruce Lee"
110
+ @config.version_string = "1.0.0"
111
+ @config.preference_set << handset_pref
112
+
113
+ @template = @template_class.new(@config)
114
+ end
115
+
116
+ it "should not write the uiRevision attribute" do
117
+ correct_outpt = File.read("#{ fixture_dir }/webos/appinfo_no_tablet.json")
118
+ @template.render.should == correct_outpt
119
+ end
120
+ end
101
121
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 3
9
- version: 0.5.3
8
+ - 4
9
+ version: 0.5.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrew Lunny
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-02-22 00:00:00 -08:00
19
+ date: 2012-02-23 00:00:00 -08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -131,6 +131,7 @@ files:
131
131
  - spec/fixtures/symbian/symbian_wrt_info_expected.plist
132
132
  - spec/fixtures/symbian/symbian_wrt_info_spec.plist
133
133
  - spec/fixtures/webos/appinfo_expected.json
134
+ - spec/fixtures/webos/appinfo_no_tablet.json
134
135
  - spec/fixtures/webos/webos_appinfo_spec.json
135
136
  - spec/helpers_spec.rb
136
137
  - spec/integration_spec.rb
@@ -216,6 +217,7 @@ test_files:
216
217
  - spec/fixtures/symbian/symbian_wrt_info_expected.plist
217
218
  - spec/fixtures/symbian/symbian_wrt_info_spec.plist
218
219
  - spec/fixtures/webos/appinfo_expected.json
220
+ - spec/fixtures/webos/appinfo_no_tablet.json
219
221
  - spec/fixtures/webos/webos_appinfo_spec.json
220
222
  - spec/helpers_spec.rb
221
223
  - spec/integration_spec.rb