mushy 0.18.0 → 0.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hey.mushy +29 -0
- data/lib/mushy/builder/index.rb +19 -5
- data/lib/mushy/fluxs/bash.rb +2 -0
- data/lib/mushy/fluxs/browser.rb +2 -0
- data/lib/mushy/fluxs/build_csv.rb +1 -0
- data/lib/mushy/fluxs/cli.rb +2 -1
- data/lib/mushy/fluxs/collection.rb +3 -1
- data/lib/mushy/fluxs/document.rb +2 -0
- data/lib/mushy/fluxs/environment.rb +2 -1
- data/lib/mushy/fluxs/file_watch.rb +2 -1
- data/lib/mushy/fluxs/filter.rb +2 -0
- data/lib/mushy/fluxs/format.rb +2 -0
- data/lib/mushy/fluxs/git_log.rb +2 -0
- data/lib/mushy/fluxs/global_variables.rb +2 -1
- data/lib/mushy/fluxs/interval.rb +2 -0
- data/lib/mushy/fluxs/ls.rb +2 -0
- data/lib/mushy/fluxs/parse_html.rb +1 -0
- data/lib/mushy/fluxs/pdf.rb +1 -0
- data/lib/mushy/fluxs/pwd.rb +2 -0
- data/lib/mushy/fluxs/read_csv.rb +1 -0
- data/lib/mushy/fluxs/read_file.rb +1 -0
- data/lib/mushy/fluxs/read_json.rb +1 -0
- data/lib/mushy/fluxs/screenshot.rb +1 -0
- data/lib/mushy/fluxs/sense_hat_environmental_sensors.rb +2 -0
- data/lib/mushy/fluxs/sense_hat_led_matrix.rb +2 -0
- data/lib/mushy/fluxs/simple_python_program.rb +1 -0
- data/lib/mushy/fluxs/smtp.rb +2 -1
- data/lib/mushy/fluxs/stdout.rb +2 -1
- data/lib/mushy/fluxs/times.rb +2 -0
- data/lib/mushy/fluxs/twilio_message.rb +2 -1
- data/lib/mushy/fluxs/write_file.rb +1 -0
- data/lib/mushy/fluxs/write_json.rb +1 -0
- data/mushy.gemspec +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d783dd461abacb6686c2e131fc228d2640f1dda9836d1c49c1073f7e37054739
|
4
|
+
data.tar.gz: 950f0fd45cb88001fe62d3f1541374c2df5a1f3ff931b19d3a40f4a6fd187fb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15b49ebac4c571ab8f2c34450516f0325b70a3e85e7bd909bdd800c29a74ee7377297fa5128f8d7b5458ec278768e92cafbd8af552321f372d26a9a743d8ebb1
|
7
|
+
data.tar.gz: 8041bbd1b4f89af13edc858be699bc3903e4bea680ac68b0b2f26a744adc0b7230572034ade0367851b7f5201e3c51ca9a48095d7afd9300f5185ce2f2c0bd3f
|
data/hey.mushy
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"fluxs": [
|
3
|
+
{
|
4
|
+
"id": "0294b0c4-296f-44cd-9891-95fe75ebe4d2",
|
5
|
+
"name": "Start it up",
|
6
|
+
"flux": "Cli",
|
7
|
+
"parents": [
|
8
|
+
|
9
|
+
],
|
10
|
+
"config": {
|
11
|
+
"model": {
|
12
|
+
}
|
13
|
+
}
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"id": "7779dce1-1ce8-4241-8e94-ddcd5cb4f8df",
|
17
|
+
"name": "Output something",
|
18
|
+
"flux": "Stdout",
|
19
|
+
"parents": [
|
20
|
+
"0294b0c4-296f-44cd-9891-95fe75ebe4d2"
|
21
|
+
],
|
22
|
+
"config": {
|
23
|
+
"message": "Hello.",
|
24
|
+
"model": {
|
25
|
+
}
|
26
|
+
}
|
27
|
+
}
|
28
|
+
]
|
29
|
+
}
|
data/lib/mushy/builder/index.rb
CHANGED
@@ -62,7 +62,9 @@ module Mushy
|
|
62
62
|
</header>
|
63
63
|
<section class="modal-card-body">
|
64
64
|
<div class="content">
|
65
|
-
<div v-for="(
|
65
|
+
<div v-for="(fluxGroup) in fluxGroups">
|
66
|
+
<h2 style="font-style:italic">{{fluxGroup.name}}</h2>
|
67
|
+
<div v-for="(fluxType, id) in fluxGroup.fluxs">
|
66
68
|
<div class="level">
|
67
69
|
<div class="level-left"><h2>{{fluxType.title || fluxType.name}}</h2></div>
|
68
70
|
<div class="level-right">
|
@@ -87,6 +89,7 @@ module Mushy
|
|
87
89
|
<div v-for="(a, b) in fluxType.documentation" v-if="fluxType['detailsTab'] == b" v-html="a"></div>
|
88
90
|
</div>
|
89
91
|
</div>
|
92
|
+
</div>
|
90
93
|
</div>
|
91
94
|
</section>
|
92
95
|
<footer class="modal-card-foot">
|
@@ -236,7 +239,7 @@ module Mushy
|
|
236
239
|
};
|
237
240
|
},
|
238
241
|
props: ['label', 'value', 'options', 'description', 'shrink'],
|
239
|
-
template: '<div><div class="level"><div class="level-left"><div class="level-item"><mip-label :id="id" :label="label" :description="description" :hide_description="shrink && !value"></mip-label></div><div class="level-item"> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a></div></div></div> <span v-for="option in options" v-if="value && value.includes(option.id)">{{option.name}} <a href="#" v-on:click.prevent.stop="remove(option.id, value);$emit(\\'update:value\\', value)">[X]</a> </span> <
|
242
|
+
template: '<div><div class="level"><div class="level-left"><div class="level-item"><mip-label :id="id" :label="label" :description="description" :hide_description="shrink && !value"></mip-label></div><div class="level-item"> <a href="#" v-on:click.prevent.stop="shrink=false" v-show="shrink && !value">[^]</a></div></div></div> <span v-for="option in options" v-if="value && value.includes(option.id)">{{option.name}} <a href="#" v-on:click.prevent.stop="remove(option.id, value);$emit(\\'update:value\\', value)">[X]</a> </span> <div class="control"><select :name="id" v-if="value || !shrink" v-on:input="selectedValue=$event.target.value;" class="select" v-on:change.prevent.stop="doit(selectedValue, value);$emit(\\'update:value\\', value);$event.target.value=\\'\\';"><option v-for="option in options" v-bind:value="option.id">{{option.name}}</option></select></div></div>'
|
240
243
|
},
|
241
244
|
boolean: {
|
242
245
|
props: ['label', 'value', 'options', 'description', 'shrink'],
|
@@ -324,7 +327,7 @@ module Mushy
|
|
324
327
|
});
|
325
328
|
}
|
326
329
|
|
327
|
-
var thingTemplate = '<div v-bind:class="{ \\\'ml-3\\\': data.foghat==\\\'free\\\', \\\'column\\\': data.foghat!=\\\'free\\\', \\\'is-full\\\': data.foghat!=\\\'half\\\' && data.foghat!=\\\'free\\\', \\\'is-half\\\': data.foghat==\\\'half\\\' }">';
|
330
|
+
var thingTemplate = '<div v-show="data.hide != true" v-bind:class="{ \\\'ml-3\\\': data.foghat==\\\'free\\\', \\\'column\\\': data.foghat!=\\\'free\\\', \\\'is-full\\\': data.foghat!=\\\'half\\\' && data.foghat!=\\\'free\\\', \\\'is-half\\\': data.foghat==\\\'half\\\' }">';
|
328
331
|
for (var property in components)
|
329
332
|
thingTemplate = thingTemplate + '<mip-' + property + ' v-if="data.type == \\'' + property + '\\'" :id="id" ' + components[property].props.map(function(x){ return ':' + x + '.sync="data.' + x + '"';}).join(' ') + '></mip-' + property + '>'
|
330
333
|
thingTemplate = thingTemplate + '</div>';
|
@@ -335,7 +338,7 @@ module Mushy
|
|
335
338
|
console: console,
|
336
339
|
}
|
337
340
|
},
|
338
|
-
props: ['data', 'value', 'id', 'model', 'foghat'],
|
341
|
+
props: ['data', 'value', 'id', 'model', 'foghat', 'hide'],
|
339
342
|
template: thingTemplate
|
340
343
|
});
|
341
344
|
|
@@ -385,6 +388,16 @@ module Mushy
|
|
385
388
|
x['detailsTab'] = Object.getOwnPropertyNames(x.documentation)[0];
|
386
389
|
} );
|
387
390
|
|
391
|
+
fluxGroups = []
|
392
|
+
fluxdata.fluxs.map(function(x) {
|
393
|
+
if (x.fluxGroup) {} else { x.fluxGroup = { name: 'Others', position: 999999 } };
|
394
|
+
rowboat = fluxGroups.filter(function(y) { return y.name == x.fluxGroup.name })[0];
|
395
|
+
if (rowboat) {} else { fluxGroups.push(x.fluxGroup); x.fluxGroup.fluxs = [] }
|
396
|
+
rowboat = fluxGroups.filter(function(y) { return y.name == x.fluxGroup.name })[0];
|
397
|
+
rowboat.fluxs.push(x);
|
398
|
+
} );
|
399
|
+
fluxGroups = fluxGroups.sort(function(x, y) { return (x.position || 1000) - (y.position || 1000); })
|
400
|
+
|
388
401
|
var configs = {};
|
389
402
|
fluxdata.fluxs.map(function(x){
|
390
403
|
configs[x.name] = x.config;
|
@@ -446,7 +459,7 @@ module Mushy
|
|
446
459
|
},
|
447
460
|
id: { type: 'hide', value: '' },
|
448
461
|
name: { type: 'text', value: '' },
|
449
|
-
flux: { type: 'select', value: fluxdata.fluxs[0].name, options: options},
|
462
|
+
flux: { type: 'select', value: fluxdata.fluxs[0].name, options: options, hide: true },
|
450
463
|
open_flux: { type: 'button', name: 'Select a Flux', foghat: 'free', medium: 'hey', color: 'is-primary',
|
451
464
|
click: function() {
|
452
465
|
Vue.set(app.setup.fluxTypeSelect, 'is-active', true);
|
@@ -566,6 +579,7 @@ module Mushy
|
|
566
579
|
},
|
567
580
|
configs: configs,
|
568
581
|
fluxTypes: fluxTypesWithDetails,
|
582
|
+
fluxGroups: fluxGroups,
|
569
583
|
setup: setup,
|
570
584
|
flux_name_for: function(ids, fluxes) {
|
571
585
|
var fluxs = fluxes.filter(function(x){ return ids.includes(x.id) });
|
data/lib/mushy/fluxs/bash.rb
CHANGED
data/lib/mushy/fluxs/browser.rb
CHANGED
data/lib/mushy/fluxs/cli.rb
CHANGED
@@ -5,7 +5,9 @@ module Mushy
|
|
5
5
|
def self.details
|
6
6
|
{
|
7
7
|
name: 'Collection',
|
8
|
-
|
8
|
+
title: 'Collect and retrieve events',
|
9
|
+
description: 'Collect and retrieve events for the flow.',
|
10
|
+
fluxGroup: { name: 'Flows' },
|
9
11
|
config: {
|
10
12
|
id: {
|
11
13
|
description: 'The path to the unique id in the body of the element.',
|
data/lib/mushy/fluxs/document.rb
CHANGED
@@ -5,7 +5,9 @@ module Mushy
|
|
5
5
|
def self.details
|
6
6
|
{
|
7
7
|
name: 'Document',
|
8
|
+
title: 'Make a multi-line liquid value',
|
8
9
|
description: 'Create a multi-line document.',
|
10
|
+
fluxGroup: { name: 'Flows' },
|
9
11
|
config: {
|
10
12
|
document: {
|
11
13
|
description: 'The multi-line document you wish to create.',
|
@@ -5,8 +5,9 @@ module Mushy
|
|
5
5
|
def self.details
|
6
6
|
{
|
7
7
|
name: 'Environment',
|
8
|
-
title: '
|
8
|
+
title: 'Pull environment variables',
|
9
9
|
description: 'Pull environment variables.',
|
10
|
+
fluxGroup: { name: 'Environment' },
|
10
11
|
config: {
|
11
12
|
variables: {
|
12
13
|
description: 'Map the environment variables to a new event.',
|
data/lib/mushy/fluxs/filter.rb
CHANGED
data/lib/mushy/fluxs/format.rb
CHANGED
@@ -5,7 +5,9 @@ module Mushy
|
|
5
5
|
def self.details
|
6
6
|
{
|
7
7
|
name: 'Format',
|
8
|
+
title: 'Alter the format of an event',
|
8
9
|
description: 'Return the event passed to it. This opens the opportunity to use the common fluxing to alter the event.',
|
10
|
+
fluxGroup: { name: 'Flows' },
|
9
11
|
config: {},
|
10
12
|
examples: {
|
11
13
|
"Simplest Example" => {
|
data/lib/mushy/fluxs/git_log.rb
CHANGED
@@ -7,7 +7,8 @@ module Mushy
|
|
7
7
|
def self.details
|
8
8
|
{
|
9
9
|
name: 'GlobalVariables',
|
10
|
-
title: '
|
10
|
+
title: 'Set global variables',
|
11
|
+
fluxGroup: { name: 'Flows' },
|
11
12
|
description: 'Add global variables to use in any future flux. Returns what was passed to it.',
|
12
13
|
config: {
|
13
14
|
values: {
|
data/lib/mushy/fluxs/interval.rb
CHANGED
data/lib/mushy/fluxs/ls.rb
CHANGED
data/lib/mushy/fluxs/pdf.rb
CHANGED
data/lib/mushy/fluxs/pwd.rb
CHANGED
@@ -5,7 +5,9 @@ module Mushy
|
|
5
5
|
def self.details
|
6
6
|
{
|
7
7
|
name: 'Pwd',
|
8
|
+
title: 'Get the working directory',
|
8
9
|
description: 'Run the "pwd" command.',
|
10
|
+
fluxGroup: { name: 'Environment' },
|
9
11
|
config: Mushy::Bash.details[:config].tap { |c| c.delete :command },
|
10
12
|
}.tap do |c|
|
11
13
|
c[:examples] = {
|
data/lib/mushy/fluxs/read_csv.rb
CHANGED
@@ -5,7 +5,9 @@ module Mushy
|
|
5
5
|
def self.details
|
6
6
|
{
|
7
7
|
name: 'SenseHatEnvironmentalSensors',
|
8
|
+
title: 'Read Environmental Sensors',
|
8
9
|
description: 'Pull values from the Sense HAT environmental sensors.',
|
10
|
+
fluxGroup: { name: 'SenseHAT' },
|
9
11
|
config: Mushy::SimplePythonProgram.default_config,
|
10
12
|
}.tap do |c|
|
11
13
|
measurements
|
@@ -5,7 +5,9 @@ module Mushy
|
|
5
5
|
def self.details
|
6
6
|
{
|
7
7
|
name: 'SenseHatLedMatrix',
|
8
|
+
title: 'Use LED Matrix',
|
8
9
|
description: 'Interface with the LED Matrix.',
|
10
|
+
fluxGroup: { name: 'SenseHAT' },
|
9
11
|
config: Mushy::SimplePythonProgram.default_config.tap do |config|
|
10
12
|
config[:get_pixels] = {
|
11
13
|
description: 'Specify the pixels you want returned as events. Use "all" to return all 64, 3,3 to return x:3 y:3, or "none" to return none.',
|
data/lib/mushy/fluxs/smtp.rb
CHANGED
data/lib/mushy/fluxs/stdout.rb
CHANGED
data/lib/mushy/fluxs/times.rb
CHANGED
@@ -5,7 +5,9 @@ module Mushy
|
|
5
5
|
def self.details
|
6
6
|
{
|
7
7
|
name: 'Times',
|
8
|
+
title: 'Repeat an event X times',
|
8
9
|
description: 'Return the event passed to it, X times.',
|
10
|
+
fluxGroup: { name: 'Flows' },
|
9
11
|
config: {
|
10
12
|
times: {
|
11
13
|
description: 'The number of times this event should be returned.',
|
@@ -7,6 +7,7 @@ module Mushy
|
|
7
7
|
name: 'WriteFile',
|
8
8
|
title: 'Write File',
|
9
9
|
description: 'Write a file.',
|
10
|
+
fluxGroup: { name: 'Files' },
|
10
11
|
config: file_saving_config.merge({
|
11
12
|
data: {
|
12
13
|
description: 'The text to write. You can use Liquid templating here to pull data from the event, or write hardcoded data.',
|
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.
|
7
|
+
s.version = '0.19.0'
|
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.
|
4
|
+
version: 0.19.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darren Cauthon
|
@@ -172,6 +172,7 @@ extensions: []
|
|
172
172
|
extra_rdoc_files: []
|
173
173
|
files:
|
174
174
|
- bin/mushy
|
175
|
+
- hey.mushy
|
175
176
|
- lib/mushy.rb
|
176
177
|
- lib/mushy/builder/api.rb
|
177
178
|
- lib/mushy/builder/axios.rb
|