opbeat 3.0.8 → 3.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe5eca3de7470c1ef43e2c2b30f87550aa9f4248
4
- data.tar.gz: 3bcd257e092fe001230a0b424b4069ae092bf340
3
+ metadata.gz: 1b25dbf0f098f4a69d5833ac37a9e0b2c129cf63
4
+ data.tar.gz: bcd17dc7a02835798595c9e9f7ff28d9b3c25a06
5
5
  SHA512:
6
- metadata.gz: 01d4b4e1ac7fb68dcdf8b9fdd56c994f75ddd42f8fe906157de6daf1ace792bfa0238d81f1ce46aaf9ebf6d8cfc8a8b4052adc0e7689788e0fc0d88fcb0402e4
7
- data.tar.gz: 99050c7c14d10f27692ef5e1a0e8ffa32526fb804fff70451a44a396d03202077a258ee68b8c320c24f4dd94803e9ca2ec33025e0f32cf2da45545c98377fa05
6
+ metadata.gz: 6b44916b7dc99550e1ebf9c1aa01d963b23e0f031b4b21fd1a7a78dd9cc9bc508d6b0754f1cd52a72c674ef5ba28a3b687cf00ceb571361914f0e79a285bc3aa
7
+ data.tar.gz: cc05d5e53426cc30b91cd325bcb6914d34ba12f42b4965ae2149bada7ed7a0c560a425caee57d64d76a7693e6dfbe303be76b0d964a65870f2d625dfa2b96e38
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  ---
2
2
  language: ruby
3
3
  cache: bundler
4
+ env:
5
+ - CI=true
4
6
  rvm:
5
7
  - 1.9.3
6
8
  - 2.0.0
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 3.0.9
2
+
3
+ - Fix Rails 5 support
4
+
1
5
  # 3.0.8
2
6
 
3
7
  - Add support for Rails 5
data/README.md CHANGED
@@ -9,17 +9,17 @@
9
9
  Add the following to your `Gemfile`:
10
10
 
11
11
  ```ruby
12
- gem 'opbeat', '~> 3.0'
12
+ gem 'opbeat', '~> 3.0.8'
13
13
  ```
14
14
 
15
- The Opbeat gem adhere to [Semantic
15
+ The Opbeat gem adheres to [Semantic
16
16
  Versioning](http://guides.rubygems.org/patterns/#semantic-versioning)
17
17
  and so you can safely trust all minor and patch versions (e.g. 3.x.x) to
18
18
  be backwards compatible.
19
19
 
20
20
  ## Usage
21
21
 
22
- ### Rails 3 and Rails 4
22
+ ### Rails 3/4/5
23
23
 
24
24
  Add the following to your `config/environments/production.rb`:
25
25
 
@@ -10,7 +10,11 @@ module Opbeat
10
10
  QUESTION = "?".freeze
11
11
 
12
12
  def self.from_rack_env env, opts = {}
13
- req = Rack::Request.new env
13
+ if defined?(ActionDispatch::Request) && env.is_a?(ActionDispatch::Request)
14
+ req = env
15
+ else
16
+ req = Rack::Request.new env
17
+ end
14
18
 
15
19
  http = new(
16
20
  req.url.split(QUESTION).first, # url
@@ -1,3 +1,3 @@
1
1
  module Opbeat
2
- VERSION = "3.0.8"
2
+ VERSION = "3.0.9"
3
3
  end
@@ -20,7 +20,7 @@ describe 'Rails integration' do
20
20
  class TinderButForHotDogs < ::Rails::Application
21
21
  config.secret_key_base = '__secret_key_base'
22
22
 
23
- config.logger = Logger.new(STDOUT)
23
+ config.logger = Logger.new(DEBUG ? STDOUT : nil)
24
24
  config.logger.level = Logger::DEBUG
25
25
 
26
26
  config.eager_load = false
@@ -33,7 +33,11 @@ describe 'Rails integration' do
33
33
 
34
34
  class UsersController < ActionController::Base
35
35
  def index
36
- render text: 'HOT DOGS!'
36
+ if Rails.version.to_i >= 5
37
+ render plain: 'HOT DOGS!'
38
+ else
39
+ render text: 'HOT DOGS!'
40
+ end
37
41
  end
38
42
 
39
43
  def other
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  ENV['RACK_ENV'] = 'test'
2
2
 
3
+ DEBUG = ENV.fetch('CI', false)
4
+
3
5
  require 'bundler/setup'
4
6
  Bundler.require :default
5
7
  require 'timecop'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opbeat
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.8
4
+ version: 3.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikkel Malmberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-25 00:00:00.000000000 Z
11
+ date: 2016-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport