Sha256: e6ef3fabb0b1126397c229219197d4db0d1b8afeb8a08a23d97eb9d17e469f7b

Contents?: true

Size: 704 Bytes

Versions: 5

Compression:

Stored size: 704 Bytes

Contents

module RorVsWild
  class Installer
    PATH = "config/rorvswild.yml"

    def self.create_rails_config(api_key)
      if File.directory?("config")
        if !File.exists?(PATH)
          File.write(PATH, template(api_key))
          puts "File #{PATH} has been created. Restart / deploy your app to start collecting data."
        else
          puts "File #{PATH} already exists."
        end
      else
        puts "There is no config directory to create #{PATH}."
      end
    end

    def self.template(api_key)
      <<YAML
production:
  api_key: #{api_key}
  # ignored_exceptions:
  #   - ActionController::RoutingError
  #   - UncommentToIgnoreAnyExceptionNameListedHere
YAML
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rorvswild-1.3.5 lib/rorvswild/installer.rb
rorvswild-1.3.4 lib/rorvswild/installer.rb
rorvswild-1.3.3 lib/rorvswild/installer.rb
rorvswild-1.3.2 lib/rorvswild/installer.rb
rorvswild-1.3.1 lib/rorvswild/installer.rb