teepee 0.12.4 → 0.12.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/teepee/command-parser.rb +12 -4
- data/lib/teepee/commander.rb +26 -10
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de392b0bbaf4c52d34a7549e43cb3c2fe62f8039
|
4
|
+
data.tar.gz: 403695f81168571cec10f8be68722542ee9192d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b4d7176aec8026f58ed5be0703827fbe30c6197f0d7eb90a65709ade6043c80e2b46a1a01245be1ccf548bb97026aeaa03e939a73d8fc1991c97981caa50bca
|
7
|
+
data.tar.gz: f7b25f39125f07e409aaa3fa50c781be8abc515ea322a6959cca830bf170f313fbd58b4911792079718de7423ff99806ec78c9c58538435bbfaaf090df7f7e37
|
@@ -307,7 +307,8 @@ module Teepee
|
|
307
307
|
@@commander.- *numbers_from_expressions
|
308
308
|
when "*"
|
309
309
|
@@commander.* *numbers_from_expressions
|
310
|
-
when "/"
|
310
|
+
when "/",
|
311
|
+
"÷"
|
311
312
|
@@commander./ *numbers_from_expressions
|
312
313
|
when "%"
|
313
314
|
@@commander.% *numbers_from_expressions
|
@@ -374,18 +375,25 @@ module Teepee
|
|
374
375
|
@@commander.boolean_xnor expressions
|
375
376
|
when "<"
|
376
377
|
@@commander.less_than *numbers_from_expressions
|
377
|
-
when "<="
|
378
|
+
when "<=",
|
379
|
+
"≤"
|
378
380
|
@@commander.less_than_or_equal *numbers_from_expressions
|
379
381
|
when ">"
|
380
382
|
@@commander.greater_than *numbers_from_expressions
|
381
|
-
when ">="
|
383
|
+
when ">=",
|
384
|
+
"≥"
|
382
385
|
@@commander.greater_than_or_equal *numbers_from_expressions
|
383
386
|
when "="
|
384
387
|
@@commander.equal *numbers_from_expressions
|
385
|
-
when "!="
|
388
|
+
when "!=",
|
389
|
+
"≠"
|
386
390
|
@@commander.not_equal *numbers_from_expressions
|
387
391
|
when "if"
|
388
392
|
@@commander.if_operator expressions
|
393
|
+
when "when"
|
394
|
+
@@commander.when_operator expressions
|
395
|
+
when "unless"
|
396
|
+
@@commander.unless_operator expressions
|
389
397
|
when "do"
|
390
398
|
@@commander.do_operator expressions
|
391
399
|
else
|
data/lib/teepee/commander.rb
CHANGED
@@ -35,16 +35,6 @@
|
|
35
35
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
36
36
|
# POSSIBILITY OF SUCH DAMAGE.
|
37
37
|
|
38
|
-
require 'uri'
|
39
|
-
|
40
|
-
require 'active_support/all'
|
41
|
-
require 'monkey-patch'
|
42
|
-
|
43
|
-
require 'teepee/constants'
|
44
|
-
require 'teepee/errors'
|
45
|
-
|
46
|
-
include ERB::Util
|
47
|
-
|
48
38
|
module Teepee
|
49
39
|
class Commander
|
50
40
|
def valid_uri? uri
|
@@ -715,6 +705,19 @@ module Teepee
|
|
715
705
|
html_tag :u, expressions
|
716
706
|
end
|
717
707
|
|
708
|
+
def unless_operator expressions
|
709
|
+
expressions = strip expressions
|
710
|
+
conditional = expressions.first
|
711
|
+
expressions = strip expressions.rest
|
712
|
+
if false_constant? conditional
|
713
|
+
if expressions.length <= 1
|
714
|
+
expressions.first
|
715
|
+
else
|
716
|
+
do_operator expressions
|
717
|
+
end
|
718
|
+
end
|
719
|
+
end
|
720
|
+
|
718
721
|
def user user
|
719
722
|
if not user
|
720
723
|
command_error "user: error: no user specified"
|
@@ -722,5 +725,18 @@ module Teepee
|
|
722
725
|
tb_href "users/#{user}", user.to_s
|
723
726
|
end
|
724
727
|
end
|
728
|
+
|
729
|
+
def when_operator expressions
|
730
|
+
expressions = strip expressions
|
731
|
+
conditional = expressions.first
|
732
|
+
expressions = strip expressions.rest
|
733
|
+
if true_constant? conditional
|
734
|
+
if expressions.length <= 1
|
735
|
+
expressions.first
|
736
|
+
else
|
737
|
+
do_operator expressions
|
738
|
+
end
|
739
|
+
end
|
740
|
+
end
|
725
741
|
end
|
726
742
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teepee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Mark Gore
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|