tresse 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/tresse.rb +11 -6
- 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: 75e4b902710be0f597feab968d7b8fbcfbfa221f
|
4
|
+
data.tar.gz: c0fa95c1637ab3391138bc27424bd916dd1e74d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62bbacc7d76b0c80eb11401221c6e4a088c97ea40d077344b5fa05fee41e77dfb36b0a28600cc1eba1e7c2f38607b44e164358e4d9e66f1fa82d185ad516f6d0
|
7
|
+
data.tar.gz: 4cc9b5c16c00f742e509853d26ae7a6547650c67ba01d4b9a11da57ad55156b57d761f631b0b5b23d7c079304553cb380093479622c31f5d4003d8c633b80d9d
|
data/CHANGELOG.md
CHANGED
data/lib/tresse.rb
CHANGED
@@ -4,7 +4,7 @@ require 'thread'
|
|
4
4
|
|
5
5
|
module Tresse
|
6
6
|
|
7
|
-
VERSION = '1.1.
|
7
|
+
VERSION = '1.1.2'
|
8
8
|
|
9
9
|
class << self
|
10
10
|
|
@@ -144,11 +144,9 @@ module Tresse
|
|
144
144
|
#
|
145
145
|
# sourcing methods
|
146
146
|
|
147
|
-
def source(
|
147
|
+
def source(&block)
|
148
148
|
|
149
|
-
|
150
|
-
|
151
|
-
@batches << batch
|
149
|
+
@batches << Tresse::Batch.new(self, block)
|
152
150
|
|
153
151
|
self
|
154
152
|
end
|
@@ -190,7 +188,14 @@ module Tresse
|
|
190
188
|
|
191
189
|
def flatten
|
192
190
|
|
193
|
-
do_reduce(
|
191
|
+
do_reduce(
|
192
|
+
[],
|
193
|
+
lambda { |a, e|
|
194
|
+
if e.respond_to?(:to_a) && ! e.is_a?(Hash)
|
195
|
+
a.concat(e.to_a)
|
196
|
+
else
|
197
|
+
a.push(e)
|
198
|
+
end })
|
194
199
|
end
|
195
200
|
alias values flatten
|
196
201
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tresse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Mettraux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|