mushy 0.5.2 → 0.5.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8d94c18f18225b3d7b04d1c78731a2d1211e444f8685a4c812368b8025b4357
4
- data.tar.gz: 9df6cbd619217e2d24e8495ad104f49ddb5fc0e68d22ce5098f9a5e39067f85c
3
+ metadata.gz: 06d11ce2fc1a5da26f1272caf5b4b8a5bc7e8ff110b0169932778b9bdb7bb2bc
4
+ data.tar.gz: 96b68f95bff616ff46084d97630d0eab8d1496a99e902efae7fad965a16485dd
5
5
  SHA512:
6
- metadata.gz: 77474ee6b3b8ef571cd3283896c2c9a30bb2b245cc07ad357f2128ab82d5eec3092ae4eb374111b0baffa061b14257ad6daacd9adadf7fb00185c94c032b7bf3
7
- data.tar.gz: 1a5019513bd3223d4106938518026e1790764bf927e14a776b4d9c42889e1b1e380973efe61fb93e81d25db200ba53bffc51dacb8f571c711e646e7b80edf078
6
+ metadata.gz: efc7c6b028efa5c75033b92ff9db8b422c6d81aae240a48178371b4208c1231ac63d8a2e437acfaccddb9e8a233c263b0284c85b16678036f99125f6ed757f6c
7
+ data.tar.gz: 5d19241ba64eddd10937f09aeb19d5c3d809d68e8ca100b7d94e64362e8a1a32fc0da56fabf7aeebd6f6303be5cce00db382333400f8e000c408535f63ad64f1
@@ -93,6 +93,7 @@ module Mushy
93
93
  details[:config][:limit] = { type: 'integer', shrink: true, description: 'Limit the number of events to this number.', default: '' }
94
94
  details[:config][:join] = { type: 'text', shrink: true, description: 'Join all of the events from this flux into one event, under this name.', default: '' }
95
95
  details[:config][:sort] = { type: 'text', shrink: true, description: 'Sort by this key.', default: '' }
96
+ details[:config][:ignore] = { type: 'text', shrink: true, description: 'Ignore these keys.', value: '', default: '' }
96
97
  details[:config][:model] = { type: 'keyvalue', shrink: true, description: 'Reshape the outgoing events.', value: {}, default: {} }
97
98
 
98
99
  details[:config][:error_strategy] = {
data/lib/mushy/flux.rb CHANGED
@@ -91,7 +91,7 @@ module Mushy
91
91
  end
92
92
 
93
93
  def shape_these results, event, config
94
- supported_shaping = [:merge, :outgoing_split, :group, :model, :join, :sort, :limit]
94
+ supported_shaping = [:merge, :outgoing_split, :group, :model, :ignore, :join, :sort, :limit]
95
95
 
96
96
  shaping = supported_shaping
97
97
  if (config[:shaping])
@@ -136,6 +136,13 @@ module Mushy
136
136
  results.map { |x| masher.mash by, x }
137
137
  end
138
138
 
139
+ def ignore_these_results results, event, by
140
+ return results if by.to_s == ''
141
+ ignore_fields = by.split ','
142
+ results.each { |r| ignore_fields.each { |f| r.delete f } }
143
+ results
144
+ end
145
+
139
146
  def merge_these_results results, event, by
140
147
  keys_to_merge = convert_this_to_an_array by
141
148
  keys_to_merge = event.keys.map { |x| x.to_s } if (keys_to_merge[0] == '*')
@@ -41,7 +41,7 @@ module Mushy
41
41
  arguments = ['-A', '-l', '--full-time', '-i']
42
42
  arguments << '-R' if config[:recursive].to_s == 'true'
43
43
  arguments << '-d' if config[:directory_only].to_s == 'true'
44
- arguments << config[:path] if config[:path].to_s != ''
44
+ arguments << "'#{config[:path]}'" if config[:path].to_s != ''
45
45
  arguments
46
46
  end
47
47
 
@@ -107,7 +107,7 @@ module Mushy
107
107
  r[:date] = Time.parse r[:date]
108
108
  end
109
109
 
110
- result[:name] = segments.shift
110
+ result[:name] = segments.join ' '
111
111
 
112
112
  result.tap do |r|
113
113
  help_segments = r[:help].split ''
data/mushy.gemspec CHANGED
@@ -4,7 +4,7 @@ require 'mushy/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'mushy'
7
- s.version = '0.5.2'
7
+ s.version = '0.5.3'
8
8
  s.date = '2020-11-23'
9
9
  s.summary = 'Process streams of work using common modules.'
10
10
  s.description = 'This tool assists in the creation and processing of workflows.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mushy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Darren Cauthon