Sha256: ded837479eebdf88fdf57442c60cf0710a638c30cb0197b50c490e22c27f3ff5

Contents?: true

Size: 538 Bytes

Versions: 4

Compression:

Stored size: 538 Bytes

Contents

require 'securerandom'

module Opro
  module Generators
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path("../../templates", __FILE__)

      desc "Creates an oPRO initializer"
      class_option :orm

      def copy_initializer
        template "opro.rb", "config/initializers/opro.rb"
      end

      def run_other_generators
        generate "active_record:opro"
      end

      def add_opro_routes
        opro_routes = "mount_opro_oauth"
        route opro_routes
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
opro-0.5.0 lib/generators/opro/install_generator.rb
opro-0.4.3 lib/generators/opro/install_generator.rb
opro-0.4.2 lib/generators/opro/install_generator.rb
opro-0.4.1 lib/generators/opro/install_generator.rb