fat_core 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fat_core/string.rb +7 -0
- data/lib/fat_core/version.rb +2 -2
- data/spec/lib/string_spec.rb +11 -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: f8c6840ffea69ed122686854e4280bc17ffb9e63
|
4
|
+
data.tar.gz: 4a34b1b56e565390e720e591e167ad43cc39bb32
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e2def4f428339f99e12872a258f16e3880f7b2948231007c824631061b442766d91f75d4d476fc9becc717891a12546761cf6a27781f86db3607b3c58060a6a
|
7
|
+
data.tar.gz: 984d25b5d460af3c5a1fbfbec54ced7302cab056130550ac515b149971ea2d013ebdf4c1a50288b59830ba3abcba13761efa3b73e75ba85b033a1b8ad91486ef
|
data/lib/fat_core/string.rb
CHANGED
data/lib/fat_core/version.rb
CHANGED
data/spec/lib/string_spec.rb
CHANGED
@@ -96,6 +96,17 @@ the people, for the people, shall not perish from the earth."
|
|
96
96
|
expect("{hello}".tex_quote).to eq("\\{hello\\}")
|
97
97
|
end
|
98
98
|
|
99
|
+
it "should be able to determine is it's a valid number" do
|
100
|
+
expect('88'.number?).to be true
|
101
|
+
expect('-88'.number?).to be true
|
102
|
+
expect('8.008'.number?).to be true
|
103
|
+
expect('-8.008'.number?).to be true
|
104
|
+
expect('8.008e33'.number?).to be true
|
105
|
+
expect('-8.008e33'.number?).to be true
|
106
|
+
expect('0x8.008'.number?).to be false
|
107
|
+
expect('hello world'.number?).to be false
|
108
|
+
end
|
109
|
+
|
99
110
|
it "should be able to convert a string to a regular expression" do
|
100
111
|
re = "/hello((\s+)(world))?/".to_regexp
|
101
112
|
expect(re.class).to eq Regexp
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fat_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel E. Doherty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simplecov
|