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 +1 -1
- data/lib/confetti/config.rb +8 -4
- data/lib/confetti/templates/ios_info.mustache +3 -1
- data/lib/confetti/templates/ios_info.rb +4 -0
- data/lib/confetti/version.rb +1 -1
- data/spec/fixtures/ios/ios_info_expected.plist +1 -1
- data/spec/fixtures/ios/ios_info_spec.plist +1 -1
- data/spec/fixtures/ios/ios_info_spec_expected_orientation.plist +6 -4
- data/spec/templates/ios_info_spec.rb +12 -0
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/confetti/config.rb
CHANGED
@@ -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
|
-
|
92
|
+
end
|
93
|
+
|
94
|
+
def icon
|
91
95
|
@icon_set.first
|
92
96
|
end
|
93
97
|
|
data/lib/confetti/version.rb
CHANGED
@@ -4,8 +4,10 @@
|
|
4
4
|
<dict>
|
5
5
|
<key>CFBundleIconFiles</key>
|
6
6
|
<array>
|
7
|
-
<string>
|
8
|
-
|
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
|
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
|