limbo 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -1,3 +1,3 @@
1
1
  module Limbo
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -6,9 +6,14 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["dev+ankor+unders@elabs.se"]
7
7
  gem.description = %q{Limbo exception client.}
8
8
  gem.summary = %q{Limbo client post exception to the Limbo exception service.}
9
- gem.homepage = ""
9
+ gem.homepage = "https://github.com/elabs/limbo"
10
10
 
11
- gem.files = `git ls-files`.split($\)
11
+ gem.files = Dir.glob("{bin,lib,spec}/**/*") + %w[.gemtest
12
+ Gemfile
13
+ LICENSE
14
+ README.md
15
+ Rakefile
16
+ limbo.gemspec]
12
17
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
19
  gem.name = "limbo"
@@ -10,7 +10,7 @@ http_interactions:
10
10
  x-limbo-key:
11
11
  - test-key
12
12
  content-type:
13
- - application/json
13
+ - application/json;charset=utf-8
14
14
  accept:
15
15
  - ! '*/*'
16
16
  user-agent:
@@ -36,5 +36,5 @@ http_interactions:
36
36
  encoding: US-ASCII
37
37
  string: ''
38
38
  http_version: '1.1'
39
- recorded_at: Fri, 29 Jun 2012 15:17:12 GMT
39
+ recorded_at: Wed, 04 Jul 2012 11:12:56 GMT
40
40
  recorded_with: VCR 2.2.2
