lib/run_loop/app.rb in run_loop-2.1.6 vs lib/run_loop/app.rb in run_loop-2.1.7

- old
+ new

@@ -178,11 +178,11 @@ end # See #marketing_version alias_method :short_bundle_version, :marketing_version - # Returns the CFBundleVersionString of the app as Version instance. + # Returns the CFBundleVersion of the app as Version instance. # # Apple docs: # # CFBundleVersion specifies the build version number of the bundle, which # identifies an iteration (released or unreleased) of the bundle. The build @@ -193,18 +193,18 @@ # is, 1.02.3 is equivalent to 1.2.3). # # @return [RunLoop::Version, nil] Returns a Version instance if the # CFBundleVersion string is well formed and nil if not. def build_version - string = plist_buddy.plist_read("CFBundleVersionString", info_plist_path) + string = plist_buddy.plist_read("CFBundleVersion", info_plist_path) begin version = RunLoop::Version.new(string) rescue if string && string != "" - RunLoop.log_debug("CFBundleVersionString: '#{string}' is not a well formed version string") + RunLoop.log_debug("CFBundleVersion: '#{string}' is not a well formed version string") else - RunLoop.log_debug("CFBundleVersionString is not defined in Info.plist") + RunLoop.log_debug("CFBundleVersion is not defined in Info.plist") end version = nil end version end @@ -216,11 +216,11 @@ # Collects the paths to executables in the bundle. def executables executables = [] Dir.glob("#{path}/**/*") do |file| next if skip_executable_check?(file) - if otool(file).executable? + if otool.executable?(file) executables << file end end executables end @@ -260,12 +260,16 @@ def plist_buddy @plist_buddy ||= RunLoop::PlistBuddy.new end # @!visibility private - # An otool factory. - def otool(file) - RunLoop::Otool.new(file) + def otool + @otool ||= RunLoop::Otool.new(xcode) + end + + # @!visibility private + def xcode + @xcode ||= RunLoop::Xcode.new end # @!visibility private # A strings factory def strings(file)