confetti 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- confetti (0.3.5)
4
+ confetti (0.3.6)
5
5
  mustache (~> 0.11.2)
6
6
  thor (~> 0.14.3)
7
7
 
@@ -9,10 +9,10 @@ module Confetti
9
9
  class FileError < Confetti::Error ; end
10
10
 
11
11
  attr_accessor :package, :version_string, :version_code, :description,
12
- :height, :width
12
+ :height, :width, :plist_icon_set
13
13
  attr_reader :author, :viewmodes, :name, :license, :content,
14
14
  :icon_set, :feature_set, :preference_set, :xml_doc,
15
- :splash_set
15
+ :splash_set, :plist_icon_set
16
16
 
17
17
  generate_and_write :android_manifest, :android_strings, :webos_appinfo,
18
18
  :ios_info, :symbian_wrt_info, :blackberry_widgets_config
@@ -32,6 +32,7 @@ module Confetti
32
32
  @license = License.new
33
33
  @content = Content.new
34
34
  @icon_set = TypedSet.new Image
35
+ @plist_icon_set = []
35
36
  @feature_set = TypedSet.new Feature
36
37
  @splash_set = TypedSet.new Image
37
38
  @preference_set = TypedSet.new Preference
@@ -74,6 +75,8 @@ module Confetti
74
75
  when "icon"
75
76
  extras = grab_extras attr
76
77
  @icon_set << Image.new(attr["src"], attr["height"], attr["width"], extras)
78
+ # used for the info.plist file
79
+ @plist_icon_set << attr["src"]
77
80
  when "splash"
78
81
  extras = grab_extras attr
79
82
  @splash_set << Image.new(attr["src"], attr["height"], attr["width"], extras)
@@ -85,9 +88,10 @@ module Confetti
85
88
  @license = License.new(ele.text.nil? ? "" : ele.text.strip, attr["href"])
86
89
  end
87
90
  end
88
- end
89
91
 
90
- def icon
92
+ end
93
+
94
+ def icon
91
95
  @icon_set.first
92
96
  end
93
97
 
@@ -4,7 +4,9 @@
4
4
  <dict>
5
5
  <key>CFBundleIconFiles</key>
6
6
  <array>
7
- <string>icon.png</string>
7
+ {{# icons }}
8
+ <string>{{ to_s }}</string>
9
+ {{/ icons }}
8
10
  </array>
9
11
  <key>UISupportedInterfaceOrientations~ipad</key>
10
12
  <array>
@@ -18,6 +18,10 @@ module Confetti
18
18
  ]
19
19
  }
20
20
 
21
+ def icons
22
+ @config.plist_icon_set
23
+ end
24
+
21
25
  def bundle_identifier
22
26
  @config.package
23
27
  end
@@ -1,3 +1,3 @@
1
1
  module Confetti
2
- VERSION = "0.3.5"
2
+ VERSION = "0.3.6"
3
3
  end
@@ -5,7 +5,7 @@
5
5
  <key>CFBundleIconFiles</key>
6
6
  <array>
7
7
  <string>icon.png</string>
8
- </array>
8
+ </array>
9
9
  <key>UISupportedInterfaceOrientations~ipad</key>
10
10
  <array>
11
11
  <string>UIInterfaceOrientationLandscapeLeft</string>
@@ -5,7 +5,7 @@
5
5
  <key>CFBundleIconFiles</key>
6
6
  <array>
7
7
  <string>icon.png</string>
8
- </array>
8
+ </array>
9
9
  <key>UISupportedInterfaceOrientations~ipad</key>
10
10
  <array>
11
11
  <string>UIInterfaceOrientationLandscapeLeft</string>
@@ -4,8 +4,10 @@
4
4
  <dict>
5
5
  <key>CFBundleIconFiles</key>
6
6
  <array>
7
- <string>icon.png</string>
8
- </array>
7
+ <string>img/beer_72.png</string>
8
+ <string>img/beer_48.png</string>
9
+ <string>img/beer_36.png</string>
10
+ </array>
9
11
  <key>UISupportedInterfaceOrientations~ipad</key>
10
12
  <array>
11
13
  <string>UIInterfaceOrientationLandscapeLeft</string>
@@ -41,6 +43,6 @@
41
43
  <key>NSMainNibFile</key>
42
44
  <string></string>
43
45
  <key>NSMainNibFile~ipad</key>
44
- <string>-iPad</string>
46
+ <string></string>
45
47
  </dict>
46
- </plist>
48
+ </plist>
@@ -35,6 +35,7 @@ describe Confetti::Template::IosInfo do
35
35
  @config.name.name = "Awesome App"
36
36
  @config.package = "com.whoever.awesome.app"
37
37
  @config.version_string = "1.0.0"
38
+ @config.plist_icon_set = ['icon.png']
38
39
  end
39
40
 
40
41
  it "should accept the config object" do
@@ -101,4 +102,15 @@ describe Confetti::Template::IosInfo do
101
102
  difference.should be_empty
102
103
  end
103
104
  end
105
+
106
+ describe "ios icons" do
107
+ before do
108
+ @config = Confetti::Config.new("#{fixture_dir}/config_with_orientation.xml")
109
+ @template = @template_class.new(@config)
110
+ end
111
+
112
+ it "should populate the info.plist with the icons" do
113
+ @template.render.should == File.read("#{ fixture_dir }/ios/ios_info_spec_expected_orientation.plist")
114
+ end
115
+ end
104
116
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 5
9
- version: 0.3.5
8
+ - 6
9
+ version: 0.3.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Andrew Lunny