Sha256: 2bbaf6ec6ddbeaa821772e605a73328a8bdfd12e0de5ad902639b682fa3e4259
Contents?: true
Size: 1.02 KB
Versions: 8
Compression:
Stored size: 1.02 KB
Contents
class WebServiceGenerator < RubiGen::NamedBase def manifest record do |m| # Check for class naming collisions. m.class_collisions class_path, "#{class_name}Api", "#{class_name}Controller", "#{class_name}ApiTest" # API and test directories. m.directory File.join('app/apis', class_path) m.directory File.join('app/controllers', class_path) m.directory File.join('test/functional', class_path) # API definition, controller, and functional test. m.template 'api_definition.rb', File.join('app/apis', class_path, "#{file_name}_api.rb") m.template 'controller.rb', File.join('app/controllers', class_path, "#{file_name}_controller.rb") m.template 'functional_test.rb', File.join('test/functional', class_path, "#{file_name}_api_test.rb") end end end
Version data entries
8 entries across 8 versions & 1 rubygems