Sha256: ed26ad92fb6c1f6725fd92b070cff5e8e342c54de96a46fa2243956714071bb5

Contents?: true

Size: 639 Bytes

Versions: 19

Compression:

Stored size: 639 Bytes

Contents

require 'image_compressor_pack/recipes'
require 'image_compressor_pack/version'

module ImageCompressorPack
  def self.paths
    root = File.expand_path("../../", __FILE__)
    relative_paths = YAML.load_file File.expand_path('../.paths.yml', __FILE__)
    relative_paths.map { |path| File.join root, path }
  end

  def self.activate
    paths.each do |path|
      path.gsub!(File::SEPARATOR, File::ALT_SEPARATOR) if File::ALT_SEPARATOR

      old_value = ENV['PATH'] || ''

      unless old_value.include?(path)
        ENV['PATH'] = "#{path}#{File::PATH_SEPARATOR}#{old_value}"
      end
    end
  end
end

ImageCompressorPack.activate

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
image_compressor_pack-1.0.0.1-amd64-freebsd-11 lib/image_compressor_pack.rb
image_compressor_pack-1.0.0.1-x86_64-darwin-16 lib/image_compressor_pack.rb
image_compressor_pack-1.0.0.1-x86_64-darwin-15 lib/image_compressor_pack.rb
image_compressor_pack-1.0.0.1-universal-darwin-16 lib/image_compressor_pack.rb
image_compressor_pack-1.0.0.1-universal-darwin-15 lib/image_compressor_pack.rb
image_compressor_pack-1.0.0.1-amd64-freebsd-10 lib/image_compressor_pack.rb
image_compressor_pack-1.0.0.1-x86-linux lib/image_compressor_pack.rb
image_compressor_pack-1.0.0.1-x86_64-linux lib/image_compressor_pack.rb
image_compressor_pack-1.0.0.1 lib/image_compressor_pack.rb
image_compressor_pack-1.0.0.0 lib/image_compressor_pack.rb
image_compressor_pack-0.1.3-x86_64-darwin-14 lib/image_compressor_pack.rb
image_compressor_pack-0.1.3-universal-darwin-15 lib/image_compressor_pack.rb
image_compressor_pack-0.1.3-x86_64-darwin-15 lib/image_compressor_pack.rb
image_compressor_pack-0.1.3-x86-linux lib/image_compressor_pack.rb
image_compressor_pack-0.1.3-x86_64-linux lib/image_compressor_pack.rb
image_compressor_pack-0.1.3-amd64-freebsd-10 lib/image_compressor_pack.rb
image_compressor_pack-0.1.3 lib/image_compressor_pack.rb
image_compressor_pack-0.1.1 lib/image_compressor_pack.rb
image_compressor_pack-0.1.1.rc2 lib/image_compressor_pack.rb