@@ -0,0 +1,74 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://limbo-listener-staging.herokuapp.com/log
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ! "{\"client-error\": \"error generating JSON\",\n \"message\":
9
+ \"\\\"\\\\x80\\\" from ASCII-8BIT to UTF-8\",\n \"backtrace\":
10
+ \"/Users/dev/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/json/common.rb:216:in
11
+ `encode'\\n/Users/dev/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/json/common.rb:216:in
12
+ `generate'\\n/Users/dev/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/json/common.rb:216:in
13
+ `generate'\\n/Users/dev/Projects/limbo/lib/limbo/client.rb:42:in `body'\\n/Users/dev/Projects/limbo/lib/limbo/client.rb:32:in
14
+ `block in post'\\n/Users/dev/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:745:in
15
+ `start'\\n/Users/dev/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:557:in
16
+ `start'\\n/Users/dev/Projects/limbo/lib/limbo/client.rb:30:in `post'\\n/Users/dev/Projects/limbo/lib/limbo/client.rb:7:in
17
+ `post'\\n/Users/dev/Projects/limbo/spec/limbo/client_spec.rb:32:in `block
18
+ (5 levels) in <top (required)>'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example.rb:87:in
19
+ `instance_eval'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example.rb:87:in
20
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example.rb:195:in
21
+ `with_around_each_hooks'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example.rb:84:in
22
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:353:in
23
+ `block in run_examples'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:349:in
24
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:349:in
25
+ `run_examples'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:335:in
26
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
27
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
28
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
29
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
30
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
31
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
32
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
33
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
34
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
35
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:28:in
36
+ `block (2 levels) in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:28:in
37
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:28:in
38
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/reporter.rb:34:in
39
+ `report'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:25:in
40
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:in
41
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10:in
42
+ `block in autorun'\"}"
43
+ headers:
44
+ x-limbo-key:
45
+ - test-key
46
+ content-type:
47
+ - application/json;charset=utf-8
48
+ accept:
49
+ - ! '*/*'
50
+ user-agent:
51
+ - Ruby
52
+ response:
53
+ status:
54
+ code: 200
55
+ message: OK
56
+ headers:
57
+ content-type:
58
+ - text/html;charset=utf-8
59
+ server:
60
+ - thin 1.3.1 codename Triple Espresso
61
+ x-frame-options:
62
+ - sameorigin
63
+ x-xss-protection:
64
+ - 1; mode=block
65
+ content-length:
66
+ - '0'
67
+ connection:
68
+ - keep-alive
69
+ body:
70
+ encoding: US-ASCII
71
+ string: ''
72
+ http_version: '1.1'
73
+ recorded_at: Wed, 04 Jul 2012 11:12:57 GMT
74
+ recorded_with: VCR 2.2.2
@@ -10,7 +10,7 @@ http_interactions:
10
10
  x-limbo-key:
11
11
  - test-key
12
12
  content-type:
13
- - application/json
13
+ - application/json;charset=utf-8
14
14
  accept:
15
15
  - ! '*/*'
16
16
  user-agent:
@@ -32,5 +32,5 @@ http_interactions:
32
32
  encoding: US-ASCII
33
33
  string: ''
34
34
  http_version: '1.0'
35
- recorded_at: Fri, 29 Jun 2012 15:17:12 GMT
35
+ recorded_at: Wed, 04 Jul 2012 11:12:57 GMT
36
36
  recorded_with: VCR 2.2.2
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://limbo-listener-staging.herokuapp.com/log
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ! "{\"client-error\": \"error generating JSON\",\n \"message\":
9
+ \"only generation of JSON objects or arrays allowed\",\n \"backtrace\":
10
+ \"/Users/dev/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/json/common.rb:216:in
11
+ `generate'\\n/Users/dev/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/json/common.rb:216:in
12
+ `generate'\\n/Users/dev/Projects/limbo/lib/limbo/client.rb:42:in `body'\\n/Users/dev/Projects/limbo/lib/limbo/client.rb:32:in
13
+ `block in post'\\n/Users/dev/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:745:in
14
+ `start'\\n/Users/dev/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/net/http.rb:557:in
15
+ `start'\\n/Users/dev/Projects/limbo/lib/limbo/client.rb:30:in `post'\\n/Users/dev/Projects/limbo/lib/limbo/client.rb:7:in
16
+ `post'\\n/Users/dev/Projects/limbo/spec/limbo/client_spec.rb:26:in `block
17
+ (5 levels) in <top (required)>'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example.rb:87:in
18
+ `instance_eval'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example.rb:87:in
19
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example.rb:195:in
20
+ `with_around_each_hooks'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example.rb:84:in
21
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:353:in
22
+ `block in run_examples'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:349:in
23
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:349:in
24
+ `run_examples'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:335:in
25
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
26
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
27
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
28
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
29
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
30
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
31
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
32
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
33
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:336:in
34
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:28:in
35
+ `block (2 levels) in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:28:in
36
+ `map'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:28:in
37
+ `block in run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/reporter.rb:34:in
38
+ `report'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:25:in
39
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:in
40
+ `run'\\n/Users/dev/.rvm/gems/ruby-1.9.3-p125/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10:in
41
+ `block in autorun'\"}"
42
+ headers:
43
+ x-limbo-key:
44
+ - test-key
45
+ content-type:
46
+ - application/json;charset=utf-8
47
+ accept:
48
+ - ! '*/*'
49
+ user-agent:
50
+ - Ruby
51
+ response:
52
+ status:
53
+ code: 200
54
+ message: OK
55
+ headers:
56
+ content-type:
57
+ - text/html;charset=utf-8
58
+ server:
59
+ - thin 1.3.1 codename Triple Espresso
60
+ x-frame-options:
61
+ - sameorigin
62
+ x-xss-protection:
63
+ - 1; mode=block
64
+ content-length:
65
+ - '0'
66
+ connection:
67
+ - keep-alive
68
+ body:
69
+ encoding: US-ASCII
70
+ string: ''
71
+ http_version: '1.1'
72
+ recorded_at: Wed, 04 Jul 2012 11:12:57 GMT
73
+ recorded_with: VCR 2.2.2
@@ -10,7 +10,7 @@ http_interactions:
10
10
  x-limbo-key:
11
11
  - test-key
12
12
  content-type:
13
- - application/json
13
+ - application/json;charset=utf-8
14
14
  accept:
15
15
  - ! '*/*'
16
16
  user-agent:
@@ -36,5 +36,5 @@ http_interactions:
36
36
  encoding: US-ASCII
37
37
  string: ''
38
38
  http_version: '1.1'
39
- recorded_at: Fri, 29 Jun 2012 15:17:11 GMT
39
+ recorded_at: Wed, 04 Jul 2012 11:12:55 GMT
40
40
  recorded_with: VCR 2.2.2
@@ -10,7 +10,7 @@ http_interactions:
10
10
  x-limbo-key:
11
11
  - test-key
12
12
  content-type:
13
- - application/json
13
+ - application/json;charset=utf-8
14
14
  accept:
15
15
  - ! '*/*'
16
16
  user-agent:
@@ -36,5 +36,5 @@ http_interactions:
36
36
  encoding: US-ASCII
37
37
  string: ''
38
38
  http_version: '1.1'
