lib/pagespeed/cli.rb
# parse the options and make the pagespeed request
parse the options and make the pagespeed request
parse the options and make the pagespeed request
def run!(argv)
        opts = set_options(argv)
        if argv.size == 1
          api_key = get_api_key
          request = PageSpeed::Request.new(argv[0], api_key, opts['strategy'])
          request.pagespeed
        elsif argv.size == 2 && argv[0] == 'add-key'
          save_api_key(argv[1])
        else
          print_usage_and_exit!
        end
      end
def run! ( argv ) opts = set_options ( argv ) if argv . size == 1 api_key = get_api_key request = PageSpeed :: Request . new ( argv [ 0 ] , api_key , opts [ 'strategy' ] ) request . pagespeed elsif argv . size == 2 && argv [ 0 ] == 'add-key' save_api_key ( argv [ 1 ] ) else print_usage_and_exit! end end
parse the options and make the pagespeed request
parse the options and make the pagespeed request
argv
<not_specific>