Show nav
Heroku Dev Center
  • Get Started
  • Docs
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Rails Support
      • Working with Bundler
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with the Play Framework
      • Java Advanced Topics
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
    • Single Sign-on (SSO)
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
Prospector

This add-on is operated by Lotus Apps, LLC

Track and Analyze Dependencies in Your Ruby Codebase

Prospector

Last updated 22 December 2015

This is a draft article - the text and URL may change in the future. This article is unlisted. Only those with the link can access it.

The Prospector add-on is currently in beta.

Table of Contents

  • Provisioning the add-on
  • Using with Rails 3.x and Rails 4.x
  • Using with Sinatra
  • Using with Rake
  • Dashboard
  • Errors
  • Removing the add-on
  • Support

Prospector is an add-on providing dependency tracking and analysis in Ruby projects. On app boot, Prospector queues a background job to connect to the API and deliver details about your project’s Gemfile and dependencies.

Prospector works with any Bundler based Ruby project, including Ruby on Rails, Sinatra, Padrino and more. Be alerted to new updates in your Gemfile, track your project health and perform informed updates so you aren’t met with a dependency upgrade nightmare when your team least expects it.

Prospector is accessible via an API and has supported client libraries for Ruby.

To see a full list of features available, read more on our site here.

Provisioning the add-on

Prospector can be attached to a Heroku application via the CLI:

A list of all plans available can be found here.

$ heroku addons:create prospector
-----> Adding prospector to sharp-mountain-4005... done, v18 (free)

Once Prospector has been added, three new settings will be available in the app configuration to configure the Prospector Ruby client. This can be confirmed using the heroku config:get command.

$ heroku config | grep PROSPECTOR
PROSPECTOR_CLIENT_SECRET:      <secret>
PROSPECTOR_ENABLED:            true
PROSPECTOR_SECRET_TOKEN:       <token>

After installing Prospector the application should be configured to fully integrate with the add-on.

Using with Rails 3.x and Rails 4.x

Ruby on Rails applications will need to add the following entry into their Gemfile specifying the Prospector client library.

gem 'prospector'

Update application dependencies with bundler.

$ bundle install

By default, Prospector will be configured via the settings in your app configuration. Additional settings can be configured by creating an initializer.

# config/initializers/prospector.rb

Prospector.configure do |config|
  # Will default to using ActiveJob
  # config.background_adapter = :active_job
  # config.background_adapter = :sidekiq
  # config.background_adapter = :inline
  # config.background_adapter = :none
end

The default is active_job if running Rails 4.2 or later, but other values are sidekiq to queue a supplied Sidekiq worker, inline to run immediately without a background queue, or none to do nothing and skip entirely. If you choose none, it is up to you to decide when to call our API manually.

Using with Sinatra

Sinatra applications will need to add the following entry into their Gemfile specifying the Prospector client library.

gem 'prospector'

Update application dependencies with bundler.

$ bundle install

In Sinatra, we recommend choosing when to deliver details to the Prospector API, and to perform that in a non-blocking way. If you choose to call our API directly anywhere in your codebase, you can do so simply with the following snippet.

Prospector.notify! if Prospector.enabled?

Using with Rake

In addition to simply calling our API manually with Prospector.notify!, you have the option of using a Rake task at any time.

$ bundle exec rake prospector:deliver

Dashboard

For more information on the features available within the Prospector dashboard please see the docs at support.gemprospector.com.

The Prospector dashboard allows you to track and analyze your project’s dependencies. Use the project score to track the health of your project, easily review a list of minor and major pending updates to your codebase, and invite other engineers to join your team.

The dashboard can be accessed via the CLI:

$ heroku addons:open prospector
Opening prospector for sharp-mountain-4005

or by visiting the Heroku Dashboard and selecting the application in question. Select Prospector from the Add-ons menu.

Errors

NotEnabledError

Check to make sure that you have enabled Prospector, either via a setting in your app configuration PROSPECTOR_ENABLED=true, or via a Rails initializer (if using Rails).

If calling our API manually, do the following to avoid the error.

Prospector.notify! if Prospector.enabled?

AuthenticationError

Your secret and token are invalid. Either someone has removed the Prospector add-on from Heroku and the credentials are invalid, or a team member has reset the credentials via the Prospector dashboard.

InvalidCredentialsError

This is raised when the secret or token is missing entirely from the settings in your app configuration. Double check by running the following command and checking for PROSPECTOR_SECRET_TOKEN and PROSPECTOR_CLIENT_SECRET values.

$ heroku config | grep PROSPECTOR

UnsupportedAdapterError

For Rails users, check to make sure that the specified background queue adapter in your initializer is valid. The default is active_job if running Rails 4.2 or later, but other values are sidekiq for Sidekiq support, inline to run immediately without a background queue, or none to do nothing and skip entirely.

Removing the add-on

Prospector can be removed via the CLI.

This will destroy all associated data and cannot be undone!

$ heroku addons:destroy prospector
-----> Removing prospector from sharp-mountain-4005... done, v20 (free)

Removing Prospector will immediately delete your entire project history, teams, and organization on Prospector. After removing the add-on, you can safely uninstall the Ruby client from your codebase.

Support

All Prospector support and runtime issues should be submitted via one of the Heroku Support channels. Any non-support related issues or product feedback is welcome at support@gemprospector.com.

Keep reading

  • Support Channels

Feedback

Log in to submit feedback.

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies