franz 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +6 -3
- data/VERSION +1 -1
- data/lib/franz/input.rb +16 -7
- 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: 1ae7856e2d7713447574ee45c211da9c187dd7fc
|
4
|
+
data.tar.gz: 306ffc90c9b66d9ca5a84f339d885af48b645fa2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6d84ae2fda56f5d524372902bcf367ab6d7647a05be9cf5164c20df0b60484eb747f46517f52f519653503127fe4204af930d5977a0a98032dcab15458374d7
|
7
|
+
data.tar.gz: f94863b21ced9961a9dee7c08b3401f919d5d75ec0ccb6e194264f606aacef372e7ea5a0ddf74e987c61636c774071d32d8de0abca575e6a1fcef470c689e9df
|
data/Readme.md
CHANGED
@@ -215,11 +215,14 @@ for Chef.
|
|
215
215
|
|
216
216
|
### Changelog
|
217
217
|
|
218
|
-
#### v2.1
|
218
|
+
#### v2.1
|
219
219
|
|
220
|
-
- Self-contained packages
|
220
|
+
- Self-contained packages for OS X and Linux thanks to [Traveling Ruby](http://phusion.github.io/traveling-ruby) and [FPM](https://github.com/jordansissel/fpm)
|
221
|
+
- Dockerization using self-contained Linux package [available on the Docker Hub](https://registry.hub.docker.com/u/sczizzo/franz)
|
222
|
+
- Running Franz without arguments now prints help text (i.e. `--config` is now required)
|
223
|
+
- Allow single state file if no glob is used
|
221
224
|
|
222
|
-
#### v2.0
|
225
|
+
#### v2.0
|
223
226
|
|
224
227
|
- Added new outputs: `StdOut`, `Kafka` (experimental)
|
225
228
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.2
|
data/lib/franz/input.rb
CHANGED
@@ -171,15 +171,24 @@ module Franz
|
|
171
171
|
return stats
|
172
172
|
end
|
173
173
|
|
174
|
-
# Write a checkpoint file given the current state
|
174
|
+
# Write a checkpoint file given the current state. If a glob is provided,
|
175
|
+
# Franz will write a checkpoint with the current Unix timestamp, keeping
|
176
|
+
# the last two files for posterity
|
175
177
|
def checkpoint
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
178
|
+
path = if @checkpoint_path == @checkpoint_glob
|
179
|
+
File.open(@checkpoint_path, 'w') { |f| f.write Marshal.dump(state) }
|
180
|
+
@checkpoint_path
|
181
|
+
else
|
182
|
+
old_checkpoints = Dir[@checkpoint_glob].sort_by { |p| File.mtime p }
|
183
|
+
path = @checkpoint_path % Time.now
|
184
|
+
File.open(path, 'w') { |f| f.write Marshal.dump(state) }
|
185
|
+
old_checkpoints.pop # Keep last two checkpoints
|
186
|
+
old_checkpoints.map { |c| FileUtils.rm c }
|
187
|
+
path
|
188
|
+
end
|
181
189
|
log.debug \
|
182
|
-
event: 'input checkpoint saved'
|
190
|
+
event: 'input checkpoint saved',
|
191
|
+
path: path
|
183
192
|
end
|
184
193
|
|
185
194
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: franz
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Clemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slog
|