Sha256: 9031c8affddaeb631afd189e32c0e0f33c272b6311d5da23394d9cd2e280f7ba

Contents?: true

Size: 1.39 KB

Versions: 38

Compression:

Stored size: 1.39 KB

Contents

# Copyright (c) 2016 SolarWinds, LLC.
# All rights reserved.

module AppOpticsAPM
  class InstallGenerator < ::Rails::Generators::Base
    source_root File.join(File.dirname(__FILE__), 'templates')
    desc "Copies a AppOpticsAPM gem initializer file to your application."

    @namespace = "appoptics_apm:install"

    def copy_initializer
      # Set defaults
      @verbose = 'false'

      print_header
      print_footer

      template "appoptics_apm_initializer.rb", "config/initializers/appoptics_apm.rb"
    end

    private

      def print_header
        say ""
        say shell.set_color "Welcome to the AppOpticsAPM Ruby instrumentation setup.", :green, :bold
        say ""
        say shell.set_color "Documentation Links", :magenta
        say "-------------------"
        say ""
        say "AppOpticsAPM Installation Overview:"
        say "http://docs.appoptics.solarwinds.com/AppOpticsAPM/install-instrumentation.html"
        say ""
        say "More information on instrumenting Ruby applications can be found here:"
        say "http://docs.appoptics.solarwinds.com/Instrumentation/ruby.html#installing-ruby-instrumentation"
      end

      def print_footer
        say ""
        say "You can change configuration values in the future by modifying config/initializers/appoptics_apm.rb"
        say ""
        say "Thanks! Creating the AppOpticsAPM initializer..."
        say ""
      end
  end
end

Version data entries

38 entries across 38 versions & 2 rubygems

Version Path
appoptics_apm-4.10.1 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.10.0 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.9.0 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.8.4 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.8.3 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.8.2 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.8.1 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.8.0 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.7.0 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.6.0 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm_mnfst-4.5.2 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.5.2 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.5.1 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.5.0 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.4.1 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.4.0 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.3.1 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.3.0 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.2.7 lib/rails/generators/appoptics_apm/install_generator.rb
appoptics_apm-4.2.6 lib/rails/generators/appoptics_apm/install_generator.rb