class CrxMake

Constants

EXT_VERSION

this is chromium extension version

KEY

CERT_PUBLIC_KEY_INFO struct

KEY_SIZE
MAGIC

thx masover

VERSION

Public Instance Methods

make() click to toggle source
# File lib/crxmake.rb, line 36
def make
  check_valid_option @opt
  if @pkey
    read_key
  else
    generate_key
  end
  zip_buffer = create_zip
  sign_zip(zip_buffer)
  write_crx(zip_buffer)
ensure
  #remove_zip
end
zip() click to toggle source
# File lib/crxmake.rb, line 50
def zip
  check_valid_option_zip @opt
  unless @pkey
    generate_key
    @pkey = @pkey_o
  end
  #remove_zip
  zip_buffer = create_zip do |zip|
    puts "include pem key: \"#{@pkey}\"" if @verbose
    zip.add('key.pem', @pkey)
  end
  File.open(@zip,'wb'){|f|f<<zip_buffer}
end

Public Class Methods

new(opt) click to toggle source
# File lib/crxmake.rb, line 32
def initialize opt
  @opt = opt
end