metacrunch 4.0.2 → 4.0.3

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: efe3e6ad4f2c60ad8dd2f897060f14861099b53d
4
- data.tar.gz: 24f789384f21baba28885d165554c2584f5f8cef
3
+ metadata.gz: 6cd1ffde611aeb9af20078f87408261f3dfa1f85
4
+ data.tar.gz: 279a857dbb4907237a86deeac815feeebe9b20dc
5
5
  SHA512:
6
- metadata.gz: a8150745f8ab56e4ff5645a8290782b5df3e2f638da061b7689a8156ca1fb2b5f20082030eacc904c1d36da1da00b7683192dadb585c1c1bb6a1eb5932eb14f6
7
- data.tar.gz: 5f9e2848e4d788cdc48b2a9ec071beefdef93752b72dab9ffec7e651155fa589f2e9a00b274d8c32f3278dbd14d67341a6c6bfb3d36fe096a438683e98ff9468
6
+ metadata.gz: a3a0257a6bf2fc1cdac8ce1414f7b1c1185c218983412dce4ba0f98f2f8a4cd9719acc105c12e96e12ca32ebcbbaa1ac403774354b451c9044697833d087596f
7
+ data.tar.gz: f16c860f681612118e43213406e5b034cf648a21574d568d655c9e98d8ac2b29a70eb66333dbedde0bfb9a55a1566dbdbaee2000731e9eefd377a50586047369
@@ -82,7 +82,7 @@ module Metacrunch
82
82
  end
83
83
 
84
84
  # Run all transformations a last time to flush existing buffers
85
- data = run_transformations(data = nil, flush_buffers: true)
85
+ data = run_transformations(nil, flush_buffers: true)
86
86
  write_destination(data)
87
87
 
88
88
  # Close destination
@@ -120,14 +120,14 @@ module Metacrunch
120
120
  def run_transformations(data, flush_buffers: false)
121
121
  transformations.each do |transformation|
122
122
  if transformation.is_a?(Buffer)
123
- if data.present?
123
+ if data
124
124
  data = transformation.buffer(data)
125
125
  data = transformation.flush if flush_buffers
126
126
  else
127
127
  data = transformation.flush
128
128
  end
129
129
  else
130
- data = transformation.call(data) if data.present?
130
+ data = transformation.call(data) if data
131
131
  end
132
132
  end
133
133
 
@@ -135,7 +135,7 @@ module Metacrunch
135
135
  end
136
136
 
137
137
  def write_destination(data)
138
- destination.write(data) if destination
138
+ destination.write(data) if destination && data
139
139
  end
140
140
 
141
141
  end
@@ -1,3 +1,3 @@
1
1
  module Metacrunch
2
- VERSION = "4.0.2"
2
+ VERSION = "4.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metacrunch
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Sprotte