larva 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/larva/configurator.rb +13 -14
- data/lib/larva/version.rb +1 -1
- data/template/config/propono.yml +6 -0
- data/test/configurator_test.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 253b6387b64a8f8bd27ee2b6e532f42c12890d90
|
4
|
+
data.tar.gz: 9cee9c21d012769f6b15f732f9a79a1ae6870dbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78b99443b3b9ac3c933bb1562738b704340edc38aabe36653618fa087449784cf95733e06ad541df6ca49bac920c8cf3fda870f536df9c79a12ceb0736660ec6
|
7
|
+
data.tar.gz: 96c291367029f57c8091eb099dd1a017863a3248f43074ee8840649544880e1822b87b544856cbe588f1b53cfd1b43acfac9083886e464dc5fb59dc6a9de3351
|
data/CHANGELOG.md
CHANGED
data/lib/larva/configurator.rb
CHANGED
@@ -20,19 +20,9 @@ module Larva
|
|
20
20
|
Filum.setup(@logfile)
|
21
21
|
Filum.logger.info "Configuring Daemon"
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
config.access_key = propono_config[:access_key]
|
27
|
-
config.secret_key = propono_config[:secret_key]
|
28
|
-
config.queue_region = propono_config[:region]
|
29
|
-
config.application_name = propono_config[:application_name]
|
30
|
-
config.queue_suffix = propono_config[:queue_suffix]
|
31
|
-
config.udp_host = "pergo.meducation.net"
|
32
|
-
config.udp_port = "9732"
|
33
|
-
config.logger = Filum.logger
|
34
|
-
end
|
35
|
-
end
|
23
|
+
propono_config = parse_config_file('propono.yml')
|
24
|
+
|
25
|
+
propono_setup(propono_config)
|
36
26
|
|
37
27
|
after_configure if respond_to?(:after_configure)
|
38
28
|
end
|
@@ -43,7 +33,16 @@ module Larva
|
|
43
33
|
hash = YAML::load(contents)
|
44
34
|
hash.stringify_keys[@env].symbolize_keys
|
45
35
|
rescue
|
46
|
-
|
36
|
+
Hash.new()
|
37
|
+
end
|
38
|
+
|
39
|
+
def propono_setup(propono_config)
|
40
|
+
Propono.config do |config|
|
41
|
+
config.queue_region = propono_config.delete(:region) # Backwards compatible with region key instead of queue_region
|
42
|
+
config.logger = Filum.logger
|
43
|
+
|
44
|
+
propono_config.each { |key, value| config.send("#{key}=", value) }
|
45
|
+
end
|
47
46
|
end
|
48
47
|
end
|
49
48
|
end
|
data/lib/larva/version.rb
CHANGED
data/template/config/propono.yml
CHANGED
@@ -4,9 +4,15 @@ development:
|
|
4
4
|
region: eu-west-1
|
5
5
|
application_name: development_larva_spawn
|
6
6
|
queue_suffix:
|
7
|
+
max_retries: 1
|
8
|
+
udp_host: pergo.meducation.net
|
9
|
+
udp_port: '9732'
|
7
10
|
|
8
11
|
production:
|
9
12
|
use_iam_profile: true
|
10
13
|
region: eu-west-1
|
11
14
|
application_name: larva_spawn
|
12
15
|
queue_suffix:
|
16
|
+
max_retries: 1
|
17
|
+
udp_host: pergo.meducation.net
|
18
|
+
udp_port: '9732'
|
data/test/configurator_test.rb
CHANGED
@@ -37,6 +37,7 @@ module Larva
|
|
37
37
|
assert_equal "pergo.meducation.net", Propono.config.udp_host
|
38
38
|
assert_equal "9732", Propono.config.udp_port
|
39
39
|
assert_equal Filum.logger, Propono.config.logger
|
40
|
+
assert_equal 1, Propono.config.max_retries
|
40
41
|
end
|
41
42
|
|
42
43
|
def test_propono_gets_config_with_env
|
@@ -47,6 +48,7 @@ module Larva
|
|
47
48
|
assert_equal "pergo.meducation.net", Propono.config.udp_host
|
48
49
|
assert_equal "9732", Propono.config.udp_port
|
49
50
|
assert_equal Filum.logger, Propono.config.logger
|
51
|
+
assert_equal 1, Propono.config.max_retries
|
50
52
|
end
|
51
53
|
end
|
52
54
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: larva
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iHiD
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: propono
|