bugloco 0.0.5 → 0.0.6

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: a57f746d55b9b3c1226f3427d04437c53271a5e1
4
- data.tar.gz: ad805b917b367de22d917351553561aa6e1f944e
3
+ metadata.gz: b5679112575fa2fbe7e3c7772015ea3d7da268de
4
+ data.tar.gz: 2c9c8eefbb3fdda13a5db613f61fce766d267299
5
5
  SHA512:
6
- metadata.gz: 45463c0d5fba20320a06316ea1dbc78c6dc5c109224216b16057a56b0ca8bed22e3a938c663bc0da00c13a3e178fa0c8ae452fdf2be4df1f9dfbbd99489ce0d5
7
- data.tar.gz: b29e539089978041b14eddf21a1d90169557e69f23001ab64595c8e5c3fc83bcfc938b18dc8619f78867e72ec234850ec939bc8db7bce2ac8b435f399be70058
6
+ metadata.gz: ce19403311ddd6a37dbbdd1d5ed8d93812333650de17a65ebbd93e51b2aae8ce4fb3d27ba7043c788ca88d83275d7e642a93c018079987138b81b017d2f8fbbd
7
+ data.tar.gz: 51fa242e0a98946f031924831c13cdd05c3fa5878b99229a15353ffbbc1fe8af1020a07ffed5db7f1639ce1d2a4c786a651951d16e82ba6ad7161567f0e281df
@@ -10,7 +10,7 @@ module Bugloco
10
10
  end
11
11
 
12
12
  def configured?
13
- self.project_id && self.api_key
13
+ self.project_key && self.api_key
14
14
  end
15
15
  end
16
16
  end
@@ -63,7 +63,7 @@ module Bugloco
63
63
 
64
64
  def load_project
65
65
  @proto_message.project = Bugloco::Proto::Project.new(
66
- id: Bugloco.config.project_id)
66
+ key: Bugloco.config.project_key)
67
67
  end
68
68
 
69
69
  def load_backtrace
@@ -1,5 +1,5 @@
1
1
  ### Generated by rprotoc. DO NOT EDIT!
2
- ### <proto file: /home/wmn/code/bug-loco/bugloco-rb/protobufs/bugloco.proto>
2
+ ### <proto file: /home/wmn/code/bugloco/bugloco-rb/protobufs/bugloco.proto>
3
3
  # syntax = "proto2";
4
4
  #
5
5
  # package bugloco.proto;
@@ -40,11 +40,10 @@
40
40
  #
41
41
  # message Company {
42
42
  # required string api_key = 1;
43
- # optional int64 id = 2;
44
43
  # }
45
44
  #
46
45
  # message Project {
47
- # required int64 id = 1;
46
+ # required string key = 1;
48
47
  # optional string framework = 2;
49
48
  # optional string version = 3;
50
49
  # }
@@ -100,7 +99,7 @@
100
99
  #
101
100
  # message Response {
102
101
  # required bugloco.proto.Status status = 1;
103
- # optional int64 notice_id = 2;
102
+ # optional string notice_key = 2;
104
103
  # optional bugloco.proto.ErrorCode error_code = 3;
105
104
  # repeated bugloco.proto.ErrorMessage error_messages = 4;
106
105
  # }
@@ -149,11 +148,10 @@ module Bugloco
149
148
  class Company < ::Protobuf::Message
150
149
  defined_in __FILE__
151
150
  required :string, :api_key, 1
152
- optional :int64, :id, 2
153
151
  end
154
152
  class Project < ::Protobuf::Message
155
153
  defined_in __FILE__
156
- required :int64, :id, 1
154
+ required :string, :key, 1
157
155
  optional :string, :framework, 2
158
156
  optional :string, :version, 3
159
157
  end
@@ -209,7 +207,7 @@ module Bugloco
209
207
  class Response < ::Protobuf::Message
210
208
  defined_in __FILE__
211
209
  required :'bugloco::proto::Status', :status, 1
212
- optional :int64, :notice_id, 2
210
+ optional :string, :notice_key, 2
213
211
  optional :'bugloco::proto::ErrorCode', :error_code, 3
