mio-config 2.7.0 → 2.8.0

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
  SHA1:
3
- metadata.gz: c8b6b243300c3083c1a5540dd94177b73e24a104
4
- data.tar.gz: 278e7029b67ef01b549a5a47f37541304fdce68f
3
+ metadata.gz: 4d9b652b60ae5d56d9cb9d8aef145fdb110b8097
4
+ data.tar.gz: d4436173c3cbe8ddac32dbc3e96cdfc2e4af09c2
5
5
  SHA512:
6
- metadata.gz: 2607af90354a21186af46b681dd36ac25c010b8983a3a706a5aa6fa8e6a23f2d76758a9d4e6874a5f28490ea97edfcd3fa9a0880b0e614d4c527bfb4471062f3
7
- data.tar.gz: f0b26cfffecb9ff48aaf8f6629c471910f6c774523fb6a6499a7fdfede077b733b6d46c78ea81b47c7a300180525839528671600082cf254100176d7ed001b93
6
+ metadata.gz: 90551695d42935ca425be305015aa07060c640427a92442ba10b2305d692f97116c22605348bfd6b78b671c48302bb19cc697a74205ff6cae620a26372fd2452
7
+ data.tar.gz: 39e3c5a9514ee6701b0bc40d8c13ad772943f82ea38f8b19aee31625b228e0ba80fcff81f986ce6ec6bd731c821cb98ac59c8addf1095560d73797b41911b5df
@@ -5,8 +5,6 @@ class Mio
5
5
 
6
6
  field :name, String, 'Script name'
7
7
  field :displayName, String, 'Script Display name'
8
- field :key, String, 'AWS API Key with access to S3'
9
- field :secret, String, 'AWS secret'
10
8
  field :visibility, Array, 'Ids of the accounts which may see the import action', [4]
11
9
  field :script, String, 'The groovy script (inline) ', '"File.read(/path/to/script.groovy)"'
12
10
  field :jars, Array, 'JARs to load on remote, empty for none', []
@@ -0,0 +1,39 @@
1
+ class Mio
2
+ class Model
3
+ class GroovyScriptDecision < Model
4
+ set_resource :actions
5
+
6
+ field :name, String, 'Script name'
7
+ field :displayName, String, 'Script Display name'
8
+ field :visibility, Array, 'Ids of the accounts which may see the import action', [4]
9
+ field :script, String, 'The groovy script (inline) ', '"File.read(/path/to/script.groovy)"'
10
+ field :jars, Array, 'JARs to load on remote, empty for none', []
11
+ field :imports, Array, 'Imports to reference within groovy script, empty for none', []
12
+
13
+ field :enable, Symbol, ':true or :false', :true
14
+ field :start, Symbol, ':true or :false', :true
15
+
16
+ def create_hash
17
+ plugin = 'tv.nativ.mio.plugins.actions.decision.ScriptedDecisionCommand'
18
+ {name: @args.name,
19
+ pluginClass: plugin,
20
+ visibilityIds: @args.visibility,
21
+ type: 'script',
22
+ runRuleExpression: ''
23
+ }
24
+ end
25
+
26
+ def config_hash
27
+ {'script_type': {
28
+ script: @args.script
29
+ },
30
+ imports: {
31
+ 'jar-url': @args.jars.map{|jar| {value: jar, isExpression: false}},
32
+ import: @args.imports.map{|import| {value: import, isExpression: false}}
33
+ }
34
+ }
35
+ end
36
+ end
37
+ end
38
+ end
39
+
@@ -5,8 +5,6 @@ class Mio
5
5
 
6
6
  field :name, String, 'Script name'
7
7
  field :displayName, String, 'Script Display name'
8
- field :key, String, 'AWS API Key with access to S3'
9
- field :secret, String, 'AWS secret'
10
8
  field :visibility, Array, 'Ids of the accounts which may see the import action', [4]
11
9
  field :script, String, 'The groovy script (inline) ', '"File.read(/path/to/script.groovy)"'
12
10
  field :jars, Array, 'JARs to load on remote, empty for none', []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mio-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jspc
@@ -112,6 +112,7 @@ files:
112
112
  - "./lib/mio/model/autoload.rb"
113
113
  - "./lib/mio/model/email_message_action.rb"
114
114
  - "./lib/mio/model/groovy_script.rb"
115
+ - "./lib/mio/model/groovy_script_decision.rb"
115
116
  - "./lib/mio/model/groovy_script_wait.rb"
116
117
  - "./lib/mio/model/hotfolder.rb"
117
118
  - "./lib/mio/model/import_action.rb"