gateway 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{README.rdoc → README.md} +8 -3
- data/VERSION +1 -1
- data/gateway.gemspec +5 -5
- data/lib/gateway/base.rb +3 -3
- metadata +6 -6
data/{README.rdoc → README.md}
RENAMED
@@ -1,4 +1,9 @@
|
|
1
|
-
|
1
|
+
# gateway
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/gateway.png)](http://badge.fury.io/rb/gateway)
|
4
|
+
[![Build Status](https://travis-ci.org/aq1018/gateway.png?branch=master)](https://travis-ci.org/aq1018/gateway)
|
5
|
+
[![Dependency Status](https://gemnasium.com/aq1018/gateway.png)](https://gemnasium.com/aq1018/gateway)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/aq1018/gateway.png)](https://codeclimate.com/github/aq1018/gateway)
|
2
7
|
|
3
8
|
Gateway is an opinionated generic IO connection manager. It is created to be a manager / wrapper that can provide a uniform behavior across various IO connection types such as HTTP, Memcache, database, or even generic TCP / UDP protocols.
|
4
9
|
|
@@ -12,7 +17,7 @@ This gem provides a `Gateway::Base` class for other connection types to be built
|
|
12
17
|
* Newrelic instrumentation. ( If newrelic is loaded. )
|
13
18
|
* Designed specifically for multi-threaded usage and is completely thread safe.
|
14
19
|
|
15
|
-
|
20
|
+
## Contributing to gateway
|
16
21
|
|
17
22
|
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
18
23
|
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
@@ -22,7 +27,7 @@ This gem provides a `Gateway::Base` class for other connection types to be built
|
|
22
27
|
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
23
28
|
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
24
29
|
|
25
|
-
|
30
|
+
## Copyright
|
26
31
|
|
27
32
|
Copyright (c) 2012 Aaron Qian. See LICENSE.txt for
|
28
33
|
further details.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/gateway.gemspec
CHANGED
@@ -5,23 +5,23 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "gateway"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aaron Qian"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-11-04"
|
13
13
|
s.description = " Opinionated Generic IO Connection Manager "
|
14
14
|
s.email = "aq1018@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
|
-
"README.
|
17
|
+
"README.md"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
21
|
".rspec",
|
22
22
|
"Gemfile",
|
23
23
|
"LICENSE.txt",
|
24
|
-
"README.
|
24
|
+
"README.md",
|
25
25
|
"Rakefile",
|
26
26
|
"VERSION",
|
27
27
|
"gateway.gemspec",
|
@@ -44,7 +44,7 @@ Gem::Specification.new do |s|
|
|
44
44
|
s.homepage = "http://github.com/aq1018/gateway"
|
45
45
|
s.licenses = ["MIT"]
|
46
46
|
s.require_paths = ["lib"]
|
47
|
-
s.rubygems_version = "1.8.
|
47
|
+
s.rubygems_version = "1.8.25"
|
48
48
|
s.summary = "Opinionated Generic IO Connection Manager"
|
49
49
|
|
50
50
|
if s.respond_to? :specification_version then
|
data/lib/gateway/base.rb
CHANGED
@@ -53,9 +53,9 @@ module Gateway
|
|
53
53
|
def execute(action, req, opts={}, &block)
|
54
54
|
with_connection(opts) do |conn|
|
55
55
|
with_retry(action, opts) do
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
with_error_handle(action, conn, opts) do
|
57
|
+
with_new_relic(opts) do
|
58
|
+
with_perf(action, req, opts) do
|
59
59
|
with_timeout(opts) do
|
60
60
|
block.call(conn)
|
61
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gateway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -129,13 +129,13 @@ executables: []
|
|
129
129
|
extensions: []
|
130
130
|
extra_rdoc_files:
|
131
131
|
- LICENSE.txt
|
132
|
-
- README.
|
132
|
+
- README.md
|
133
133
|
files:
|
134
134
|
- .document
|
135
135
|
- .rspec
|
136
136
|
- Gemfile
|
137
137
|
- LICENSE.txt
|
138
|
-
- README.
|
138
|
+
- README.md
|
139
139
|
- Rakefile
|
140
140
|
- VERSION
|
141
141
|
- gateway.gemspec
|
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
segments:
|
171
171
|
- 0
|
172
|
-
hash:
|
172
|
+
hash: 1245028052684471010
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
none: false
|
175
175
|
requirements:
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
180
|
rubyforge_project:
|
181
|
-
rubygems_version: 1.8.
|
181
|
+
rubygems_version: 1.8.25
|
182
182
|
signing_key:
|
183
183
|
specification_version: 3
|
184
184
|
summary: Opinionated Generic IO Connection Manager
|