fat_core 7.1.3 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.yardopts +3 -4
- data/CHANGELOG.md +97 -0
- data/CHANGELOG.org +5 -0
- data/Gemfile +1 -0
- data/README.md +1199 -0
- data/README.org +266 -225
- data/Rakefile +3 -7
- data/lib/fat_core/all.rb +1 -0
- data/lib/fat_core/string.rb +104 -58
- data/lib/fat_core/version.rb +2 -2
- data/lib/fat_core.rb +12 -2
- data/spec/lib/string_spec.rb +60 -3
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3aced327c9c27abf23f852ce1db5e3347cb1b26558d9c4c337937db9773d1dde
|
|
4
|
+
data.tar.gz: 4cb7f01cae67351e9865476ab40f87ddf37375b1dec7a14e725633288c3b78eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d90173d7c849ca52ab67e1ccb14af60e7171c16c39b5b482d3df08d6f080e8b2ebdf1f18b89122c3554186cc35d6ae572b84d06d584f3a9a01f674ef9a2f5b8a
|
|
7
|
+
data.tar.gz: 895eeef8c783f150bb1cb28283c1ff4e4ffdec5ab94cb6889ad1fcbe60e4475ac7326d2c45b3cd5b50b76bb518a52c1866ed70c42c525c1c8d76facab7780e32
|
data/.gitignore
CHANGED
data/.yardopts
CHANGED
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
- [Version 7.3.0](#org5f61e5a)
|
|
2
|
+
- [String](#org633deb6)
|
|
3
|
+
- [Version 7.1.1](#org003674c)
|
|
4
|
+
- [String](#org5df7dd5)
|
|
5
|
+
- [Version 7.0.0 from Version 6.0.0](#org3aecf27)
|
|
6
|
+
- [Enumerable](#orgff23338)
|
|
7
|
+
- [Hash](#org408609b)
|
|
8
|
+
- [Numeric](#org138cd73)
|
|
9
|
+
- [Range](#orgdebd7ac)
|
|
10
|
+
- [String](#org075bb7e)
|
|
11
|
+
- [Kernel](#org545d137)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
<a id="org5f61e5a"></a>
|
|
15
|
+
|
|
16
|
+
# Version 7.3.0
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
<a id="org633deb6"></a>
|
|
20
|
+
|
|
21
|
+
## String
|
|
22
|
+
|
|
23
|
+
Another visit to String#fuzzy\_match to ensure that a subject string is matched by its own matcher. This bug got tickled when 'Amazon.com' failed to match 'Amazon.com', which just isn't right.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
<a id="org003674c"></a>
|
|
27
|
+
|
|
28
|
+
# Version 7.1.1
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
<a id="org5df7dd5"></a>
|
|
32
|
+
|
|
33
|
+
## String
|
|
34
|
+
|
|
35
|
+
- `String#fuzzy_match` make period, comma, asterisk, and apostrophes optional in matcher instead of just deleting them and in the subject string replace periods and commas with spaces so they still act as word separators.
|
|
36
|
+
|
|
37
|
+
Before `'WWW.WOLFRAM.COM'.fuzzy_match('www:wolfram')` would not match because the periods were just eliminated so the matcher was looking for a word starting with 'wolfram' but the subject string was converted to 'WWWWOLFRAMCOM' so no match. Now it is converted to 'WWW WOLFRAM COM' so the match succeeds.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
<a id="org3aecf27"></a>
|
|
41
|
+
|
|
42
|
+
# Version 7.0.0 from Version 6.0.0
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<a id="orgff23338"></a>
|
|
46
|
+
|
|
47
|
+
## Enumerable
|
|
48
|
+
|
|
49
|
+
- Remove `#groups_of` as duplicative of `each_slice`
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
<a id="org408609b"></a>
|
|
53
|
+
|
|
54
|
+
## Hash
|
|
55
|
+
|
|
56
|
+
- Rename `delete_with_value` to `delete_with_values!` to make it clear that the Hash is modified in place,
|
|
57
|
+
- Add `delete_with_value` as a non-mutating variant
|
|
58
|
+
- Change arg to `keys_with_value(vals)` to allow variable arguments for multiple values instead of requiring an Array,
|
|
59
|
+
- Allow `<<` operator to merge any `Enumerable` as well as a `Hash`
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
<a id="org138cd73"></a>
|
|
63
|
+
|
|
64
|
+
## Numeric
|
|
65
|
+
|
|
66
|
+
- Enhance `#tex_quote` to put special numbers such as `Math::PI`, `Math::E`, and `Float::INFINITY` in TeX notation, so, e.g., Complex(Math::E, Math:PI).tex\_quote will render to "$\\pi+e i$", Rationals will be rendered as fractions, etc.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
<a id="orgdebd7ac"></a>
|
|
70
|
+
|
|
71
|
+
## Range
|
|
72
|
+
|
|
73
|
+
- `Range#gaps` now better handles Ranges with countable endpoints that need `:succ` and `:pred` methods,
|
|
74
|
+
- `tex_quote` applies `#tex_quote` to endpoints if they respond to a `#tex_quote` method,
|
|
75
|
+
- Check argument Ranges to `#gaps`, `#spanned_by?`, and `#overlaps` for compatibility with the subject Range,
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
<a id="org075bb7e"></a>
|
|
79
|
+
|
|
80
|
+
## String
|
|
81
|
+
|
|
82
|
+
- `String#fuzzy_match` changes the semantics of the string matcher argument:
|
|
83
|
+
1. an internal ':' preceded and followed by non-whitespace now only applies to the word following it to indicate that the word must be a word boundary, so 'hel:wor' matches 'Shell worms' as well as 'Hello, world'.
|
|
84
|
+
2. an internal ':' preceded by whitespace but followed by non-whitespace is also treated as requiring a word boundary for the following word but not the preceding word, as in 1, so 'hel :wor'
|
|
85
|
+
3. but an internal ':' preceded by non-whitespace but followed by whitespace requires a word boundary after the preceding word, so 'hel: wor'
|
|
86
|
+
4. a lone matcher now allows a match anywhere in the subject text regardless of boundaries; the prior version added a word boundary restriction to the bare matcher, so before 'zz' would not match "Pizza" since 'zz' did not occur at the end of word, but now 'zz' will match "Pizza". Rule 3 above allows putting a boundary restriction on the matcher with 'zz: ' as before.
|
|
87
|
+
5. Leading and trailing ':' continue to require the text to occur at the beginning or end, respectively, of the subject string, so ':hel' and 'ld:' match "Hello, world" but ':wor' and 'wor:' do not.
|
|
88
|
+
- `String#number` no longer considers a hex number with a decimal point to be in the form of a number
|
|
89
|
+
- provide a :pred method in a refinement accesses with 'using StringPred
|
|
90
|
+
- `String#entitle` no longer tries to detect general acronyms for upper case handling since it was unreliable. Thus, `"ibm corporation".enetitle` becomers "Ibm Corporation" rather than "IBM corporation."
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
<a id="org545d137"></a>
|
|
94
|
+
|
|
95
|
+
## Kernel
|
|
96
|
+
|
|
97
|
+
- removed the `Kernel.time_it` method since Benchmark already does this better.
|
data/CHANGELOG.org
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
* Version 7.3.0
|
|
2
|
+
** String
|
|
3
|
+
Another visit to String#fuzzy_match to ensure that a subject string is matched
|
|
4
|
+
by its own matcher. This bug got tickled when 'Amazon.com' failed to match
|
|
5
|
+
'Amazon.com', which just isn't right.
|
|
1
6
|
* Version 7.1.1
|
|
2
7
|
** String
|
|
3
8
|
- =String#fuzzy_match= make period, comma, asterisk, and apostrophes optional
|