No release in over 3 years
Low commit activity in last 3 years
There's a lot of open issues
The ruby agent reports API traffic to http://apianalytics.com
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
>= 2.0.1, ~> 2.0
~> 5.5
~> 4.1
~> 1.4

Runtime

>= 1.7.8, ~> 1.7
 Project Readme

Mashape Analytics Ruby Agent

for more information on Mashape Analytics, please visit apianalytics.com

Requirements

Installation

gem 'mashape-analytics'
bundle install

Usage

Ruby on Rails

Make sure to add mashape-analytics to your Gemfile.

Open your config/environment.rb file, and within the Rails::Initializer.run block, add the middleware as below:

require 'mashape-analytics'

Rails::Initializer.run do |config|
  config.middleware.use MashapeAnalytics::Frameworks::Rails, service_token: 'SERVICE_TOKEN', environment: 'production'
end

In rails 4, put the config.middleware.use line in the config/application.rb file.

module MyApp
  class Application < Rails::Application
    config.middleware.use 'MashapeAnalytics::Frameworks::Rails', service_token: 'SERVICE_TOKEN', environment: 'production'
  end
end

Sinatra

Register the middleware. Then activate it.

# myapp.rb
require 'sinatra'
require 'mashape-analytics'

register MashapeAnalytics::Frameworks::Sinatra

mashapeAnalytics! 'SERVICE_TOKEN', environment: 'production'

Rack

Add the middleware.

require 'rack'
require 'mashape-analytics'

use MashapeAnalytics::Frameworks::Rack, service_token: 'SERVICE_TOKEN', environment: 'production'

Copyright and License

Copyright Mashape Inc, 2015.

Licensed under the MIT License