Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ovfparse

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ovfparse

  • 0.9.2.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Project: ovfparse

Website: http://github.com/ruby-ovf/ovfparse License: GPLv3 Mailing list: ruby-ovf@googlegroups.com Source Code: git://github.com/ruby-ovf/ovfparse.git

== Requirements

  • ruby
  • net/ftp
  • net/http
  • net/https
  • nokogiri xml parser (native gem)

== Install

From inside your ovfparse directory: $ rake gem $ cd pkg $ gem install ovfparse[-version]

Or from RubyGems: $ gem install ovfparse

=== Example1

uri = "file://../test_files" vmRepo = VmRepository.create(uri) #use factory method to get repo class puts "\n\n****************************\n" puts "protocol: " + vmRepo.protocol + "\n" puts "url: " + vmRepo.url + "\n" puts "uri: " + vmRepo.uri + "\n" puts vmRepo.fetch #shows all the packages available at the repo

=== Example2

use factory method to get correct package type

package = VmPackage.create("http://ambrosia/repo/someOVF.ovf")

retrieve package

package.fetch

spit out package xml

puts package.xml

=== Example3

use factory method to get correct package type

package = VmPackage.create("http://ambrosia/repo/someOVF.ovf")

retrieve package

package.fetch

spit out specific xml section

puts package.ProductSection

== Useful tips

'method_missing' is implemented to return xml nodes of the section that is named like the missing method. For example, if your xml has a section called some data you can simply request the object through any of the following methods:

node = package.first_name() node = package.first_name node = package.FirstName() node = package.FirstName

FAQs

Package last updated on 24 Aug 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc