errplane 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,19 @@
1
+ module Errplane
2
+ class Sidekiq
3
+ def call(worker, msg, queue)
4
+ begin
5
+ yield
6
+ rescue => e
7
+ Errplane.transmit_unless_ignorable(e, :custom_data => {:sidekiq => msg })
8
+ raise(e)
9
+ end
10
+ end
11
+ end
12
+ end
13
+
14
+ ::Sidekiq.configure_server do |config|
15
+ config.server_middleware do |chain|
16
+ chain.add ::Errplane::Sidekiq
17
+ end
18
+ end
19
+
@@ -1,3 +1,3 @@
1
1
  module Errplane
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
@@ -5,11 +5,15 @@ class ErrplaneGenerator < Rails::Generators::Base
5
5
 
6
6
  begin
7
7
  puts "Contacting Errplane API"
8
- application_name = Rails.application.class.parent_name
8
+ application_name = Rails.application.class.parent_name || "NewApplication"
9
9
  api_key = ARGV.last
10
- http = Net::HTTP.new("app.errplane.com", "80")
10
+
11
+ connection = Net::HTTP.new("errplane.com", 443)
12
+ connection.use_ssl = true
13
+ connection.verify_mode = OpenSSL::SSL::VERIFY_NONE
11
14
  url = "/api/v1/applications?api_key=#{api_key}&name=#{application_name}"
12
- response = http.post(url, nil)
15
+ response = connection.post(url, nil)
16
+
13
17
  @application = JSON.parse(response.body)
14
18
 
15
19
  unless response.is_a?(Net::HTTPSuccess)
@@ -34,18 +34,6 @@ describe Errplane do
34
34
  end
35
35
  end
36
36
 
37
- describe ".time" do
38
- context "a block is given" do
39
- it "should call the block" do
40
- end
41
- end
42
-
43
- context "a block is not given" do
44
- it "should use the passed-in value" do
45
- end
46
- end
47
- end
48
-
49
37
  describe 'rescue' do
50
38
  it "should transmit an exception when passed" do
51
39
  Errplane.queue.clear
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errplane
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
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: 2013-02-26 00:00:00.000000000 Z
12
+ date: 2013-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70316697813820 !ruby/object:Gem::Requirement
16
+ requirement: &70317101089260 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70316697813820
24
+ version_requirements: *70317101089260
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &70316697809360 !ruby/object:Gem::Requirement
27
+ requirement: &70317101122000 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.3.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70316697809360
35
+ version_requirements: *70317101122000
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: actionpack
38
- requirement: &70316697824100 !ruby/object:Gem::Requirement
38
+ requirement: &70317101121480 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.3.2
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70316697824100
46
+ version_requirements: *70317101121480
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70316697823360 !ruby/object:Gem::Requirement
49
+ requirement: &70317101121000 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 1.0.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70316697823360
57
+ version_requirements: *70317101121000
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: fakeweb
60
- requirement: &70316697822620 !ruby/object:Gem::Requirement
60
+ requirement: &70317101120520 !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: :development
67
67
  prerelease: false
68
- version_requirements: *70316697822620
68
+ version_requirements: *70317101120520
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: guard
71
- requirement: &70316697821800 !ruby/object:Gem::Requirement
71
+ requirement: &70317101120040 !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: :development
78
78
  prerelease: false
79
- version_requirements: *70316697821800
79
+ version_requirements: *70317101120040
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: guard-rspec
82
- requirement: &70316697821120 !ruby/object:Gem::Requirement
82
+ requirement: &70317101119560 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70316697821120
90
+ version_requirements: *70317101119560
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rake
93
- requirement: &70316697820380 !ruby/object:Gem::Requirement
93
+ requirement: &70317101119080 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70316697820380
101
+ version_requirements: *70317101119080
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rdoc
104
- requirement: &70316697819800 !ruby/object:Gem::Requirement
104
+ requirement: &70317101118600 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70316697819800
112
+ version_requirements: *70317101118600
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rspec
115
- requirement: &70316697819200 !ruby/object:Gem::Requirement
115
+ requirement: &70317101118120 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70316697819200
123
+ version_requirements: *70317101118120
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: tzinfo
126
- requirement: &70316697817820 !ruby/object:Gem::Requirement
126
+ requirement: &70317101117640 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,7 +131,7 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *70316697817820
134
+ version_requirements: *70317101117640
135
135
  description: This gem provides implements instrumentation with Errplane for Rails
136
136
  2.3.x and 3.x applications.
137
137
  email:
@@ -171,6 +171,7 @@ files:
171
171
  - lib/errplane/rails.rb
172
172
  - lib/errplane/railtie.rb
173
173
  - lib/errplane/resque.rb
174
+ - lib/errplane/sidekiq.rb
174
175
  - lib/errplane/sinatra.rb
175
176
  - lib/errplane/version.rb
176
177
  - lib/errplane/worker.rb