chars 0.3.2 → 0.3.4
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/.github/workflows/ruby.yml +5 -3
- data/.yardopts +1 -1
- data/ChangeLog.md +15 -5
- data/LICENSE.txt +1 -1
- data/Rakefile +0 -2
- data/chars.gemspec +1 -4
- data/gemspec.yml +2 -2
- data/lib/chars/char_set.rb +7 -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 +8 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1163a14b9962b1f15bf11dc66690f4a78fab89091a55ea1f18279fea3446a072
|
|
4
|
+
data.tar.gz: 19636d167fd9dd1f316f632967e6a40a9b5d5c479f7b962c447eb18dd84ddc26
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b48012e9cb400c1fec296f9cc282e7f3698017ff13aedc322b3f2397bed688ed03af1eb4754ebbcae5ca2d8ea90186aebf9393bafc63d8123fe991dba0e5bb41
|
|
7
|
+
data.tar.gz: fc8823aa5993ed81ddf34d9fe8154e99590054ce12a58296c9b9648aa3fe3154c8c699de3be07a485d487018fa0cfb93499f07a99888050e0ea099134b3f8047
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -9,15 +9,17 @@ 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
|
+
- '3.4'
|
|
17
|
+
- '4.0'
|
|
16
18
|
- jruby
|
|
17
19
|
- truffleruby
|
|
18
20
|
name: Ruby ${{ matrix.ruby }}
|
|
19
21
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
22
|
+
- uses: actions/checkout@v4
|
|
21
23
|
- name: Set up Ruby
|
|
22
24
|
uses: ruby/setup-ruby@v1
|
|
23
25
|
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,13 @@
|
|
|
1
|
+
### 0.3.4 / 2026-01-12
|
|
2
|
+
|
|
3
|
+
* Added support for Ruby 4.0.
|
|
4
|
+
* Fixed a bug in {Chars::CharSet#initialize_copy} where `super` was not being
|
|
5
|
+
called.
|
|
6
|
+
|
|
7
|
+
### 0.3.3 / 2024-01-23
|
|
8
|
+
|
|
9
|
+
* Switch to using `require_relative` to improve load-times.
|
|
10
|
+
|
|
1
11
|
### 0.3.2 / 2022-12-02
|
|
2
12
|
|
|
3
13
|
* Ensure all character Strings within the {Chars} character sets are encoded as
|
|
@@ -50,8 +60,8 @@
|
|
|
50
60
|
|
|
51
61
|
* Added {Chars::CharSet.[]}
|
|
52
62
|
* Added {Chars::CharSet#<<}.
|
|
53
|
-
* Added
|
|
54
|
-
* Added
|
|
63
|
+
* Added `Chars::CharSet#byte_to_char`.
|
|
64
|
+
* Added `Chars::CharSet#char_to_byte`.
|
|
55
65
|
* Added a cache of characters of the bytes within {Chars::CharSet}.
|
|
56
66
|
* Use `String#each_char` to distinguish Unicode from ASCII.
|
|
57
67
|
|
|
@@ -65,10 +75,10 @@
|
|
|
65
75
|
* Require `hoe` >= 2.3.3.
|
|
66
76
|
* Require `yard` >= 0.2.3.5.
|
|
67
77
|
* Require `rspec` >= 1.2.8.
|
|
68
|
-
* Added {Chars.
|
|
78
|
+
* Added {Chars.visible} and {Chars::VISIBLE} (thanks flatline).
|
|
69
79
|
* Added {Chars::CharSet#random_distinct_bytes},
|
|
70
|
-
{Chars::CharSet#random_distinct_chars}, and
|
|
71
|
-
(thanks flatline).
|
|
80
|
+
{Chars::CharSet#random_distinct_chars}, and
|
|
81
|
+
{Chars::CharSet#random_distinct_string} (thanks flatline).
|
|
72
82
|
* Use `hoe/signing` for signed RubyGems.
|
|
73
83
|
* Moved to YARD based documentation.
|
|
74
84
|
* 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/gemspec.yml
CHANGED
|
@@ -14,10 +14,10 @@ metadata:
|
|
|
14
14
|
documentation_uri: https://rubydoc.info/gems/chars
|
|
15
15
|
source_code_uri: https://github.com/postmodern/chars.rb
|
|
16
16
|
bug_tracker_uri: https://github.com/postmodern/chars.rb/issues
|
|
17
|
-
changelog_uri: https://github.com/postmodern/chars.rb/blob/
|
|
17
|
+
changelog_uri: https://github.com/postmodern/chars.rb/blob/main/ChangeLog.md
|
|
18
18
|
rubygems_mfa_required: 'true'
|
|
19
19
|
|
|
20
20
|
required_ruby_version: ">= 2.0.0"
|
|
21
21
|
|
|
22
22
|
development_dependencies:
|
|
23
|
-
bundler:
|
|
23
|
+
bundler: ">= 2.0.0"
|
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
|
|
|
@@ -44,6 +44,8 @@ module Chars
|
|
|
44
44
|
# The other {CharSet} object.
|
|
45
45
|
#
|
|
46
46
|
def initialize_copy(other)
|
|
47
|
+
super(other)
|
|
48
|
+
|
|
47
49
|
@chars = other.instance_variable_get('@chars').dup
|
|
48
50
|
end
|
|
49
51
|
|
|
@@ -580,7 +582,7 @@ module Chars
|
|
|
580
582
|
# If no block is given, an Array or Hash of sub-strings is returned.
|
|
581
583
|
#
|
|
582
584
|
# @deprecated
|
|
583
|
-
# Use {#each_substring_with_index}, {#
|
|
585
|
+
# Use {#each_substring_with_index}, {#substrings_with_indexes},
|
|
584
586
|
# {#each_substring}, or {#substrings} instead.
|
|
585
587
|
#
|
|
586
588
|
def strings_in(data,options={},&block)
|
|
@@ -613,7 +615,7 @@ module Chars
|
|
|
613
615
|
# The given block will be passed each sequential string.
|
|
614
616
|
#
|
|
615
617
|
# @yieldparam [String] string
|
|
616
|
-
# A string belonging to {
|
|
618
|
+
# A string belonging to the {CharSet} and of `length` long.
|
|
617
619
|
#
|
|
618
620
|
# @return [Enumerator]
|
|
619
621
|
# If no block is given, an Enumerator will be returned.
|
|
@@ -635,7 +637,7 @@ module Chars
|
|
|
635
637
|
|
|
636
638
|
#
|
|
637
639
|
# Returns an Enumerator that enumerates through every possible string
|
|
638
|
-
# belonging to the {
|
|
640
|
+
# belonging to the {CharSet} and of the given length.
|
|
639
641
|
#
|
|
640
642
|
# @param [Range, Array, Integer] length
|
|
641
643
|
# The desired length(s) of each string.
|
|
@@ -656,7 +658,7 @@ module Chars
|
|
|
656
658
|
# The other {CharSet} to union with.
|
|
657
659
|
#
|
|
658
660
|
# @return [CharSet]
|
|
659
|
-
# The unioned {
|
|
661
|
+
# The unioned {CharSet}.
|
|
660
662
|
#
|
|
661
663
|
def |(set)
|
|
662
664
|
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,29 +1,28 @@
|
|
|
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.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Postmodern
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: 2.0.0
|
|
20
19
|
type: :development
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
|
-
- - "
|
|
23
|
+
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
25
|
+
version: 2.0.0
|
|
27
26
|
description: Chars is a Ruby library for working with various character sets, recognizing
|
|
28
27
|
text and generating random text from specific character sets.
|
|
29
28
|
email: postmodern.mod3@gmail.com
|
|
@@ -70,9 +69,8 @@ metadata:
|
|
|
70
69
|
documentation_uri: https://rubydoc.info/gems/chars
|
|
71
70
|
source_code_uri: https://github.com/postmodern/chars.rb
|
|
72
71
|
bug_tracker_uri: https://github.com/postmodern/chars.rb/issues
|
|
73
|
-
changelog_uri: https://github.com/postmodern/chars.rb/blob/
|
|
72
|
+
changelog_uri: https://github.com/postmodern/chars.rb/blob/main/ChangeLog.md
|
|
74
73
|
rubygems_mfa_required: 'true'
|
|
75
|
-
post_install_message:
|
|
76
74
|
rdoc_options: []
|
|
77
75
|
require_paths:
|
|
78
76
|
- lib
|
|
@@ -87,8 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
87
85
|
- !ruby/object:Gem::Version
|
|
88
86
|
version: '0'
|
|
89
87
|
requirements: []
|
|
90
|
-
rubygems_version:
|
|
91
|
-
signing_key:
|
|
88
|
+
rubygems_version: 4.0.3
|
|
92
89
|
specification_version: 4
|
|
93
90
|
summary: A Ruby library for working with various character sets
|
|
94
91
|
test_files: []
|