Sha256: 0faa267f1c983adbeda454487e3bb1d1debdc30f4635bbc130bf52b488f669b9

Contents?: true

Size: 1.16 KB

Versions: 6

Compression:

Stored size: 1.16 KB

Contents

module RocketFuel
  module Fix
    module CommandLineTools
      class DmgMetadata
        def initialize(dmg_path)
          @dmg_path = dmg_path
          @os = RocketFuel::SystemDetails.os.minor_version
        end

        def volume_dir
          if map[@os]
            map[@os]['volume_dir']
          end
        end

        def pkg_name
          if map[@os]
            map[@os]['pkg_name']
          end
        end

        protected
        def map
          @map ||= {
            '10.10' => {
              'volume_dir' => 'Command Line Developer Tools',
              'pkg_name'    => 'Command Line Tools (OS X 10.10)'
            },
            '10.9' => {
              'volume_dir' => 'Command Line Developer Tools',
              'pkg_name' => 'Command Line Tools (OS X 10.9)'
            },
            '10.8' => {
              'volume_dir' => 'Command Line Tools (Mountain Lion)',
              'pkg_name' => 'Command Line Tools (Mountain Lion)'
            },
            '10.7' => {
              'volume_dir' => 'Command Line Tools (Lion)',
              'pkg_name' => 'Command Line Tools (Lion)'
            }
          }
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rocket_fuel-0.0.6 lib/rocket_fuel/fix/command_line_tools/dmg_metadata.rb
rocket_fuel-0.0.5 lib/rocket_fuel/fix/command_line_tools/dmg_metadata.rb
rocket_fuel-0.0.4 lib/rocket_fuel/fix/command_line_tools/dmg_metadata.rb
rocket_fuel-0.0.3 lib/rocket_fuel/fix/command_line_tools/dmg_metadata.rb
rocket_fuel-0.0.2 lib/rocket_fuel/fix/command_line_tools/dmg_metadata.rb
rocket_fuel-0.0.1 lib/rocket_fuel/fix/command_line_tools/dmg_metadata.rb