traject_plus 1.1.0 → 1.1.1

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
  SHA256:
3
- metadata.gz: 9e88950f9930b74cc29eaf7d62b55c255e3f29e471f73abfcdbd7c2456e604bc
4
- data.tar.gz: bb058742cce2434abc341dc72cd76928cf856afc149fc681122819fdc9022897
3
+ metadata.gz: c18d033097eab64e2209c9762873526fda99fd42254782e83206fba4ab779890
4
+ data.tar.gz: feb3cfd62ff34bf7ad9060de0f8810f64e21accc9f67c7701c4cff448b88af25
5
5
  SHA512:
6
- metadata.gz: 942616c2a50191ee8a1f30d10fbfb718bade0c99adc9d5181aca0d8087b6fea2f264f36434f0e1341cd03da871cf33cc14e172320d2ba877230cfcab75b352f7
7
- data.tar.gz: f5063714eac2c658c34d99ce8a7ce22d8ed45bef54ffe16945305f794034963e411b8e9c6f046867a8e90c3f9e4fffac900d32bab4dc67669cbaac7d4da9b732
6
+ metadata.gz: ec13570bb0385d5d3c713ef59b690dccea7dfb642bcf6c36b4326182897ea9fe7ad66c6b072acc77c1eecf2ae74d86f26ef1b6768b1748da0113ee17813f18b1
7
+ data.tar.gz: c5c8b80aff3d829bedde2e05b6cf3e57dbc52f4e3828415492ebbb0f6182081dbd8c0bbd4e608e5f076aa97a62f635a0d9ebb4956161c5617716e88008fce470
@@ -10,8 +10,12 @@ module TrajectPlus
10
10
  def transform_values(context, hash)
11
11
  hash.transform_values do |lambdas|
12
12
  accumulator = []
13
- Array(lambdas).each do |lambda|
14
- lambda.call(context.source_record, accumulator, context)
13
+ Array(lambdas).each do |aProc|
14
+ if aProc.arity == 2
15
+ aProc.call(context.source_record, accumulator)
16
+ else
17
+ aProc.call(context.source_record, accumulator, context)
18
+ end
15
19
  end
16
20
  accumulator
17
21
  end
@@ -1,3 +1,3 @@
1
1
  module TrajectPlus
2
- VERSION = "1.1.0".freeze
2
+ VERSION = "1.1.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: traject_plus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2019-03-04 00:00:00.000000000 Z
14
+ date: 2019-03-12 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport