crashlog 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module CrashLog
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
data/lib/crash_log.rb CHANGED
@@ -68,7 +68,6 @@ module CrashLog
68
68
 
69
69
  # Print a message at the top of the applciation's logs to say we're ready.
70
70
  def report_for_duty!
71
- self.reporter = CrashLog::Reporter.new(configuration)
72
71
  application = reporter.announce
73
72
 
74
73
  if application
@@ -84,16 +83,18 @@ module CrashLog
84
83
  if block_given?
85
84
  yield(configuration)
86
85
 
87
- self.reporter = CrashLog::Reporter.new(configuration)
88
-
89
- if configuration.valid?
90
- if announce.eql?(true)
91
- report_for_duty!
92
- else
93
- debug("Configuration updated successfully")
86
+ if live?
87
+ self.reporter = CrashLog::Reporter.new(configuration)
88
+
89
+ if configuration.valid?
90
+ if announce.eql?(true)
91
+ report_for_duty!
92
+ else
93
+ debug("Configuration updated successfully")
94
+ end
95
+ elsif !configuration.invalid_keys.include?(:api_key)
96
+ error("Not configured correctly. Missing the following keys: #{configuration.invalid_keys.join(', ')}")
94
97
  end
95
- elsif !configuration.invalid_keys.include?(:api_key)
96
- error("Not configured correctly. Missing the following keys: #{configuration.invalid_keys.join(', ')}")
97
98
  end
98
99
  end
99
100
  configuration
@@ -15,6 +15,7 @@ require File.expand_path('../../rails/init', __FILE__)
15
15
  fail "Please supply an API Key as the first argument" if ARGV.empty?
16
16
 
17
17
  staging = ARGV.find { |arg| arg == '--staging' }
18
+ count = ARGV.find { |arg| arg =~ /--count=\d+/ }
18
19
  host = ARGV.find { |arg| arg =~ /^http/ }
19
20
 
20
21
  host = "https://stdin.crashlog.io" if host.blank?
@@ -52,4 +53,14 @@ CrashLog.configuration.each do |key, value|
52
53
  end
53
54
  puts "Sending #{secure ? "" : "in"}secure notification to project with key #{ARGV.first}"
54
55
 
55
- SimulatedExceptionRaiser.new(secure)
56
+ if count =~ /--count/
57
+ count = count.split('=',2).last.to_i
58
+ end
59
+
60
+ if count && count > 0
61
+ count.times do
62
+ SimulatedExceptionRaiser.new(secure)
63
+ end
64
+ else
65
+ SimulatedExceptionRaiser.new(secure)
66
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crashlog
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-09 00:00:00.000000000 Z
12
+ date: 2012-11-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
- requirement: &70229446276380 !ruby/object:Gem::Requirement
16
+ requirement: &70328842475000 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.8.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70229446276380
24
+ version_requirements: *70328842475000
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: multi_json
27
- requirement: &70229446274140 !ruby/object:Gem::Requirement
27
+ requirement: &70328842473780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.1.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70229446274140
35
+ version_requirements: *70328842473780
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: crashlog-auth-hmac
38
- requirement: &70229446273460 !ruby/object:Gem::Requirement
38
+ requirement: &70328842471760 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.1.6
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70229446273460
46
+ version_requirements: *70328842471760
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rabl
49
- requirement: &70229446272540 !ruby/object:Gem::Requirement
49
+ requirement: &70328842470820 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.6.13
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70229446272540
57
+ version_requirements: *70328842470820
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: uuid
60
- requirement: &70229446271620 !ruby/object:Gem::Requirement
60
+ requirement: &70328842469620 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70229446271620
68
+ version_requirements: *70328842469620
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: hashr
71
- requirement: &70229446287340 !ruby/object:Gem::Requirement
71
+ requirement: &70328842484900 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70229446287340
79
+ version_requirements: *70328842484900
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: json
82
- requirement: &70229446286920 !ruby/object:Gem::Requirement
82
+ requirement: &70328842484100 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70229446286920
90
+ version_requirements: *70328842484100
91
91
  description: CrashLog Exception reporter
92
92
  email:
93
93
  - support@crashlog.io