experiment_arguments_log 0.0.1 → 0.0.2
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/experiment_arguments_log/auto.rb +5 -1
- data/lib/experiment_arguments_log.rb +19 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c4fa49cdfccc20f0c15a65ba21e7a2e7da63e66
|
|
4
|
+
data.tar.gz: 40440e2a2b91b48e82032a4d63101df3912a1876
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 28d0ac628e4724b2c58282d51e152ddab17167e658f3c283cd5cca3a314e629f958bfc93c22e02ebe06b0847800cf3d88d97eacb28df38af66d6aab9a440ca56
|
|
7
|
+
data.tar.gz: 0b6e4d5e4f5986e8ceb39b35d9b68d64cc0f97e16f178b03657f7b89d82ee9754c2682fe8cd0c126b0b45edfff50d715c7d44b2666bf4f986e34073f79aeb830
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
|
+
require 'stringio'
|
|
2
3
|
|
|
3
4
|
def experiment_arguments_log
|
|
4
5
|
if ENV['RUBY_EXPERIMENT_LOG']
|
|
@@ -51,5 +52,22 @@ def experiment_arguments_log
|
|
|
51
52
|
end
|
|
52
53
|
|
|
53
54
|
output.puts
|
|
55
|
+
|
|
56
|
+
if defined? $ruby_experiment_arguments_log
|
|
57
|
+
output.puts 'STDOUT:'
|
|
58
|
+
output.puts $ruby_experiment_arguments_log.string.lines[0..1024]
|
|
59
|
+
output.puts
|
|
60
|
+
end
|
|
54
61
|
end
|
|
55
|
-
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def capture_stdout
|
|
66
|
+
$ruby_experiment_arguments_log = StringIO.new
|
|
67
|
+
|
|
68
|
+
def $stdout.write string
|
|
69
|
+
$ruby_experiment_arguments_log.write string
|
|
70
|
+
super
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
metadata
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: experiment_arguments_log
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Krzysztof Wróbel
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-07-
|
|
11
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
|
-
description: Logs script execution arguments with head of
|
|
13
|
+
description: Logs script execution arguments with head of argument files and standard
|
|
14
|
+
output.
|
|
14
15
|
email: djstrong@gmail.com
|
|
15
16
|
executables: []
|
|
16
17
|
extensions: []
|
|
@@ -18,7 +19,7 @@ extra_rdoc_files: []
|
|
|
18
19
|
files:
|
|
19
20
|
- lib/experiment_arguments_log.rb
|
|
20
21
|
- lib/experiment_arguments_log/auto.rb
|
|
21
|
-
homepage:
|
|
22
|
+
homepage: https://github.com/djstrong/experiment_arguments_log
|
|
22
23
|
licenses:
|
|
23
24
|
- MIT
|
|
24
25
|
metadata: {}
|
|
@@ -41,5 +42,5 @@ rubyforge_project:
|
|
|
41
42
|
rubygems_version: 2.4.5
|
|
42
43
|
signing_key:
|
|
43
44
|
specification_version: 4
|
|
44
|
-
summary: Logs experiment execution arguments.
|
|
45
|
+
summary: Logs experiment execution arguments and output.
|
|
45
46
|
test_files: []
|