Sha256: 5e4bdace9fe14236f0348650637e1f58f875f0faa18823c26048a84e5b280856

Contents?: true

Size: 685 Bytes

Versions: 15

Compression:

Stored size: 685 Bytes

Contents

module Apipie
  class InstallGenerator < ::Rails::Generators::Base
    source_root File.expand_path('templates', __dir__)

    class_option(:route,
                 :aliases => "-r",
                 :type => :string,
                 :desc => "What path should be the doc available on",
                 :default => "/apipie")

    class_option(:api_path,
                 :alias => "-a",
                 :type => :string,
                 :desc => "What path are API requests on",
                 :default => "/api")

    def create_initializer
      template 'initializer.rb.erb', 'config/initializers/apipie.rb'
    end

    def add_route
      route("apipie")
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
apipie-rails-1.4.2 lib/generators/apipie/install/install_generator.rb
apipie-rails-1.4.1 lib/generators/apipie/install/install_generator.rb
apipie-rails-1.4.0 lib/generators/apipie/install/install_generator.rb
apipie-rails-1.3.0 lib/generators/apipie/install/install_generator.rb
apipie-rails-1.2.3 lib/generators/apipie/install/install_generator.rb
apipie-rails-1.2.2 lib/generators/apipie/install/install_generator.rb
apipie-rails-1.2.1 lib/generators/apipie/install/install_generator.rb
apipie-rails-1.2.0 lib/generators/apipie/install/install_generator.rb
apipie-rails-1.1.0 lib/generators/apipie/install/install_generator.rb
apipie-rails-1.0.0 lib/generators/apipie/install/install_generator.rb
apipie-rails-0.9.4 lib/generators/apipie/install/install_generator.rb
apipie-rails-0.9.3 lib/generators/apipie/install/install_generator.rb
apipie-rails-0.9.2 lib/generators/apipie/install/install_generator.rb
apipie-rails-0.9.1 lib/generators/apipie/install/install_generator.rb
apipie-rails-0.9.0 lib/generators/apipie/install/install_generator.rb