teepee 0.11.4 → 0.12.0
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 +2 -0
- data/lib/teepee/commander.rb +17 -0
- 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: 03e2feb6c3ecf4415524f5f4e19af5f2ef8b0ec8
|
4
|
+
data.tar.gz: 8f0f19f61ca7e20a3a5fa3464c7855f53ce24ebb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6955643eead9732f8be4ed67edacaa99b8dc6b6f62fabfa23726ea29a674fa8905ed585da6646291490c847251376f3f4b526460cb48497d1abc78a727e5208b
|
7
|
+
data.tar.gz: 44e3823b6386cfdf1e1b2efd6ba53fd4d4a7997b1f079b0e930d23478d9469f22e05646c1a8935ab503774cbf92b846e546e65b98cc78b70f84fe481810b6ba3
|
data/lib/teepee/commander.rb
CHANGED
@@ -142,6 +142,14 @@ module Teepee
|
|
142
142
|
email_address =~ /\A[[:graph:]]+@[\w.]+\z/
|
143
143
|
end
|
144
144
|
|
145
|
+
def true_constant? expression
|
146
|
+
expression.to_s == "true"
|
147
|
+
end
|
148
|
+
|
149
|
+
def false_constant? expression
|
150
|
+
expression.to_s == "false"
|
151
|
+
end
|
152
|
+
|
145
153
|
#----------------------------------------------------------------------------
|
146
154
|
|
147
155
|
def + *numbers
|
@@ -415,6 +423,15 @@ module Teepee
|
|
415
423
|
command_error "Complex numbers are not yet supported."
|
416
424
|
end
|
417
425
|
|
426
|
+
def if_operator expressions
|
427
|
+
conditional, _, true_clause, _, false_clause = expressions
|
428
|
+
if true_constant? conditional
|
429
|
+
true_clause
|
430
|
+
else
|
431
|
+
false_clause
|
432
|
+
end
|
433
|
+
end
|
434
|
+
|
418
435
|
def image expressions
|
419
436
|
expressions = strip expressions
|
420
437
|
uri, *alt_text = expressions
|
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.
|
4
|
+
version: 0.12.0
|
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-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|