Sha256: 10666ec4f8b510195e61ce6d779d106a929ebea09cdedc306220ad2a7d82e666

Contents?: true

Size: 902 Bytes

Versions: 36

Compression:

Stored size: 902 Bytes

Contents

# frozen_string_literal: true

module RubyRabbitmqJanus
  module Generators
    # Create an class for generate a installing
    class InstallGenerator < Rails::Generators::Base
      desc 'Install RubyRabbitmqJanus in your Rails application'

      APPLICATION = <<-AUTOLOAD
  # Load RubyRabbitmqJanus actions events code blocks
  config.autoload_paths += Dir[Rails.root.join('app', 'ruby_rabbitmq_janus')]
      AUTOLOAD

      source_root File.expand_path('../templates', __FILE__)

      # Generate files with default code
      def add_actions
        # Create an class
        template 'actions.rb', 'app/ruby_rabbitmq_janus/actions.rb'

        # Add to application.rb
        application { APPLICATION }

        # Add initializer
        generate 'ruby_rabbitmq_janus:initializer'

        # Copy basic request
        generate 'ruby_rabbitmq_janus:default_request'
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-2.2.0.pre.168 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.2.0.pre.167 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.2.0.pre.166 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.2.0.pre.165 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.2.0.pre.164 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.2.0.pre.161 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.2.0.pre.159 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.2.0.pre.42 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.1.1 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.1.1.pre.139 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.1.0 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.1.0.pre.137 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.1.0.pre.136 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.1.0.pre.135 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.1.0.pre.132 lib/generators/ruby_rabbitmq_janus/install_generator.rb
ruby_rabbitmq_janus-2.1.0.pre.131 lib/generators/ruby_rabbitmq_janus/install_generator.rb