axsh/openvnet — pull request #217 by ejima (2014-05-19 11:58:08+00:00)
Title: Add a model generator

Usage:

```
% vnet/tools/generator hoge -ne

create: /Users/jemiam/work/openvnet/vnet/lib/vnet/models/hoge.rb
create: /Users/jemiam/work/openvnet/vnet/lib/vnet/model_wrappers/hoge.rb
create: /Users/jemiam/work/openvnet/vnet/lib/vnet/node_api/hoge.rb
create: /Users/jemiam/work/openvnet/vnet/lib/vnet/endpoints/1.0/hoges.rb
create: /Users/jemiam/work/openvnet/vnet/lib/vnet/endpoints/1.0/responses/hoge.rb

-------------------------
Autoload configurations
-------------------------

file: /Users/jemiam/work/openvnet/vnet/lib/vnet/lib/vnet.rb

module Vnet
module Models
autoload :Hoge, 'vnet/models/hoge'
end

module ModelWrappers
autoload :Hoge, 'vnet/model_wrappers/hoge'
end

module NodeApi
autoload :Hoge, 'vnet/node_api/hoge'
end

module Endpoints
module V10
module Responses
autoload :Hoge, 'vnet/endpoints/1.0/responses/hoge'
autoload :HogeCollection, 'vnet/endpoints/1.0/responses/hoge'
end
end
end
end

-------------------------
Endpoint configurations
-------------------------

file: /Users/jemiam/work/openvnet/vnet/lib/vnet/endpoints/1.0/vnet_api.rb

module Vnet::Endpoints::V10
class VnetAPI < Sinatra::Base
load_namespace('hoges')
end
end

```

Options:

d: delete mode
n: includes node api
e: includes endpoint