franz 2.1.1 → 2.1.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Readme.md +6 -3
  3. data/VERSION +1 -1
  4. data/lib/franz/input.rb +16 -7
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed57e3895c08ceb9e4c790783ebfc818b842a2a6
4
- data.tar.gz: 3587e83adc31b60feb0414a58b972d2189e16910
3
+ metadata.gz: 1ae7856e2d7713447574ee45c211da9c187dd7fc
4
+ data.tar.gz: 306ffc90c9b66d9ca5a84f339d885af48b645fa2
5
5
  SHA512:
6
- metadata.gz: 6cc0f13bf692545d9c3dac1f7e24499dd8340c3a7985baf13baa098494ea4651195b54f11b0c40f9c988cc78f3d1eacfef7c1fd37bf6e5ea5ea226a3e753bd5c
7
- data.tar.gz: 7fe602a97448c1fb006d916a9774c143fdbfc352d69ccbe32d5be9b1506999212cf538901bc6e0210f3ff4d9e4b1ea42bfc6fea91c1c6d6f2e7f774cb0406896
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.0
218
+ #### v2.1
219
219
 
220
- - Self-contained packages now available for OS X and Linux thanks to [Traveling Ruby](http://phusion.github.io/traveling-ruby) and [FPM](https://github.com/jordansissel/fpm).
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.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
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
- old_checkpoints = Dir[@checkpoint_glob].sort_by { |p| File.mtime p }
177
- path = @checkpoint_path % Time.now
178
- File.open(path, 'w') { |f| f.write Marshal.dump(state) }
179
- old_checkpoints.pop # Keep last two checkpoints
180
- old_checkpoints.map { |c| FileUtils.rm c }
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.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-18 00:00:00.000000000 Z
11
+ date: 2015-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slog