gateway 0.1.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/gateway.gemspec +2 -2
- data/lib/gateway/feature/performance.rb +6 -5
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1
|
1
|
+
0.2.1
|
data/gateway.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "gateway"
|
8
|
-
s.version = "0.1
|
8
|
+
s.version = "0.2.1"
|
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 = "2012-
|
12
|
+
s.date = "2012-06-18"
|
13
13
|
s.description = " Opinionated Generic IO Connection Manager "
|
14
14
|
s.email = "aq1018@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -16,12 +16,13 @@ module Gateway
|
|
16
16
|
def with_perf(action, req, opts={}, &block)
|
17
17
|
return block.call if opts[:perf] == false
|
18
18
|
|
19
|
-
status = success_status
|
20
|
-
desc = success_message
|
21
19
|
start_time = Time.now
|
22
20
|
|
23
21
|
begin
|
24
|
-
block.call
|
22
|
+
resp = block.call
|
23
|
+
status = success_status(resp)
|
24
|
+
desc = success_message(resp)
|
25
|
+
resp
|
25
26
|
rescue => e
|
26
27
|
status = error_status(e)
|
27
28
|
desc = error_message(e)
|
@@ -33,11 +34,11 @@ module Gateway
|
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
36
|
-
def success_status
|
37
|
+
def success_status(resp)
|
37
38
|
200
|
38
39
|
end
|
39
40
|
|
40
|
-
def success_message
|
41
|
+
def success_message(resp)
|
41
42
|
"OK"
|
42
43
|
end
|
43
44
|
|
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.1
|
4
|
+
version: 0.2.1
|
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: 2012-
|
12
|
+
date: 2012-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -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: -387436425427271469
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
none: false
|
175
175
|
requirements:
|