Sha256: 4eebadc04ebb9dc50fe00638a283a777bec47df572e4bb8c41dd6f13b01c5557

Contents?: true

Size: 987 Bytes

Versions: 2

Compression:

Stored size: 987 Bytes

Contents

require 'lib/deltacloud'
require 'ap'

skip_methods = [ "id=", "uri=" ]

begin
  @dc=DeltaCloud.new('mockuser', 'mockpassword', 'http://localhost:3001/api')
rescue
  puts "Please make sure that Deltacloud API is running with Mock driver"
  exit(1)
end

@dc.entry_points.keys.each do |ep|
  @dc.send(ep)
end

class_list = @dc.classes

out = []

out << "module DeltaCloud"
out << "class API"
@dc.entry_points.keys.each do |method|
  out << "# @return [#{method.to_s.singularize.classify}]"
  out << "def #{method}(opts={})"
  out << "end"
  out << "# @return #{method.to_s.singularize.classify}"
  out << "def #{method.to_s.singularize}(id)"
  out << "end"
end
out << "end"
out << "end"

ap out

#FileUtils.rm_r('doc') rescue nil
#FileUtils.mkdir_p('doc')
#File.open('doc/deltacloud.rb', 'w') do |f|
#  f.puts(out.join("\n"))
#end
#system("yardoc -m markdown --readme README --title 'Deltacloud Client Library' 'lib/*.rb' 'doc/deltacloud.rb' --verbose")
#FileUtils.rm('doc/deltacloud.rb')

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
deltacloud-client-0.0.7 lib/documentation.rb
deltacloud-client-0.0.6 lib/documentation.rb