teepee 0.11.1 → 0.11.2
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 +12 -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: 03b03bde14f638ca63a57c2e0aed51fcc20b2aa8
|
4
|
+
data.tar.gz: 768bd1ac97298ffdef41a9699ac1e03ded0c9e28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea7ac23111f327be2941ef91d814c007d14e35311d702dbb31ba7c41d694a07276a04fffd6e6a2c7263d3b589ed68a9eb674930d6d6062a581e7d0e17e32dc96
|
7
|
+
data.tar.gz: 0f59f6a3228b1439c84ce4846473fbc42efd066826566d60b8dbb9e529f3b2572a62cee62e2a6e564d4b207b5d8787bdf6daa46d4c624369f36dd28c240da0a8
|
data/lib/teepee/commander.rb
CHANGED
@@ -138,6 +138,10 @@ module Teepee
|
|
138
138
|
left_strip right_strip expressions
|
139
139
|
end
|
140
140
|
|
141
|
+
def valid_email_address? email_address
|
142
|
+
email_address =~ /\A[[:graph:]]+@[\w.]+\z/
|
143
|
+
end
|
144
|
+
|
141
145
|
#----------------------------------------------------------------------------
|
142
146
|
|
143
147
|
def + *numbers
|
@@ -515,6 +519,14 @@ module Teepee
|
|
515
519
|
ensure_numeric Math.log10 number
|
516
520
|
end
|
517
521
|
|
522
|
+
def mailto email_address
|
523
|
+
if valid_email_address?
|
524
|
+
html_tag :a, email_address, {href: "mailto:#{email_address}"}
|
525
|
+
else
|
526
|
+
command_error "I'm not sure that's a valid email address."
|
527
|
+
end
|
528
|
+
end
|
529
|
+
|
518
530
|
def mod *numbers
|
519
531
|
ensure_numeric numbers.reduce :%
|
520
532
|
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.11.
|
4
|
+
version: 0.11.2
|
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-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|