airbrake 4.3.0 → 4.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +33 -0
- data/README.md +1 -1
- data/generators/airbrake/airbrake_generator.rb +1 -1
- data/generators/airbrake/templates/initializer.rb +1 -1
- data/lib/airbrake/capistrano.rb +4 -1
- data/lib/airbrake/cli/project_factory.rb +2 -8
- data/lib/airbrake/notice.rb +1 -1
- data/lib/airbrake/sender.rb +8 -1
- data/lib/airbrake/version.rb +1 -1
- data/resources/notice.xml +1 -1
- data/test/capistrano_test.rb +1 -0
- data/test/sender_test.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34e83a842888fc310213f653603dfd923af416b5
|
4
|
+
data.tar.gz: e27f883eede523f69870a9148354579a939ad568
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4413cec0a8abc9971a15763e13645ca91417a76ba006802079c59e112973f34720bd22929b011e95c0d268b8f69e00b0157c76f78b2a40fcd8f947552f600b50
|
7
|
+
data.tar.gz: 3359e753558721d2f790f6964d1ff40034df772ca4a7092d19abc240b892fb2dc027d1d91050ff5cdf4766c76590f84684d4ccaa4e7e5c40fd963c977e8b563c
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,35 @@
|
|
1
|
+
Version 4.3.1 - 2015-08-24 21:10:19 -0500
|
2
|
+
===============================================================================
|
3
|
+
|
4
|
+
Edoardo Rossi (1):
|
5
|
+
Fix missing api_key when using V3 endpoint URL
|
6
|
+
|
7
|
+
Igor Kapkov (2):
|
8
|
+
Use getters instead of handwriten methods
|
9
|
+
Update readme to fix appraisal deprecation
|
10
|
+
|
11
|
+
Kyrylo Silin (5):
|
12
|
+
Merge pull request #404 from zeroed/master
|
13
|
+
Merge pull request #405 from igas/little-optimization
|
14
|
+
Merge pull request #408 from igas/update-readme-to-fix-appraisal-deprecation
|
15
|
+
Merge pull request #406 from Aupajo/fix/ambiguous-rails
|
16
|
+
Merge pull request #403 from lisovskyvlad/master
|
17
|
+
|
18
|
+
Lisovsky Vlad (1):
|
19
|
+
Fix dumping notice object to xml for rails 2.3.10 and builder 2.1.2
|
20
|
+
|
21
|
+
Mark Nadig (1):
|
22
|
+
capistrano task should handle symbols for env
|
23
|
+
|
24
|
+
Pete Nicholls (1):
|
25
|
+
Use ::Rails namespace for Rails::VERSION
|
26
|
+
|
27
|
+
shifi (3):
|
28
|
+
Merge branch 'issue_393' of https://github.com/KonaTeam/airbrake into KonaTeam-issue_393
|
29
|
+
Merge branch 'KonaTeam-issue_393'
|
30
|
+
add guidelines for contributing
|
31
|
+
|
32
|
+
|
1
33
|
Version 4.3.0 - 2015-06-23 19:36:10 -0500
|
2
34
|
===============================================================================
|
3
35
|
|
@@ -1560,5 +1592,6 @@ Nick Quaranto (3):
|
|
1560
1592
|
|
1561
1593
|
|
1562
1594
|
|
1595
|
+
|
1563
1596
|
|
1564
1597
|
|
data/README.md
CHANGED
@@ -112,7 +112,7 @@ If you wish to run the entire suite, which checks the different framework
|
|
112
112
|
integrations with cucumber, you should run the following commands
|
113
113
|
|
114
114
|
bundle
|
115
|
-
bundle exec
|
115
|
+
bundle exec appraisal install
|
116
116
|
bundle exec rake
|
117
117
|
|
118
118
|
We use [Appraisals](https://github.com/thoughtbot/appraisal) to run the integration
|
data/lib/airbrake/capistrano.rb
CHANGED
@@ -77,7 +77,10 @@ module Airbrake
|
|
77
77
|
local_user = ENV['USER'] || ENV['USERNAME']
|
78
78
|
executable = RUBY_PLATFORM.downcase.include?('mswin') ? fetch(:rake, 'rake.bat') : fetch(:rake, 'bundle exec rake ')
|
79
79
|
directory = configuration.release_path
|
80
|
-
notify_command = "cd #{directory}; #{executable}
|
80
|
+
notify_command = "cd #{directory}; #{executable}"
|
81
|
+
notify_command << " RACK_ENV=#{rack_env}" if rack_env
|
82
|
+
notify_command << " RAILS_ENV=#{rails_env}" if rails_env
|
83
|
+
notify_command << " airbrake:deploy TO=#{airbrake_env} REVISION=#{current_revision} REPO=#{repository} USER=#{Airbrake::Capistrano::shellescape(local_user)}"
|
81
84
|
notify_command << " DRY_RUN=true" if dry_run
|
82
85
|
notify_command << " API_KEY=#{ENV['API_KEY']}" if ENV['API_KEY']
|
83
86
|
logger.info "Notifying Airbrake of Deploy (#{notify_command})"
|
@@ -2,15 +2,13 @@ require File.expand_path( "../project", __FILE__)
|
|
2
2
|
# Responsible for creating projects when needed.
|
3
3
|
# Creates them from XML received.
|
4
4
|
class ProjectFactory
|
5
|
+
attr_reader :project, :projects
|
6
|
+
|
5
7
|
def initialize
|
6
8
|
@project = Project.new
|
7
9
|
@projects = []
|
8
10
|
end
|
9
11
|
|
10
|
-
def project
|
11
|
-
@project
|
12
|
-
end
|
13
|
-
|
14
12
|
def create_projects_from_xml(xml)
|
15
13
|
xml.split("\n").each do |line|
|
16
14
|
/<name[^>]*>(.*)<\/name>/ =~ line
|
@@ -32,8 +30,4 @@ class ProjectFactory
|
|
32
30
|
@project = Project.new
|
33
31
|
end
|
34
32
|
end
|
35
|
-
|
36
|
-
def projects
|
37
|
-
@projects
|
38
|
-
end
|
39
33
|
end
|
data/lib/airbrake/notice.rb
CHANGED
@@ -154,7 +154,7 @@ module Airbrake
|
|
154
154
|
notifier.version(notifier_version)
|
155
155
|
notifier.url(notifier_url)
|
156
156
|
end
|
157
|
-
notice.error do |error|
|
157
|
+
notice.tag!('error') do |error|
|
158
158
|
error.tag!('class', error_class)
|
159
159
|
error.message(error_message)
|
160
160
|
error.backtrace do |backtrace|
|
data/lib/airbrake/sender.rb
CHANGED
@@ -51,7 +51,7 @@ module Airbrake
|
|
51
51
|
http = setup_http_connection
|
52
52
|
|
53
53
|
response = begin
|
54
|
-
http.post(
|
54
|
+
http.post(request_uri,
|
55
55
|
data,
|
56
56
|
headers)
|
57
57
|
rescue *HTTP_ERRORS => e
|
@@ -176,6 +176,13 @@ module Airbrake
|
|
176
176
|
!!(host =~ /collect.airbrake.io/) &&
|
177
177
|
project_id =~ /\S/
|
178
178
|
end
|
179
|
+
|
180
|
+
# Use request_uri[0] to keep the query since it contains the API_KEY.
|
181
|
+
#
|
182
|
+
# [0] http://ruby-doc.org/stdlib-2.2.2/libdoc/uri/rdoc/URI/HTTP.html#method-i-request_uri
|
183
|
+
def request_uri
|
184
|
+
url.respond_to?(:request_uri) ? url.request_uri : url
|
185
|
+
end
|
179
186
|
end
|
180
187
|
|
181
188
|
class CollectingSender < Sender
|
data/lib/airbrake/version.rb
CHANGED
data/resources/notice.xml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><notice version="2.4"><api-key>myapikey</api-key><notifier><name>Airbrake Notifier</name><version>4.
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><notice version="2.4"><api-key>myapikey</api-key><notifier><name>Airbrake Notifier</name><version>4.3.0</version><url>https://github.com/airbrake/airbrake</url></notifier><error><class>RuntimeError</class><message>RuntimeError: some message</message><backtrace><line number="5" file="[PROJECT_ROOT]/app/controllers/test_controller.rb" method="index"/><line number="4" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/implicit_render.rb" method="send_action"/><line number="150" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/base.rb" method="process_action"/><line number="11" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/rendering.rb" method="process_action"/><line number="18" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/callbacks.rb" method="block in process_action"/><line number="436" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/callbacks.rb" method="_run__1018700736420719449__process_action__651657960275988290__callbacks"/><line number="410" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/callbacks.rb" method="_run_process_action_callbacks"/><line number="94" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/callbacks.rb" method="run_callbacks"/><line number="17" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/callbacks.rb" method="process_action"/><line number="17" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/rescue.rb" method="process_action"/><line number="30" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/instrumentation.rb" method="block in process_action"/><line number="52" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/notifications.rb" method="block in instrument"/><line number="21" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/notifications/instrumenter.rb" method="instrument"/><line number="52" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/notifications.rb" method="instrument"/><line number="29" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/instrumentation.rb" method="process_action"/><line number="119" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/base.rb" method="process"/><line number="41" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/abstract_controller/rendering.rb" method="process"/><line number="138" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal.rb" method="dispatch"/><line number="14" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal/rack_delegation.rb" method="dispatch"/><line number="178" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_controller/metal.rb" method="block in action"/><line number="68" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/routing/route_set.rb" method="call"/><line number="68" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/routing/route_set.rb" method="dispatch"/><line number="33" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/routing/route_set.rb" method="call"/><line number="148" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb" method="block in call"/><line number="93" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb" method="block in recognize"/><line number="68" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb" method="optimized_each"/><line number="92" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb" method="recognize"/><line number="139" file="[GEM_ROOT]/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb" method="call"/><line number="499" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/routing/route_set.rb" method="call"/><line number="17" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/best_standards_support.rb" method="call"/><line number="14" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/head.rb" method="call"/><line number="24" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/methodoverride.rb" method="call"/><line number="21" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/params_parser.rb" method="call"/><line number="182" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/flash.rb" method="call"/><line number="149" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/session/abstract_store.rb" method="call"/><line number="302" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/cookies.rb" method="call"/><line number="46" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/callbacks.rb" method="block in call"/><line number="416" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/callbacks.rb" method="_run_call_callbacks"/><line number="44" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/callbacks.rb" method="call"/><line number="106" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/sendfile.rb" method="call"/><line number="48" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/remote_ip.rb" method="call"/><line number="47" file="[GEM_ROOT]/gems/actionpack-3.0.20/lib/action_dispatch/middleware/show_exceptions.rb" method="call"/><line number="13" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/rack/logger.rb" method="call"/><line number="17" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/runtime.rb" method="call"/><line number="72" file="[GEM_ROOT]/gems/activesupport-3.0.20/lib/active_support/cache/strategy/local_cache.rb" method="call"/><line number="13" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/lock.rb" method="block in call"/><line number="13" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/lock.rb" method="synchronize"/><line number="13" file="[GEM_ROOT]/gems/rack-1.2.8/lib/rack/lock.rb" method="call"/><line number="168" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/application.rb" method="call"/><line number="77" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/application.rb" method="method_missing"/><line number="4" file="request.rb" method="<top (required)>"/><line number="48" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/commands/runner.rb" method="eval"/><line number="48" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/commands/runner.rb" method="<top (required)>"/><line number="39" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/commands.rb" method="require"/><line number="39" file="[GEM_ROOT]/gems/railties-3.0.20/lib/rails/commands.rb" method="<top (required)>"/><line number="6" file="script/rails" method="require"/><line number="6" file="script/rails" method="<main>"/></backtrace></error><request><url>http://example.com:123/test/index?param=value</url><component>test</component><action>index</action><params><var key="param">value</var><var key="controller">test</var><var key="action">index</var></params><cgi-data><var key="rack.version">["1", "1"]</var><var key="rack.multithread">false</var><var key="rack.multiprocess">true</var><var key="rack.run_once">false</var><var key="REQUEST_METHOD">GET</var><var key="SERVER_NAME">example.com</var><var key="SERVER_PORT">123</var><var key="QUERY_STRING">param=value</var><var key="PATH_INFO">/test/index</var><var key="rack.url_scheme">http</var><var key="HTTPS">off</var><var key="SCRIPT_NAME"></var><var key="CONTENT_LENGTH">0</var><var key="action_dispatch.parameter_filter">["password"]</var><var key="action_dispatch.show_exceptions">true</var><var key="action_dispatch.remote_ip"></var><var key="action_dispatch.request.path_parameters"><var key="controller">test</var><var key="action">index</var></var><var key="action_dispatch.request.content_type"></var><var key="action_dispatch.request.request_parameters"></var><var key="rack.request.query_string">param=value</var><var key="rack.request.query_hash"><var key="param">value</var></var><var key="action_dispatch.request.query_parameters"><var key="param">value</var></var><var key="action_dispatch.request.parameters"><var key="param">value</var><var key="controller">test</var><var key="action">index</var></var><var key="action_dispatch.request.formats">["text/html"]</var></cgi-data></request><server-environment><project-root>/Users/shifi/work/rackspace/code/airbrake/tmp/rails_root</project-root><environment-name>production</environment-name><hostname>shifi-mac.mshome.net</hostname></server-environment><framework>Rails: 3.0.20</framework></notice>
|
data/test/capistrano_test.rb
CHANGED
@@ -24,6 +24,7 @@ class CapistranoTest < Test::Unit::TestCase
|
|
24
24
|
should "log when calling airbrake:deploy task" do
|
25
25
|
@configuration.set(:current_revision, '084505b1c0e0bcf1526e673bb6ac99fbcb18aecc')
|
26
26
|
@configuration.set(:repository, 'repository')
|
27
|
+
@configuration.set(:rails_env, :production)
|
27
28
|
@configuration.set(:release_path, '/home/deploy/rails_app/hoptoad')
|
28
29
|
io = StringIO.new
|
29
30
|
logger = Capistrano::Logger.new(:output => io)
|
data/test/sender_test.rb
CHANGED
@@ -107,7 +107,23 @@ class SenderTest < Test::Unit::TestCase
|
|
107
107
|
assert_received(http, :post) do |expect|
|
108
108
|
expect.with(anything, json_notice, Airbrake::Sender::HEADERS[:json])
|
109
109
|
end
|
110
|
+
end
|
111
|
+
|
112
|
+
should "post to Airbrake keeping the apiKey in the URL" do
|
113
|
+
json_notice = Airbrake::Notice.new(:error_class => "FooBar", :error_message => "Foo Bar").to_json
|
110
114
|
|
115
|
+
http = stub_http
|
116
|
+
|
117
|
+
sender = build_sender(:project_id => "PROJECT_ID", :host => "collect.airbrake.io")
|
118
|
+
sender.send_to_airbrake(json_notice)
|
119
|
+
|
120
|
+
expected_url = format("%s/PROJECT_ID/notices?key=%s",
|
121
|
+
Airbrake::Sender::JSON_API_URI,
|
122
|
+
Airbrake.configuration[:api_key])
|
123
|
+
|
124
|
+
assert_received(http, :post) do |expect|
|
125
|
+
expect.with(expected_url, json_notice, Airbrake::Sender::HEADERS[:json])
|
126
|
+
end
|
111
127
|
end
|
112
128
|
|
113
129
|
should "post to Airbrake with notice passed" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Airbrake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|