214
212
  repeated :'bugloco::proto::ErrorMessage', :error_messages, 4
215
213
  end
@@ -26,7 +26,7 @@ module Bugloco
26
26
 
27
27
  if response
28
28
  if response.status == Bugloco::Proto::Status::SUCCESS
29
- response.notice_id
29
+ response.notice_key
30
30
  else
31
31
  # Report the issue
32
32
  end
@@ -1,3 +1,3 @@
1
1
  module Bugloco
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/bugloco.rb CHANGED
@@ -52,7 +52,7 @@ module Bugloco
52
52
  def send_notice(encoded_notice)
53
53
  response = http_connection.post(api_url.path, encoded_notice, headers)
54
54
  response.body
55
- rescue *HTTP_ERRORS => e
55
+ rescue *HTTP_ERRORS
56
56
  nil
57
57
  end
58
58
 
@@ -38,11 +38,10 @@ message BacktraceEntry {
38
38
 
39
39
  message Company {
40
40
  required string api_key = 1;
41
- optional int64 id = 2;
42
41
  }
43
42
 
44
43
  message Project {
45
- required int64 id = 1;
44
+ required string key = 1;
46
45
  optional string framework = 2;
47
46
  optional string version = 3;
48
47
  }
@@ -98,7 +97,7 @@ message ErrorMessage {
98
97
 
99
98
  message Response {
100
99
  required bugloco.proto.Status status = 1;
101
- optional int64 notice_id = 2;
100
+ optional string notice_key = 2;
102
101
  optional bugloco.proto.ErrorCode error_code = 3;
103
102
  repeated bugloco.proto.ErrorMessage error_messages = 4;
104
103
  }
@@ -69,11 +69,11 @@ describe Bugloco::Notice do
69
69
  end
70
70
 
71
71
  it "should include the project" do
72
- @project_id = 123
72
+ @project_key = "agxkZXZ-YnVnLWxvY29yKwsSCWNvbXBhbmllcxiAgICAgOCXCQwLEghwcm9qZWN0cxiAgICAgOCXCww"
73
73
  Bugloco.config do |config|
74
- config.project_id = @project_id
74
+ config.project_key = @project_key
75
75
  end
76
- expected = Bugloco::Proto::Project.new(id: @project_id)
76
+ expected = Bugloco::Proto::Project.new(key: @project_key)
77
77
 
78
78
  run_rack_app
79
79
  expect(@notice_proto_message.project).to eq(expected)
data/spec/bugloco_spec.rb CHANGED
@@ -1,15 +1,15 @@
1
1
  describe Bugloco do
2
2
  context "#config" do
3
3
  it "should be configurable" do
4
- project_id = 123
4
+ project_key = "agxkZXZ-YnVnLWxvY29yKwsSCWNvbXBhbmllcxiAgICAgOCXCQwLEghwcm9qZWN0cxiAgICAgOCXCww"
5
5
  api_key = "secret_key"
6
6
 
7
7
  Bugloco.config do |config|
8
- config.project_id = project_id
8
+ config.project_key = project_key
9
9
  config.api_key = api_key
10
10
  end
11
11
 
12
- expect(Bugloco.config.project_id).to eq(project_id)
12
+ expect(Bugloco.config.project_key).to eq(project_key)
13
13
  expect(Bugloco.config.api_key).to eq(api_key)
14
14
  end
15
15
 
@@ -24,7 +24,7 @@ describe Bugloco do
24
24
 
25
25
  response = Bugloco::Proto::Response.new(
26
26
  status: Bugloco::Proto::Status::SUCCESS,
27
- notice_id: 123)
27
+ notice_key: "SCWNvbXBhbmllcxiAgICAgOCXCQ")
28
28
  FakeWeb.register_uri(:post, Bugloco.config.api_url,
29
29
  body: response.serialize_to_string)
30
30
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugloco
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wael M. Nasreddine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-14 00:00:00.000000000 Z
11
+ date: 2014-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler