crashbreak 1.0.4 → 1.0.5

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: d7d1b90cf435dd0ca6b60ef8642f31995ced7f37
4
- data.tar.gz: cdb4b7d535e458064abcda0dc9f2d8205f3c5947
3
+ metadata.gz: 59bd7396344201c555566ae2d17c0efbac3f8124
4
+ data.tar.gz: 5b9e4b2850bad68df66c8ba92f55f57fd4b8d73c
5
5
  SHA512:
6
- metadata.gz: 5fc92a75f60ff965c8d845533c147e302bbc5b272540ff79e228481737bbba29614171ae5ad4d034bc90f42c02e64dd4cecfeab18331553511edb5acc3e14478
7
- data.tar.gz: 7ccb3410d3b312e9c5ccf619d8762318260936e5aa67c5dd8faf17c23983f53be0853c57f7d8d2c5b56200d8c8b72bc38a696385c4389eda2ba83c2eabe874b9
6
+ metadata.gz: bd4224db38172400dab6bfbaf0d56f2fadaa0b0137a1789b439d80ddbd1c9f725c18b14caba82a08e905186b40be024459787ad709465951fbe39696d5c4b7f2
7
+ data.tar.gz: 7244c41a285341b4dce155c996717d958fc25db6743e4f73af598f5b76b5f97b4be701732cee501d16c44bdd961910cdd0c49f78573d44d3734a78f69888aded
@@ -1,3 +1,3 @@
1
1
  module Crashbreak
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
@@ -3,8 +3,6 @@ describe 'error id: <%= error_id %>', type: :request do
3
3
  let(:restorers_data) { StateRestorer.new('<%= error_id %>').restore }
4
4
  let(:request_parser) { Crashbreak::RequestParser.new restorers_data[:request] }
5
5
 
6
- before(:all) { ENV['CRASHBREAK_ERROR_ID'] = '<%= error_id %>' }
7
-
8
6
  it 'sends request' do
9
7
  request_parser.request_data do |request_method, url, body, headers|
10
8
  method(request_method).call url, body, headers
@@ -15,8 +15,8 @@ namespace :crashbreak do
15
15
  end
16
16
 
17
17
  task resolve_error: :environment do
18
- return puts 'error_id must be set (e.g rake crashbreak:resolve_error error_id=123)' if ENV['CRASHBREAK_ERROR_ID'].nil?
19
- service = Crashbreak::GithubIntegrationService.new ENV['CRASHBREAK_ERROR_ID']
18
+ error_id = ENV['error_id'] || File.read("#{Rails.root}/spec/crashbreak_error_spec.rb").scan(/error id: \d+/).first.gsub('error id: ', '').to_i
19
+ service = Crashbreak::GithubIntegrationService.new 'id' => error_id
20
20
 
21
21
  puts 'Removing test file from github...'
22
22
  service.remove_test
@@ -25,7 +25,7 @@ namespace :crashbreak do
25
25
  service.create_pull_request
26
26
 
27
27
  puts 'Resolving error in CrashBreak...'
28
- Crashbreak::ExceptionsRepository.new.resolve ENV['error_id']
28
+ Crashbreak::ExceptionsRepository.new.resolve error_id
29
29
  end
30
30
  end
31
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crashbreak
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Janeczek