File: USAGE

package info (click to toggle)
ruby-versionist 2.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 244 kB
  • sloc: ruby: 798; makefile: 3
file content (19 lines) | stat: -rw-r--r-- 808 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description:
    Creates the infrastructure for a new API version.

Example:
    rails generate versionist:new_api_version v2.0.0 V2_0_0 header:Accept value:application/vnd.mycompany.com-v2.0.0

    This will create:

       route  api_version(:module => "V2__0__0", :header=>"Accept", :value=>"application/vnd.mycompany.com-v2.0.0") do
       end
       create  app/controllers/v2_0_0
       create  app/controllers/v2_0_0/base_controller.rb
       create  app/presenters/v2_0_0
       create  app/presenters/v2_0_0/base_presenter.rb
       create  public/docs/v2.0.0
       create  public/docs/v2.0.0/index.html
       create  public/docs/v2.0.0/style.css

    In addition this will create tests for base_controller.rb and base_presenter.rb using the test_framework currently configured in your Rails app.