errplane 0.5.27 → 0.5.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,7 @@ module Errplane
34
34
  attr_accessor :queue_maximum_post
35
35
 
36
36
  DEFAULTS = {
37
- :api_host => "api.errplane.com",
37
+ :api_host => "apiv2.errplane.com",
38
38
  :app_host => "app.errplane.com",
39
39
  :ignored_exceptions => %w{ActiveRecord::RecordNotFound
40
40
  ActionController::RoutingError},
@@ -11,6 +11,26 @@ module Errplane
11
11
  exit
12
12
  end
13
13
 
14
+ Errplane.configure do |config|
15
+ config.debug = true
16
+ config.ignored_environments = []
17
+ end
18
+
19
+ timestamp = Time.now.utc.to_i
20
+ data = "tests/#{timestamp} 1 #{timestamp}"
21
+ if Errplane::Worker.post_data(data)
22
+ puts "Test data sent successfully!"
23
+ else
24
+ puts "Test failed! Check your network connection and try again."
25
+ end
26
+ end
27
+
28
+ task :diagnose => :environment do
29
+ if Errplane.configuration.api_key.nil?
30
+ puts "Hey, you need to define an API key first. Run `rails g errplane <api-key>` if you didn't already."
31
+ exit
32
+ end
33
+
14
34
  Errplane.configure do |config|
15
35
  config.ignored_environments = []
16
36
  end
@@ -67,7 +67,7 @@ module Errplane
67
67
 
68
68
  private
69
69
  def initialize_http_connection
70
- connection = Net::HTTP.new(Errplane.configuration.api_host, 443)
70
+ connection = Net::HTTP.new("api.errplane.com", 443)
71
71
  connection.use_ssl = true
72
72
  connection.verify_mode = OpenSSL::SSL::VERIFY_NONE
73
73
  connection
@@ -1,3 +1,3 @@
1
1
  module Errplane
2
- VERSION = "0.5.27"
2
+ VERSION = "0.5.28"
3
3
  end
@@ -18,9 +18,10 @@ module Errplane
18
18
  def post_data(data)
19
19
  if Errplane.configuration.ignore_current_environment?
20
20
  log :debug, "Current environment is ignored, skipping POST."
21
+ return false
21
22
  else
22
23
  log :debug, "Posting data:\n#{indent_lines(data, 13)}"
23
- url = "/api/v2/time_series/applications/#{Errplane.configuration.application_id}/environments/#{Errplane.configuration.rails_environment}?api_key=#{Errplane.configuration.api_key}"
24
+ url = "/databases/#{Errplane.configuration.application_id}#{Errplane.configuration.rails_environment}/points?api_key=#{Errplane.configuration.api_key}"
24
25
  log :debug, "Posting to: #{url}"
25
26
 
26
27
  retry_count = POST_RETRIES
@@ -43,7 +44,9 @@ module Errplane
43
44
  retry
44
45
  end
45
46
  log :info, "Unable to POST after retrying, aborting!"
47
+ return false
46
48
  end
49
+ return true
47
50
  end
48
51
  end
49
52
 
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.5.27
4
+ version: 0.5.28
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-15 00:00:00.000000000 Z
12
+ date: 2013-02-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70200595375820 !ruby/object:Gem::Requirement
16
+ requirement: &70270379774820 !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: *70200595375820
24
+ version_requirements: *70270379774820
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &70200595408580 !ruby/object:Gem::Requirement
27
+ requirement: &70270379807560 !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: *70200595408580
35
+ version_requirements: *70270379807560
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: actionpack
38
- requirement: &70200595408060 !ruby/object:Gem::Requirement
38
+ requirement: &70270379807040 !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: *70200595408060
46
+ version_requirements: *70270379807040
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
- requirement: &70200595407580 !ruby/object:Gem::Requirement
49
+ requirement: &70270379806560 !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: *70200595407580
57
+ version_requirements: *70270379806560
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: fakeweb
60
- requirement: &70200595407100 !ruby/object:Gem::Requirement
60
+ requirement: &70270379806080 !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: *70200595407100
68
+ version_requirements: *70270379806080
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: guard
71
- requirement: &70200595406620 !ruby/object:Gem::Requirement
71
+ requirement: &70270379805600 !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: *70200595406620
79
+ version_requirements: *70270379805600
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: guard-rspec
82
- requirement: &70200595406140 !ruby/object:Gem::Requirement
82
+ requirement: &70270379805120 !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: *70200595406140
90
+ version_requirements: *70270379805120
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rake
93
- requirement: &70200595405660 !ruby/object:Gem::Requirement
93
+ requirement: &70270379804640 !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: *70200595405660
101
+ version_requirements: *70270379804640
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rdoc
104
- requirement: &70200595405180 !ruby/object:Gem::Requirement
104
+ requirement: &70270379804160 !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: *70200595405180
112
+ version_requirements: *70270379804160
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: rspec
115
- requirement: &70200595404700 !ruby/object:Gem::Requirement
115
+ requirement: &70270379803680 !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: *70200595404700
123
+ version_requirements: *70270379803680
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: tzinfo
126
- requirement: &70200595404220 !ruby/object:Gem::Requirement
126
+ requirement: &70270379803200 !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: *70200595404220
134
+ version_requirements: *70270379803200
135
135
  description: This gem provides implements instrumentation with Errplane for Rails
136
136
  2.3.x and 3.x applications.
137
137
  email: