chars 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +3 -3
- data/.yardopts +1 -1
- data/ChangeLog.md +9 -5
- data/LICENSE.txt +1 -1
- data/Rakefile +0 -2
- data/chars.gemspec +1 -4
- data/lib/chars/char_set.rb +5 -5
- data/lib/chars/chars.rb +1 -1
- data/lib/chars/extensions/integer.rb +1 -1
- data/lib/chars/extensions/string.rb +1 -1
- data/lib/chars/extensions.rb +2 -2
- data/lib/chars/version.rb +1 -1
- data/lib/chars.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56d15d9a339ad8d7a1106fcf031445010e73eca3c86184baf9d793d7c1765ce2
|
4
|
+
data.tar.gz: 75f7ce1ecfba11f41bcc64d26900d5da05a0cf30a0fcca4100cf6e3b6967f1e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac159bcca8f06abaf6962a1d0c7b693fea39202bcce3426cd72baea4cbba4650cabbbf0cdc0147031ba71752f359c8659def748b3462454ac8fe992150b0de83
|
7
|
+
data.tar.gz: f8b148a08e9dd8b2f8b087b3cb88896e66c138460a317a591f9c3088e02129945b0a836f3f37c0894e86ad6f064a7cf747807efcc54df9712e51e5a034069d5e
|
data/.github/workflows/ruby.yml
CHANGED
@@ -9,15 +9,15 @@ jobs:
|
|
9
9
|
fail-fast: false
|
10
10
|
matrix:
|
11
11
|
ruby:
|
12
|
-
- '2.6'
|
13
|
-
- '2.7'
|
14
12
|
- '3.0'
|
15
13
|
- '3.1'
|
14
|
+
- '3.2'
|
15
|
+
- '3.3'
|
16
16
|
- jruby
|
17
17
|
- truffleruby
|
18
18
|
name: Ruby ${{ matrix.ruby }}
|
19
19
|
steps:
|
20
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v4
|
21
21
|
- name: Set up Ruby
|
22
22
|
uses: ruby/setup-ruby@v1
|
23
23
|
with:
|
data/.yardopts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--markup markdown --title 'Chars Documentation' --protected
|
1
|
+
--markup markdown --title 'Chars Documentation' --protected
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
### 0.3.3 / 2024-01-23
|
2
|
+
|
3
|
+
* Switch to using `require_relative` to improve load-times.
|
4
|
+
|
1
5
|
### 0.3.2 / 2022-12-02
|
2
6
|
|
3
7
|
* Ensure all character Strings within the {Chars} character sets are encoded as
|
@@ -50,8 +54,8 @@
|
|
50
54
|
|
51
55
|
* Added {Chars::CharSet.[]}
|
52
56
|
* Added {Chars::CharSet#<<}.
|
53
|
-
* Added
|
54
|
-
* Added
|
57
|
+
* Added `Chars::CharSet#byte_to_char`.
|
58
|
+
* Added `Chars::CharSet#char_to_byte`.
|
55
59
|
* Added a cache of characters of the bytes within {Chars::CharSet}.
|
56
60
|
* Use `String#each_char` to distinguish Unicode from ASCII.
|
57
61
|
|
@@ -65,10 +69,10 @@
|
|
65
69
|
* Require `hoe` >= 2.3.3.
|
66
70
|
* Require `yard` >= 0.2.3.5.
|
67
71
|
* Require `rspec` >= 1.2.8.
|
68
|
-
* Added {Chars.
|
72
|
+
* Added {Chars.visible} and {Chars::VISIBLE} (thanks flatline).
|
69
73
|
* Added {Chars::CharSet#random_distinct_bytes},
|
70
|
-
{Chars::CharSet#random_distinct_chars}, and
|
71
|
-
(thanks flatline).
|
74
|
+
{Chars::CharSet#random_distinct_chars}, and
|
75
|
+
{Chars::CharSet#random_distinct_string} (thanks flatline).
|
72
76
|
* Use `hoe/signing` for signed RubyGems.
|
73
77
|
* Moved to YARD based documentation.
|
74
78
|
* All specs now pass on JRuby 1.3.1.
|
data/LICENSE.txt
CHANGED
data/Rakefile
CHANGED
data/chars.gemspec
CHANGED
@@ -7,10 +7,7 @@ Gem::Specification.new do |gem|
|
|
7
7
|
|
8
8
|
gem.name = gemspec.fetch('name')
|
9
9
|
gem.version = gemspec.fetch('version') do
|
10
|
-
|
11
|
-
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
|
12
|
-
|
13
|
-
require 'chars/version'
|
10
|
+
require_relative 'lib/chars/version'
|
14
11
|
Chars::VERSION
|
15
12
|
end
|
16
13
|
|
data/lib/chars/char_set.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require_relative 'string_enumerator'
|
2
2
|
|
3
3
|
require 'set'
|
4
4
|
|
@@ -580,7 +580,7 @@ module Chars
|
|
580
580
|
# If no block is given, an Array or Hash of sub-strings is returned.
|
581
581
|
#
|
582
582
|
# @deprecated
|
583
|
-
# Use {#each_substring_with_index}, {#
|
583
|
+
# Use {#each_substring_with_index}, {#substrings_with_indexes},
|
584
584
|
# {#each_substring}, or {#substrings} instead.
|
585
585
|
#
|
586
586
|
def strings_in(data,options={},&block)
|
@@ -613,7 +613,7 @@ module Chars
|
|
613
613
|
# The given block will be passed each sequential string.
|
614
614
|
#
|
615
615
|
# @yieldparam [String] string
|
616
|
-
# A string belonging to {
|
616
|
+
# A string belonging to the {CharSet} and of `length` long.
|
617
617
|
#
|
618
618
|
# @return [Enumerator]
|
619
619
|
# If no block is given, an Enumerator will be returned.
|
@@ -635,7 +635,7 @@ module Chars
|
|
635
635
|
|
636
636
|
#
|
637
637
|
# Returns an Enumerator that enumerates through every possible string
|
638
|
-
# belonging to the {
|
638
|
+
# belonging to the {CharSet} and of the given length.
|
639
639
|
#
|
640
640
|
# @param [Range, Array, Integer] length
|
641
641
|
# The desired length(s) of each string.
|
@@ -656,7 +656,7 @@ module Chars
|
|
656
656
|
# The other {CharSet} to union with.
|
657
657
|
#
|
658
658
|
# @return [CharSet]
|
659
|
-
# The unioned {
|
659
|
+
# The unioned {CharSet}.
|
660
660
|
#
|
661
661
|
def |(set)
|
662
662
|
set = CharSet.new(set) unless set.kind_of?(CharSet)
|
data/lib/chars/chars.rb
CHANGED
data/lib/chars/extensions.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
require_relative 'extensions/integer'
|
2
|
+
require_relative 'extensions/string'
|
data/lib/chars/version.rb
CHANGED
data/lib/chars.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
require_relative 'chars/char_set'
|
2
|
+
require_relative 'chars/chars'
|
3
|
+
require_relative 'chars/extensions'
|
4
|
+
require_relative 'chars/version'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chars
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
- !ruby/object:Gem::Version
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
|
-
rubygems_version: 3.
|
90
|
+
rubygems_version: 3.4.10
|
91
91
|
signing_key:
|
92
92
|
specification_version: 4
|
93
93
|
summary: A Ruby library for working with various character sets
|