gloo 0.7.0 → 0.7.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: 2dc6eeb25e3bf4c7facfb697ba8329768c028160a1784eb28f164cb7b4003385
4
- data.tar.gz: 8fe4173c140780a134f19b48e253f3144434cce1c9724c2a4ffa26c5c511c7de
3
+ metadata.gz: 6ee9db940becd7ad3a92a145409a9c791d2e3e849e0db32ef6ce36ae4e7d9ac5
4
+ data.tar.gz: affbd0b5d4d33e382954a3abb044f5489299e9c10f93592afc37d7c41c8b8aea
5
5
  SHA512:
6
- metadata.gz: 8b3abba9ee1fe27d7c089314726c368bc7be08ba418572ee15193a2be81f3cad34cb7fdf4c1abe314da186bae5bc27d5b0bae18dc28f1a61ef77ed18f510a5b5
7
- data.tar.gz: 56a36064fbf90ade2952b695c51a8a338ec1f43219c9302c2b66f6bf487d20aa29b2f72dfb9fb59d30264be38c4a4cf76f504015ffb6cd981629528b122d0b35
6
+ metadata.gz: 4fdfc7f9e8b39f872d2272bec67550846c02ca4f4601fdf2888fa256158b2f6b89d64a68ca6791064ff2e365762982c24bffc7d69002bc81a6a0662c44083b7f
7
+ data.tar.gz: f0e156978cdf38255ad19384106a4d124acdb9350d0c1dade4932009d1010f3391c5448d743714160ce812d473c9bd0d37e928477fdd02a2af5e82ec15f4f1c9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gloo (0.7.0)
4
+ gloo (0.7.1)
5
5
  activesupport (~> 5.2, >= 5.2.4.3)
6
6
  chronic (~> 0.10, >= 0.10.2)
7
7
  colorize (~> 0.8, >= 0.8.1)
@@ -8,7 +8,7 @@ module Gloo
8
8
  module App
9
9
  class Info
10
10
 
11
- VERSION = '0.7.0'.freeze
11
+ VERSION = '0.7.1'.freeze
12
12
  APP_NAME = 'Gloo'.freeze
13
13
 
14
14
  #
@@ -34,4 +34,4 @@ ERB OBJECT TYPE
34
34
  show e.erb.result
35
35
 
36
36
  SEE ALSO
37
- eval, system
37
+ eval, system, execute
@@ -21,4 +21,4 @@ EVAL OBJECT TYPE
21
21
  result [string] : 21
22
22
 
23
23
  SEE ALSO
24
- system, erb
24
+ system, erb, execute
@@ -29,4 +29,4 @@ SYSTEM OBJECT TYPE
29
29
  result [string] :
30
30
 
31
31
  SEE ALSO
32
- eval, erb
32
+ execute, eval, erb
@@ -0,0 +1,27 @@
1
+ EXECUTE VERB
2
+ NAME: execute
3
+ SHORTCUT: exec
4
+
5
+ DESCRIPTION
6
+ Execute a shell command.
7
+
8
+ SYNTAX
9
+ exec <expression>
10
+
11
+ PARAMETERS
12
+ expression
13
+ - Evaluate the expression and execute in the shell.
14
+
15
+ RESULT
16
+ none
17
+
18
+ ERRORS
19
+ Missing Expression!
20
+ - No expression is provided as parameter to the verb.
21
+
22
+ EXAMPLE
23
+
24
+ > exec 'rake test'
25
+
26
+ SEE ALSO
27
+ system, eval, erb
@@ -0,0 +1,46 @@
1
+ # Author:: Eric Crane (mailto:eric.crane@mac.com)
2
+ # Copyright:: Copyright (c) 2020 Eric Crane. All rights reserved.
3
+ #
4
+ # Execute a shell command.
5
+ #
6
+
7
+ module Gloo
8
+ module Verbs
9
+ class Execute < Gloo::Core::Verb
10
+
11
+ KEYWORD = 'execute'.freeze
12
+ KEYWORD_SHORT = 'exec'.freeze
13
+ MISSING_EXPR_ERR = 'Missing Expression!'.freeze
14
+
15
+ #
16
+ # Run the verb.
17
+ #
18
+ def run
19
+ if @tokens.token_count < 2
20
+ $engine.err MISSING_EXPR_ERR
21
+ return
22
+ end
23
+
24
+ expr = Gloo::Expr::Expression.new( @tokens.params )
25
+ system expr.evaluate, chdir: Dir.pwd
26
+ # `#{expr.evaluate}`
27
+ # exec expr.evaluate
28
+ end
29
+
30
+ #
31
+ # Get the Verb's keyword.
32
+ #
33
+ def self.keyword
34
+ return KEYWORD
35
+ end
36
+
37
+ #
38
+ # Get the Verb's keyword shortcut.
39
+ #
40
+ def self.keyword_shortcut
41
+ return KEYWORD_SHORT
42
+ end
43
+
44
+ end
45
+ end
46
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gloo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Crane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-11 00:00:00.000000000 Z
11
+ date: 2020-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -301,6 +301,7 @@ files:
301
301
  - lib/gloo/help/verbs/cls.txt
302
302
  - lib/gloo/help/verbs/context.txt
303
303
  - lib/gloo/help/verbs/create.txt
304
+ - lib/gloo/help/verbs/execute.txt
304
305
  - lib/gloo/help/verbs/help.txt
305
306
  - lib/gloo/help/verbs/if.txt
306
307
  - lib/gloo/help/verbs/list.txt
@@ -364,6 +365,7 @@ files:
364
365
  - lib/gloo/verbs/cls.rb
365
366
  - lib/gloo/verbs/context.rb
366
367
  - lib/gloo/verbs/create.rb
368
+ - lib/gloo/verbs/execute.rb
367
369
  - lib/gloo/verbs/help.rb
368
370
  - lib/gloo/verbs/if.rb
369
371
  - lib/gloo/verbs/list.rb