class SparkleAppcast::Bundle
Constants
- INFO_KEYS
Attributes
path[R]
Public Class Methods
new(path)
click to toggle source
# File lib/sparkle_appcast/bundle.rb, line 15 def initialize(path) @path = File.expand_path(path) end
Public Instance Methods
[](key)
click to toggle source
# File lib/sparkle_appcast/bundle.rb, line 19 def [](key) info[key] end
info()
click to toggle source
# File lib/sparkle_appcast/bundle.rb, line 23 def info @info ||= INFO_KEYS.inject({}) do |info, key| info[key] = self.send(key) info end end
Private Instance Methods
bundle_name()
click to toggle source
TODO: Support localizable string.
# File lib/sparkle_appcast/bundle.rb, line 34 def bundle_name info_plist["CFBundleDisplayName"] || info_plist["CFBundleName"] end
bundle_short_version_string()
click to toggle source
# File lib/sparkle_appcast/bundle.rb, line 42 def bundle_short_version_string info_plist["CFBundleShortVersionString"] end
bundle_version()
click to toggle source
# File lib/sparkle_appcast/bundle.rb, line 38 def bundle_version info_plist["CFBundleVersion"] end
feed_url()
click to toggle source
# File lib/sparkle_appcast/bundle.rb, line 50 def feed_url info_plist["SUFeedURL"] end
info_plist()
click to toggle source
# File lib/sparkle_appcast/bundle.rb, line 54 def info_plist @info_plist ||= Plist.parse_xml(File.join(path, "Contents", "Info.plist")) end
minimum_system_version()
click to toggle source
# File lib/sparkle_appcast/bundle.rb, line 46 def minimum_system_version info_plist["LSMinimumSystemVersion"] end