little-dutch 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 910c339774c1fc072441d17ff0d4b3549743e417
4
- data.tar.gz: 600373a16055401f06edd5305102936a92dff76d
3
+ metadata.gz: d369024bb3b3c53cfbc05fef141ae6120f373fe5
4
+ data.tar.gz: d9bd89fe27a975228d83ea77b2e293866278b90d
5
5
  SHA512:
6
- metadata.gz: ef9cc921783612c37acf5e4d10fe8155d766e54ff15cf1525b02cf56a561b20fcef4a056d5f68fb295a17d057ae9c7b417491e8165db30c6c2fe10ecbe3121eb
7
- data.tar.gz: 776fe373d7431dc99b7c85667d33146dae6d6886899e065d6bd13aae19c7b418f825e52bb5e73a32cc44586e8ab9ae7be1e5e5373d698ea3ca86e1ff4059868e
6
+ metadata.gz: 8bb6b56e36329c5afafd1cdafb46dd5ad6da7b359d2059e9cd7d154d5a37b0837b980bd2f212327caa0a2fa78c2d44e55d26678a5b521d84662359e745e6a159
7
+ data.tar.gz: c2bd0fd6d1abd8404d7fae0ba5df518e893ea0c4ef23e41928859ce62c51a18ac4ab9b2ebe9639e85e44e44e0253d09dc5331f80739ae9b4bbcf15cbef64ab34
@@ -1,5 +1,5 @@
1
1
  module Little
2
2
  module Dutch
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
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 = File.expand_path File.join 'config', 'little-dutch.yml'
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.tap(&:rewind)
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
- config.logger.info url
53
- connection.post url, file: Faraday::UploadIO.new(file, 'application/json')
54
- file.close
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: little-dutch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Waldrip