endow 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/endow/logger.rb +14 -2
- data/lib/endow/logging.rb +2 -2
- data/lib/endow/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 616b181681a41d018b2f7e3bc66b358d8ec3c6a2
|
4
|
+
data.tar.gz: cb32543eba23337ae446d70a4cb725f04b6ac72f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3bb94bea13e563efb7132f98071f0b0e6d7a000286372aff3222bf68fb7a8802c7e1697d3f0565ea97eab83200eca2a327243874de828f0aad436b3d11b717b
|
7
|
+
data.tar.gz: 7727e0d799a314d4612050e2a0e1711f5265ccf71a3a833e3142fd65218d3af98dfbb986a003b3bd5281e286462e4d5e98aca4efdcc3fb6a947a09d5059ffdd6
|
data/lib/endow/logger.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Endow
|
2
2
|
class Logger
|
3
3
|
|
4
|
-
def self.log_connection( service, attempt )
|
5
|
-
log "#{green_prefix} #{service.class.name} (
|
4
|
+
def self.log_connection( service, attempt, attempts=nil )
|
5
|
+
log "#{green_prefix} #{service.class.name} (#{attempts_segment attempt, attempts}) #{service_options service}"
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.log_graceful_error( msg )
|
@@ -29,6 +29,18 @@ module Endow
|
|
29
29
|
"#{indention}[#{ANSI.red { error_label }}]"
|
30
30
|
end
|
31
31
|
|
32
|
+
def self.service_options( service )
|
33
|
+
service.respond_to?( :options_for_log ) ?
|
34
|
+
"with #{service.options_for_log.inspect}" :
|
35
|
+
nil
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.attempts_segment( attempt, attempts )
|
39
|
+
attempts.blank? ?
|
40
|
+
"Attempt #{attempt}" :
|
41
|
+
"Attempt #{attempt} of #{attempts}"
|
42
|
+
end
|
43
|
+
|
32
44
|
def self.label
|
33
45
|
"Service Connection"
|
34
46
|
end
|
data/lib/endow/logging.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Endow
|
2
2
|
module Logging
|
3
3
|
|
4
|
-
def log_connection( service, attempt )
|
5
|
-
Endow::Logger.log_connection( service, attempt )
|
4
|
+
def log_connection( service, attempt, attempts=nil )
|
5
|
+
Endow::Logger.log_connection( service, attempt, attempts )
|
6
6
|
end
|
7
7
|
|
8
8
|
def log_graceful_error( msg )
|
data/lib/endow/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: endow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Harrelson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
requirements: []
|
153
153
|
rubyforge_project:
|
154
|
-
rubygems_version: 2.
|
154
|
+
rubygems_version: 2.4.4
|
155
155
|
signing_key:
|
156
156
|
specification_version: 4
|
157
157
|
summary: A library to assist in consuming API endpoints.
|