little-dutch 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/little-dutch/version.rb +1 -1
- data/lib/little-dutch.rb +7 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d369024bb3b3c53cfbc05fef141ae6120f373fe5
|
4
|
+
data.tar.gz: d9bd89fe27a975228d83ea77b2e293866278b90d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bb6b56e36329c5afafd1cdafb46dd5ad6da7b359d2059e9cd7d154d5a37b0837b980bd2f212327caa0a2fa78c2d44e55d26678a5b521d84662359e745e6a159
|
7
|
+
data.tar.gz: c2bd0fd6d1abd8404d7fae0ba5df518e893ea0c4ef23e41928859ce62c51a18ac4ab9b2ebe9639e85e44e44e0253d09dc5331f80739ae9b4bbcf15cbef64ab34
|
data/lib/little-dutch/version.rb
CHANGED
data/lib/little-dutch.rb
CHANGED
@@ -7,7 +7,7 @@ require 'little-dutch/configuration'
|
|
7
7
|
module LittleDutch
|
8
8
|
extend self
|
9
9
|
|
10
|
-
CONFIG_FILE
|
10
|
+
CONFIG_FILE = File.expand_path File.join 'config', 'little-dutch.yml'
|
11
11
|
|
12
12
|
def config
|
13
13
|
@config ||= Configuration.new(CONFIG_FILE)
|
@@ -32,7 +32,7 @@ module LittleDutch
|
|
32
32
|
@runcount = 0
|
33
33
|
loop do
|
34
34
|
@runcount += 1
|
35
|
-
post_json ObjectSpace.dump_all
|
35
|
+
post_json ObjectSpace.dump_all
|
36
36
|
sleep config.interval
|
37
37
|
end
|
38
38
|
end
|
@@ -49,9 +49,11 @@ module LittleDutch
|
|
49
49
|
url = URI.parse(config.endpoint)
|
50
50
|
url.path = "/r/#{config.app_name}/#{config.instance_id}/#{@runcount}"
|
51
51
|
url.query = { token: config.token }.to_param
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
path = file.tap(&:close).path
|
53
|
+
curl_cmd = <<-SHELL
|
54
|
+
curl -X POST -H "Transfer-Encoding: chunked" -H "Content-Type: application/text" --data-binary @#{path} #{url.to_s}
|
55
|
+
SHELL
|
56
|
+
Process.spawn curl_cmd, out: config.logfile, err: config.logfile
|
55
57
|
end
|
56
58
|
|
57
59
|
end
|