errplane 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
data/errplane.gemspec CHANGED
@@ -22,8 +22,6 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.add_runtime_dependency 'json'
24
24
 
25
- s.add_dependency 'activesupport', ['>= 2.3.2']
26
- s.add_dependency 'actionpack', ['>= 2.3.2']
27
25
  s.add_development_dependency 'bundler', ['>= 1.0.0']
28
26
  s.add_development_dependency 'fakeweb', ['>= 0']
29
27
  s.add_development_dependency 'guard', ['>= 0']
@@ -14,9 +14,13 @@ class ErrplaneGenerator < Rails::Generator::Base
14
14
  puts "Contacting Errplane API"
15
15
  application_name = "ApplicationName"
16
16
  api_key = options[:api_key]
17
- http = Net::HTTP.new("app.errplane.com", "80")
17
+
18
+ connection = Net::HTTP.new("errplane.com", 443)
19
+ connection.use_ssl = true
20
+ connection.verify_mode = OpenSSL::SSL::VERIFY_NONE
18
21
  url = "/api/v1/applications?api_key=#{api_key}&name=#{application_name}"
19
- response = http.post(url, nil)
22
+ response = connection.post(url, nil)
23
+
20
24
  @application = JSON.parse(response.body)
21
25
 
22
26
  unless response.is_a?(Net::HTTPSuccess)
@@ -25,13 +29,14 @@ class ErrplaneGenerator < Rails::Generator::Base
25
29
  rescue => e
26
30
  puts "We ran into a problem creating your application via the API!"
27
31
  puts "If this issue persists, contact us at support@errplane.com with the following details:"
32
+ puts "API Key: #{e.class}: #{options[:api_key]}"
28
33
  puts "#{e.class}: #{e.message}"
29
34
  end
30
35
 
31
36
  record do |m|
32
37
  m.template "initializer.rb", "config/initializers/errplane.rb",
33
38
  :assigns => {
34
- :application_id => options[:application_id] || secure_random.hex(4),
39
+ :application_id => options[:application_id] || @application["key"] || secure_random.hex(4),
35
40
  :api_key => options[:api_key]
36
41
  }
37
42
  end
data/lib/errplane.rb CHANGED
@@ -81,7 +81,7 @@ module Errplane
81
81
  report(name, :value => value)
82
82
  end
83
83
 
84
- def transmit_unless_ignorable(e, env)
84
+ def transmit_unless_ignorable(e, env = {})
85
85
  transmit(e, env) unless ignorable_exception?(e)
86
86
  end
87
87
 
@@ -121,14 +121,14 @@ module Errplane
121
121
  if configuration.ignore_current_environment?
122
122
  raise(e)
123
123
  else
124
- transmit_unless_ignorable(e, {}) unless ignorable_exception?(e)
124
+ transmit_unless_ignorable(e)
125
125
  end
126
126
  end
127
127
 
128
128
  def rescue_and_reraise(&block)
129
129
  block.call
130
130
  rescue StandardError => e
131
- transmit_unless_ignorable(e, {}) unless ignorable_exception?(e)
131
+ transmit_unless_ignorable(e)
132
132
  raise(e)
133
133
  end
134
134
  end
@@ -1,3 +1,3 @@
1
1
  module Errplane
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
@@ -34,6 +34,18 @@ 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
+
37
49
  describe 'rescue' do
38
50
  it "should transmit an exception when passed" do
39
51
  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.1
4
+ version: 0.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2013-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70317101089260 !ruby/object:Gem::Requirement
16
+ requirement: &70237559775540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,32 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70317101089260
25
- - !ruby/object:Gem::Dependency
26
- name: activesupport
27
- requirement: &70317101122000 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: 2.3.2
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *70317101122000
36
- - !ruby/object:Gem::Dependency
37
- name: actionpack
38
- requirement: &70317101121480 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: 2.3.2
44
- type: :runtime
45
- prerelease: false
46
- version_requirements: *70317101121480
24
+ version_requirements: *70237559775540
47
25
  - !ruby/object:Gem::Dependency
48
26
  name: bundler
49
- requirement: &70317101121000 !ruby/object:Gem::Requirement
27
+ requirement: &70237559775020 !ruby/object:Gem::Requirement
50
28
  none: false
