start_her 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +2 -2
- data/lib/start_her.rb +1 -1
- data/lib/start_her/configuration.rb +1 -2
- data/lib/start_her/logger.rb +3 -10
- data/lib/start_her/version.rb +1 -1
- data/spec/start_her/configuration_spec.rb +0 -4
- data/spec/start_her/retry_policies_spec.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de6f836c41fbc39e99de1176a4348cc5667446a0
|
4
|
+
data.tar.gz: 2bcac23346d1e13473be191b82d7c6b01a668619
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17eb4c074016764ef010e9481f12b1bd08912094531c9417233365d08922d3f9eca3fff2cf9ab5d0467225c24ed573900e4999da78af908f6f046580e26a272b
|
7
|
+
data.tar.gz: 9c96d69a18c3a7ce96be020f9a95c9d1979ff7572b6c47afda051782571a76c04bc4aab624816f36c13ee84db74e062eaadbbd5e07f21674b01fbb12505166fb
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/start_her.rb
CHANGED
@@ -28,7 +28,7 @@ module StartHer
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
# Safe loading for stuff that needs
|
31
|
+
# Safe loading for stuff that needs StartHer#config
|
32
32
|
autoload :RedisClient, 'start_her/redis_client'
|
33
33
|
autoload :Subscriber, 'start_her/subscriber'
|
34
34
|
autoload :Publisher, 'start_her/publisher'
|
@@ -1,11 +1,10 @@
|
|
1
1
|
module StartHer
|
2
2
|
class Configuration
|
3
|
-
attr_accessor :redis, :
|
3
|
+
attr_accessor :redis, :backlog_ttl
|
4
4
|
attr_writer :logger
|
5
5
|
|
6
6
|
def initialize
|
7
7
|
@redis = {}
|
8
|
-
@logstash_url = ''
|
9
8
|
@backlog_ttl = 60 * 60 * 24 * 7 # 1.week
|
10
9
|
end
|
11
10
|
|
data/lib/start_her/logger.rb
CHANGED
@@ -9,24 +9,17 @@ module StartHer
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def development
|
12
|
-
LogStashLogger.new(type: :
|
13
|
-
{ type: :stdout },
|
14
|
-
{ type: :file, path: 'log/development.log', sync: true }
|
15
|
-
], formatter: ::Logger::Formatter)
|
12
|
+
LogStashLogger.new(type: :stdout, formatter: ::Logger::Formatter)
|
16
13
|
end
|
17
14
|
|
18
15
|
def production
|
19
|
-
LogStashLogger.new(
|
20
|
-
type: :redis, url: StartHer.config.logstash_url, sync: true).tap do |logger|
|
16
|
+
LogStashLogger.new(type: :stdout, formatter: :json).tap do |logger|
|
21
17
|
logger.level = ::Logger::INFO
|
22
18
|
end
|
23
19
|
end
|
24
20
|
class << self
|
25
21
|
alias_method :staging, :production
|
26
|
-
|
27
|
-
|
28
|
-
def test
|
29
|
-
LogStashLogger.new(type: :stdout, formatter: ::Logger::Formatter)
|
22
|
+
alias_method :test, :development
|
30
23
|
end
|
31
24
|
end
|
32
25
|
end
|
data/lib/start_her/version.rb
CHANGED
@@ -33,7 +33,7 @@ module StartHer
|
|
33
33
|
CustomHelpers.suppress(RuntimeError) do
|
34
34
|
exponential_backoff.call(options)
|
35
35
|
end
|
36
|
-
expect((Time.now.utc - started_at).round(
|
36
|
+
expect((Time.now.utc - started_at).round(1)).to eq(options[:elapsed_time_secs])
|
37
37
|
end
|
38
38
|
|
39
39
|
it 'raises an error' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: start_her
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- abourquin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-07-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: redis
|
@@ -186,9 +186,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.4.
|
189
|
+
rubygems_version: 2.4.5.1
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: StartHer
|
193
193
|
test_files: []
|
194
|
-
has_rdoc:
|