thefox-ext 1.4.0 → 1.6.3.pre.rc.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +15 -0
- data/.env.example +2 -0
- data/.github/workflows/ci.yml +39 -0
- data/.github/workflows/release.yml +38 -0
- data/.gitignore +3 -4
- data/CHANGELOG-v1.md +68 -0
- data/LICENSE +21 -0
- data/README.md +20 -13
- data/bin/.gitignore +1 -0
- data/bin/install.sh +51 -0
- data/bin/release.sh +37 -0
- data/bin/setup.sh +17 -0
- data/bin/test.sh +13 -0
- data/bin/uninstall.sh +24 -0
- data/lib/thefox-ext.rb +1 -0
- data/lib/thefox-ext/console.rb +47 -47
- data/lib/thefox-ext/ext/array.rb +38 -0
- data/lib/thefox-ext/ext/date.rb +42 -41
- data/lib/thefox-ext/ext/false.rb +6 -3
- data/lib/thefox-ext/ext/hash.rb +62 -55
- data/lib/thefox-ext/ext/integer.rb +3 -3
- data/lib/thefox-ext/ext/nil.rb +3 -3
- data/lib/thefox-ext/ext/string.rb +63 -57
- data/lib/thefox-ext/ext/true.rb +6 -3
- data/lib/thefox-ext/version.rb +5 -4
- data/thefox-ext.code-workspace +32 -0
- data/thefox-ext.gemspec +9 -7
- metadata +53 -21
- data/.travis.yml +0 -16
- data/Makefile +0 -8
- data/Makefile.common +0 -53
- data/tests/tc_date.rb +0 -70
- data/tests/tc_false.rb +0 -11
- data/tests/tc_hash.rb +0 -103
- data/tests/tc_integer.rb +0 -20
- data/tests/tc_nil.rb +0 -11
- data/tests/tc_string.rb +0 -87
- data/tests/tc_true.rb +0 -11
- data/tests/ts_all.rb +0 -9
- data/thefox-ext.sublime-project +0 -10
data/tests/tc_string.rb
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'minitest/autorun'
|
4
|
-
require 'thefox-ext'
|
5
|
-
|
6
|
-
|
7
|
-
class TestString < MiniTest::Test
|
8
|
-
def test_is_digit
|
9
|
-
assert_equal(true, '0123456789'.is_digit?)
|
10
|
-
assert_equal(true, '1'.is_digit?)
|
11
|
-
assert_equal(true, '2'.is_digit?)
|
12
|
-
|
13
|
-
assert_equal(false, 'ABC'.is_digit?)
|
14
|
-
assert_equal(false, 'A'.is_digit?)
|
15
|
-
assert_equal(false, 'A123'.is_digit?)
|
16
|
-
assert_equal(false, '123B'.is_digit?)
|
17
|
-
|
18
|
-
assert_equal(false, 'abc'.is_digit?)
|
19
|
-
assert_equal(false, 'a'.is_digit?)
|
20
|
-
assert_equal(false, 'a123'.is_digit?)
|
21
|
-
assert_equal(false, '123b'.is_digit?)
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_is_lower
|
25
|
-
assert_equal(false, '0123456789'.is_lower?)
|
26
|
-
assert_equal(false, '1'.is_lower?)
|
27
|
-
assert_equal(false, '2'.is_lower?)
|
28
|
-
|
29
|
-
assert_equal(false, 'ABC'.is_lower?)
|
30
|
-
assert_equal(false, 'A'.is_lower?)
|
31
|
-
assert_equal(false, 'A123'.is_lower?)
|
32
|
-
assert_equal(false, '123B'.is_lower?)
|
33
|
-
|
34
|
-
assert_equal(true, 'abc'.is_lower?)
|
35
|
-
assert_equal(true, 'a'.is_lower?)
|
36
|
-
assert_equal(false, 'a123'.is_lower?)
|
37
|
-
assert_equal(false, '123b'.is_lower?)
|
38
|
-
end
|
39
|
-
|
40
|
-
def test_is_upper
|
41
|
-
assert_equal(false, '0123456789'.is_upper?)
|
42
|
-
assert_equal(false, '1'.is_upper?)
|
43
|
-
assert_equal(false, '2'.is_upper?)
|
44
|
-
|
45
|
-
assert_equal(true, 'ABC'.is_upper?)
|
46
|
-
assert_equal(true, 'A'.is_upper?)
|
47
|
-
assert_equal(false, 'A123'.is_upper?)
|
48
|
-
assert_equal(false, '123B'.is_upper?)
|
49
|
-
|
50
|
-
assert_equal(false, 'abc'.is_upper?)
|
51
|
-
assert_equal(false, 'a'.is_upper?)
|
52
|
-
assert_equal(false, 'a123'.is_upper?)
|
53
|
-
assert_equal(false, '123b'.is_upper?)
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_is_utf8
|
57
|
-
assert_equal(true, 'ABC'.is_utf8?)
|
58
|
-
assert_equal(true, 'üäöß'.is_utf8?)
|
59
|
-
end
|
60
|
-
|
61
|
-
def test_titlecase
|
62
|
-
assert_equal('Abc Abc', 'ABC ABC'.titlecase)
|
63
|
-
assert_equal('Abc Abc', 'ABC abc'.titlecase)
|
64
|
-
assert_equal('Abc Abc', 'abc ABC'.titlecase)
|
65
|
-
assert_equal('Abc Abc', 'Abc Abc'.titlecase)
|
66
|
-
assert_equal('Abc Abc', 'abc abc'.titlecase)
|
67
|
-
assert_equal('Abc Abc', 'aBc abc'.titlecase)
|
68
|
-
assert_equal('Abc Abc', 'aBc abC'.titlecase)
|
69
|
-
|
70
|
-
assert_equal('Abc1 Abc2', 'ABC1 ABC2'.titlecase)
|
71
|
-
|
72
|
-
assert_equal('(abc Abc)', '(ABC ABC)'.titlecase)
|
73
|
-
end
|
74
|
-
|
75
|
-
def test_to_hex
|
76
|
-
assert_equal('41424320414243', 'ABC ABC'.to_hex)
|
77
|
-
end
|
78
|
-
|
79
|
-
def test_to_i32a
|
80
|
-
assert_equal({0 => 1090519040}, 'A'.to_i32a)
|
81
|
-
end
|
82
|
-
|
83
|
-
def test_to_utf8
|
84
|
-
assert_equal('Abc', 'Abc'.to_utf8)
|
85
|
-
assert_equal('AüäößE', 'AüäößE'.to_utf8)
|
86
|
-
end
|
87
|
-
end
|
data/tests/tc_true.rb
DELETED
data/tests/ts_all.rb
DELETED