39
- recorded_at: Fri, 29 Jun 2012 15:17:12 GMT
39
+ recorded_at: Wed, 04 Jul 2012 11:12:56 GMT
40
40
  recorded_with: VCR 2.2.2
@@ -15,15 +15,23 @@ describe Limbo::Client do
15
15
  end
16
16
 
17
17
  describe "#valid_data?" do
18
-
19
18
  context "valid data" do
20
19
  specify { Limbo::Client.post(data: "info").should be_valid_data }
21
20
  end
22
21
 
23
22
  context "invalid data" do
24
- use_vcr_cassette 'limbo.client.post.invalid_data'
25
23
 
26
- specify { Limbo::Client.post("info").should_not be_valid_data }
24
+ context "string argument" do
25
+ use_vcr_cassette 'limbo.client.post.string_argument', exclusive: true
26
+ specify { Limbo::Client.post("info").should_not be_valid_data }
27
+ end
28
+
29
+ context "bad character" do
30
+ use_vcr_cassette 'limbo.client.post.bad_character', exclusive: true
31
+ specify do
32
+ Limbo::Client.post(data: "bad\x80char").should_not be_valid_data
33
+ end
34
+ end
27
35
  end
28
36
  end
29
37
 
@@ -33,7 +41,7 @@ describe Limbo::Client do
33
41
  end
34
42
 
35
43
  context "invalid uri" do
36
- use_vcr_cassette 'limbo.client.post.invalid_uri'
44
+ use_vcr_cassette 'limbo.client.post.invalid_uri', exclusive: true
37
45
 
38
46
  before do
39
47
  Limbo.configure do |config|
@@ -43,5 +51,12 @@ describe Limbo::Client do
43
51
 
44
52
  specify { Limbo::Client.post(data: "info").should_not be_posted }
45
53
  end
54
+
55
+ context "invalid body" do
56
+ use_vcr_cassette 'limbo.client.post.bad_character', exclusive: true
57
+ specify do
58
+ Limbo::Client.post(data: "bad\x80char").should be_posted
59
+ end
60
+ end
46
61
  end
47
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: limbo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -82,20 +82,16 @@ executables: []
82
82
  extensions: []
83
83
  extra_rdoc_files: []
84
84
  files:
85
- - .gitignore
86
- - Gemfile
87
- - LICENSE
88
- - README.md
89
- - Rakefile
90
- - lib/limbo.rb
91
85
  - lib/limbo/client.rb
92
86
  - lib/limbo/rails/data.rb
93
87
  - lib/limbo/rails/parameter_filter.rb
94
88
  - lib/limbo/rails/request.rb
95
89
  - lib/limbo/version.rb
96
- - limbo.gemspec
90
+ - lib/limbo.rb
97
91
  - spec/cassettes/limbo_client_post.yml
92
+ - spec/cassettes/limbo_client_post_bad_character.yml
98
93
  - spec/cassettes/limbo_client_post_invalid_uri.yml
94
+ - spec/cassettes/limbo_client_post_string_argument.yml
99
95
  - spec/cassettes/limbo_post.yml
100
96
  - spec/cassettes/limbo_rails_post.yml
101
97
  - spec/limbo/client_spec.rb
@@ -104,7 +100,13 @@ files:
104
100
  - spec/limbo/rails/request_spec.rb
105
101
  - spec/limbo_spec.rb
106
102
  - spec/spec_helper.rb
107
- homepage: ''
103
+ - .gemtest
104
+ - Gemfile
105
+ - LICENSE
106
+ - README.md
107
+ - Rakefile
108
+ - limbo.gemspec
109
+ homepage: https://github.com/elabs/limbo
108
110
  licenses: []
109
111
  post_install_message:
110
112
  rdoc_options: []
@@ -130,7 +132,9 @@ specification_version: 3
130
132
  summary: Limbo client post exception to the Limbo exception service.
131
133
  test_files:
132
134
  - spec/cassettes/limbo_client_post.yml
135
+ - spec/cassettes/limbo_client_post_bad_character.yml
133
136
  - spec/cassettes/limbo_client_post_invalid_uri.yml
137
+ - spec/cassettes/limbo_client_post_string_argument.yml
134
138
  - spec/cassettes/limbo_post.yml
135
139
  - spec/cassettes/limbo_rails_post.yml
136
140
  - spec/limbo/client_spec.rb
data/.gitignore DELETED
@@ -1,18 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- log/development.log