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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33adb9b0d02cf5d9c694e80e824bb4835b1503769e00d7f62ab901b35a46df64
4
- data.tar.gz: ab56f3ae9533e9e5903aee56c491f6b40760694e4adc3d6ec364725182ccaeed
3
+ metadata.gz: 1163a14b9962b1f15bf11dc66690f4a78fab89091a55ea1f18279fea3446a072
4
+ data.tar.gz: 19636d167fd9dd1f316f632967e6a40a9b5d5c479f7b962c447eb18dd84ddc26
5
5
  SHA512:
6
- metadata.gz: de94222563f4de2c9c68660d95af2d6d0cdc54ee53ac61b726022c02f064fbe493ec3a208937ec2dcb52593560ea4bf6e7935ad0e4ac8b7f7ecfa22afd55f3f4
7
- data.tar.gz: 172429354850160c92ac11d563effa5c8379d062c8fd1615a9db567abf7f1548528847af12f084ce20b16e7e654854ddcd857e0082ea677f41356fcf2c33bb5d
6
+ metadata.gz: b48012e9cb400c1fec296f9cc282e7f3698017ff13aedc322b3f2397bed688ed03af1eb4754ebbcae5ca2d8ea90186aebf9393bafc63d8123fe991dba0e5bb41
7
+ data.tar.gz: fc8823aa5993ed81ddf34d9fe8154e99590054ce12a58296c9b9648aa3fe3154c8c699de3be07a485d487018fa0cfb93499f07a99888050e0ea099134b3f8047
@@ -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@v2
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 --quiet
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 {Chars::CharSet#byte_to_char}.
54
- * Added {Chars::CharSet#char_to_byte}.
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.visibile} and {Chars::VISIBLE} (thanks flatline).
78
+ * Added {Chars.visible} and {Chars::VISIBLE} (thanks flatline).
69
79
  * Added {Chars::CharSet#random_distinct_bytes},
70
- {Chars::CharSet#random_distinct_chars}, and {CharSet#random_distinct_string}
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
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2009-2021 Hal Brodigan
3
+ Copyright (c) 2009-2026 Hal Brodigan
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,5 +1,3 @@
1
- require 'rubygems'
2
-
3
1
  require 'rubygems/tasks'
4
2
  Gem::Tasks.new
5
3
 
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
- lib_dir = File.join(File.dirname(__FILE__),'lib')
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/master/ChangeLog.md
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: ~> 2.0
23
+ bundler: ">= 2.0.0"
@@ -1,4 +1,4 @@
1
- require 'chars/string_enumerator'
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}, {#substrings_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 {#char_set} and `length` long.
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 {CharSEt} and of the given length.
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 {ChraSet}.
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
@@ -1,7 +1,7 @@
1
1
  # encoding: ASCII-8BIT
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'chars/char_set'
4
+ require_relative 'char_set'
5
5
 
6
6
  module Chars
7
7
  # The numeric decimal character set
@@ -1,4 +1,4 @@
1
- require 'chars/chars'
1
+ require_relative '../chars'
2
2
 
3
3
  class Integer
4
4
 
@@ -1,4 +1,4 @@
1
- require 'chars/chars'
1
+ require_relative '../chars'
2
2
 
3
3
  class String
4
4
 
@@ -1,2 +1,2 @@
1
- require 'chars/extensions/integer'
2
- require 'chars/extensions/string'
1
+ require_relative 'extensions/integer'
2
+ require_relative 'extensions/string'
data/lib/chars/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Chars
2
2
  # chars version
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.4'
4
4
  end
data/lib/chars.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'chars/char_set'
2
- require 'chars/chars'
3
- require 'chars/extensions'
4
- require 'chars/version'
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.2
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: 2022-12-02 00:00:00.000000000 Z
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: '2.0'
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: '2.0'
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/master/ChangeLog.md
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: 3.3.26
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: []