51
29
  requirements:
52
30
  - - ! '>='
@@ -54,10 +32,10 @@ dependencies:
54
32
  version: 1.0.0
55
33
  type: :development
56
34
  prerelease: false
57
- version_requirements: *70317101121000
35
+ version_requirements: *70237559775020
58
36
  - !ruby/object:Gem::Dependency
59
37
  name: fakeweb
60
- requirement: &70317101120520 !ruby/object:Gem::Requirement
38
+ requirement: &70237559805220 !ruby/object:Gem::Requirement
61
39
  none: false
62
40
  requirements:
63
41
  - - ! '>='
@@ -65,10 +43,10 @@ dependencies:
65
43
  version: '0'
66
44
  type: :development
67
45
  prerelease: false
68
- version_requirements: *70317101120520
46
+ version_requirements: *70237559805220
69
47
  - !ruby/object:Gem::Dependency
70
48
  name: guard
71
- requirement: &70317101120040 !ruby/object:Gem::Requirement
49
+ requirement: &70237559804740 !ruby/object:Gem::Requirement
72
50
  none: false
73
51
  requirements:
74
52
  - - ! '>='
@@ -76,10 +54,10 @@ dependencies:
76
54
  version: '0'
77
55
  type: :development
78
56
  prerelease: false
79
- version_requirements: *70317101120040
57
+ version_requirements: *70237559804740
80
58
  - !ruby/object:Gem::Dependency
81
59
  name: guard-rspec
82
- requirement: &70317101119560 !ruby/object:Gem::Requirement
60
+ requirement: &70237559804260 !ruby/object:Gem::Requirement
83
61
  none: false
84
62
  requirements:
85
63
  - - ! '>='
@@ -87,10 +65,10 @@ dependencies:
87
65
  version: '0'
88
66
  type: :development
89
67
  prerelease: false
90
- version_requirements: *70317101119560
68
+ version_requirements: *70237559804260
91
69
  - !ruby/object:Gem::Dependency
92
70
  name: rake
93
- requirement: &70317101119080 !ruby/object:Gem::Requirement
71
+ requirement: &70237559803780 !ruby/object:Gem::Requirement
94
72
  none: false
95
73
  requirements:
96
74
  - - ! '>='
@@ -98,10 +76,10 @@ dependencies:
98
76
  version: '0'
99
77
  type: :development
100
78
  prerelease: false
101
- version_requirements: *70317101119080
79
+ version_requirements: *70237559803780
102
80
  - !ruby/object:Gem::Dependency
103
81
  name: rdoc
104
- requirement: &70317101118600 !ruby/object:Gem::Requirement
82
+ requirement: &70237559803300 !ruby/object:Gem::Requirement
105
83
  none: false
106
84
  requirements:
107
85
  - - ! '>='
@@ -109,10 +87,10 @@ dependencies:
109
87
  version: '0'
110
88
  type: :development
111
89
  prerelease: false
112
- version_requirements: *70317101118600
90
+ version_requirements: *70237559803300
113
91
  - !ruby/object:Gem::Dependency
114
92
  name: rspec
115
- requirement: &70317101118120 !ruby/object:Gem::Requirement
93
+ requirement: &70237559802820 !ruby/object:Gem::Requirement
116
94
  none: false
117
95
  requirements:
118
96
  - - ! '>='
@@ -120,10 +98,10 @@ dependencies:
120
98
  version: '0'
121
99
  type: :development
122
100
  prerelease: false
123
- version_requirements: *70317101118120
101
+ version_requirements: *70237559802820
124
102
  - !ruby/object:Gem::Dependency
125
103
  name: tzinfo
126
- requirement: &70317101117640 !ruby/object:Gem::Requirement
104
+ requirement: &70237559802340 !ruby/object:Gem::Requirement
127
105
  none: false
128
106
  requirements:
129
107
  - - ! '>='
@@ -131,7 +109,7 @@ dependencies:
131
109
  version: '0'
132
110
  type: :development
133
111
  prerelease: false
134
- version_requirements: *70317101117640
112
+ version_requirements: *70237559802340
135
113
  description: This gem provides implements instrumentation with Errplane for Rails
136
114
  2.3.x and 3.x applications.
137
115
  email: