crashbreak 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/crashbreak/config/configurator.rb +3 -3
- data/lib/crashbreak/github_integration_service.rb +1 -1
- data/lib/crashbreak/version.rb +1 -1
- data/lib/generators/crashbreak/test_generator.rb +1 -1
- data/lib/tasks/crashbreak.rake +4 -4
- data/spec/lib/generators/test_generator_spec.rb +1 -1
- data/spec/lib/github_integration_service_spec.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 833ab461389988f0aa56ae2beeff61581627ab5f
|
4
|
+
data.tar.gz: 39c80a92111e6c28ebeb632da9a899ae3f953d29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaedc697faa8c58b272e10754a9f49efea7bdf474a316e8bc6c0663466433c8d2558036920e901aeb2c0c3c0153b09058f8fb68bb664b22c45f6f3315eeafc11
|
7
|
+
data.tar.gz: 69b818617bf1754a51be59b43e2eecd87bd200f8b19275f79f6e371102c01c05615f6d37b0a72eb4e1e6582315644683e30174da0e0f9c11ec8188efbc9aaa03
|
@@ -7,11 +7,11 @@ module Crashbreak
|
|
7
7
|
attr_accessor :dumpers
|
8
8
|
attr_accessor :dumper_options
|
9
9
|
attr_accessor :restorer_options
|
10
|
+
attr_accessor :request_spec_file_path
|
10
11
|
|
11
12
|
attr_accessor :github_login
|
12
13
|
attr_accessor :github_password
|
13
14
|
attr_accessor :github_repo_name
|
14
|
-
attr_accessor :github_spec_file_path
|
15
15
|
attr_accessor :github_development_branch
|
16
16
|
|
17
17
|
def exception_notifier
|
@@ -26,8 +26,8 @@ module Crashbreak
|
|
26
26
|
@error_serializers ||= []
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
30
|
-
@
|
29
|
+
def request_spec_file_path
|
30
|
+
@request_spec_file_path ||= 'crashbreak_error_spec.rb'
|
31
31
|
end
|
32
32
|
|
33
33
|
def github_development_branch
|
data/lib/crashbreak/version.rb
CHANGED
data/lib/tasks/crashbreak.rake
CHANGED
@@ -18,8 +18,8 @@ namespace :crashbreak do
|
|
18
18
|
error_id = ENV['error_id']
|
19
19
|
|
20
20
|
unless error_id
|
21
|
-
next unless File.exist?("#{Rails.root}
|
22
|
-
error_id = File.read("#{Rails.root}
|
21
|
+
next unless File.exist?("#{Rails.root}/#{Crashbreak.configurator.request_spec_file_path}")
|
22
|
+
error_id = File.read("#{Rails.root}/#{Crashbreak.configurator.request_spec_file_path}").scan(/error id: \d+/).first.gsub('error id: ', '').to_i
|
23
23
|
end
|
24
24
|
|
25
25
|
service = Crashbreak::GithubIntegrationService.new 'id' => error_id
|
@@ -35,11 +35,11 @@ namespace :crashbreak do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
task run_test: :environment do
|
38
|
-
unless File.exist?("#{Rails.root}
|
38
|
+
unless File.exist?("#{Rails.root}/#{Crashbreak.configurator.request_spec_file_path}")
|
39
39
|
next puts 'Crashbreak spec not found, skipping.'
|
40
40
|
end
|
41
41
|
|
42
|
-
system(
|
42
|
+
system("bundle exec rspec #{Crashbreak.configurator.request_spec_file_path}")
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -14,7 +14,7 @@ describe Crashbreak::GithubIntegrationService do
|
|
14
14
|
let(:github_deploy_commit_url) { 'https://api.github.com/repos/user/repo/commits/example_deploy_revision' }
|
15
15
|
|
16
16
|
before(:each) do
|
17
|
-
Crashbreak.configure.
|
17
|
+
Crashbreak.configure.request_spec_file_path = 'spec/crashbreak_error_spec.rb'
|
18
18
|
allow_any_instance_of(WebMock::Response).to receive(:assert_valid_body!).and_return(true)
|
19
19
|
end
|
20
20
|
|
@@ -25,7 +25,7 @@ describe Crashbreak::GithubIntegrationService do
|
|
25
25
|
|
26
26
|
stub_request(:post, github_refs_url).with(body: { ref: 'refs/heads/crashbreak-error-1', sha: 'example_deploy_revision'}.to_json)
|
27
27
|
|
28
|
-
stub_request(:put, "#{github_create_content_url}/#{Crashbreak.configure.
|
28
|
+
stub_request(:put, "#{github_create_content_url}/#{Crashbreak.configure.request_spec_file_path}").
|
29
29
|
with(body: { branch: branch_name, content: Base64.strict_encode64(file_content), message: 'Add test file for error 1' }.to_json)
|
30
30
|
|
31
31
|
allow(subject).to receive(:file_content).and_return(file_content)
|