chars 0.2.0 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,74 +1,73 @@
1
- require 'chars/extensions/integer'
2
-
3
1
  require 'spec_helper'
2
+ require 'chars/extensions/integer'
4
3
 
5
4
  describe Integer do
6
5
  it "should recognize numeric bytes" do
7
- 0x39.should be_numeric
6
+ expect(0x39).to be_numeric
8
7
  end
9
8
 
10
9
  it "should recognize octal bytes" do
11
- 0x30.should be_octal
10
+ expect(0x30).to be_octal
12
11
  end
13
12
 
14
13
  it "should recognize upper-case hexadecimal bytes" do
15
- 0x44.should be_uppercase_hex
14
+ expect(0x44).to be_uppercase_hex
16
15
  end
17
16
 
18
17
  it "should recognize lower-case hexadecimal bytes" do
19
- 0x61.should be_lowercase_hex
18
+ expect(0x61).to be_lowercase_hex
20
19
  end
21
20
 
22
21
  it "should recognize hexadecimal bytes" do
23
- 0x63.should be_hex
22
+ expect(0x63).to be_hex
24
23
  end
25
24
 
26
25
  it "should recognize upper-case alpha bytes" do
27
- 0x4c.should be_uppercase_alpha
26
+ expect(0x4c).to be_uppercase_alpha
28
27
  end
29
28
 
30
29
  it "should recognize lower-case alpha bytes" do
31
- 0x71.should be_lowercase_alpha
30
+ expect(0x71).to be_lowercase_alpha
32
31
  end
33
32
 
34
33
  it "should recognize alpha bytes" do
35
- 0x7a.should be_alpha
34
+ expect(0x7a).to be_alpha
36
35
  end
37
36
 
38
37
  it "should recognize alpha-numeric bytes" do
39
- 0x69.should be_alpha_numeric
38
+ expect(0x69).to be_alpha_numeric
40
39
  end
41
40
 
42
41
  it "should recognize punctuation bytes" do
43
- 0x60.should be_punctuation
42
+ expect(0x60).to be_punctuation
44
43
  end
45
44
 
46
45
  it "should recognize symbolic bytes" do
47
- 0x26.should be_symbolic
46
+ expect(0x26).to be_symbolic
48
47
  end
49
48
 
50
49
  it "should recognize space bytes" do
51
- 0x20.should be_space
50
+ expect(0x20).to be_space
52
51
  end
53
52
 
54
53
  it "should recognize visible bytes" do
55
- 0x41.should be_visible
56
- 0x20.should_not be_visible
54
+ expect(0x41).to be_visible
55
+ expect(0x20).to_not be_visible
57
56
  end
58
57
 
59
58
  it "should recognize printable bytes" do
60
- 0x3f.should be_printable
59
+ expect(0x3f).to be_printable
61
60
  end
62
61
 
63
62
  it "should recognize control bytes" do
64
- 0x1b.should be_control
63
+ expect(0x1b).to be_control
65
64
  end
66
65
 
67
66
  it "should recognize signed ASCII bytes" do
68
- 0x00.should be_signed_ascii
67
+ expect(0x00).to be_signed_ascii
69
68
  end
70
69
 
71
70
  it "should recognize ASCII bytes" do
72
- 0x80.should be_ascii
71
+ expect(0x80).to be_ascii
73
72
  end
74
73
  end
@@ -1,74 +1,75 @@
1
- require 'chars/extensions/string'
1
+ # encoding: US-ASCII
2
2
 
3
3
  require 'spec_helper'
4
+ require 'chars/extensions/string'
4
5
 
5
6
  describe String do
6
7
  it "should recognize numeric strings" do
7
- "0987".should be_numeric
8
+ expect("0987").to be_numeric
8
9
  end
9
10
 
10
11
  it "should recognize octal strings" do
11
- "012".should be_octal
12
+ expect("012").to be_octal
12
13
  end
13
14
 
14
15
  it "should recognize upper-case hexadecimal strings" do
15
- "2D".should be_uppercase_hex
16
+ expect("2D").to be_uppercase_hex
16
17
  end
17
18
 
18
19
  it "should recognize lower-case hexadecimal strings" do
19
- "2d".should be_lowercase_hex
20
+ expect("2d").to be_lowercase_hex
20
21
  end
21
22
 
22
23
  it "should recognize hexadecimal strings" do
23
- "2dE3".should be_hex
24
+ expect("2dE3").to be_hex
24
25
  end
25
26
 
26
27
  it "should recognize upper-case alpha strings" do
27
- "ABC".should be_uppercase_alpha
28
+ expect("ABC").to be_uppercase_alpha
28
29
  end
29
30
 
30
31
  it "should recognize lower-case alpha strings" do
31
- "abc".should be_lowercase_alpha
32
+ expect("abc").to be_lowercase_alpha
32
33
  end
33
34
 
34
35
  it "should recognize alpha strings" do
35
- "abcDEF".should be_alpha
36
+ expect("abcDEF").to be_alpha
36
37
  end
37
38
 
38
39
  it "should recognize alpha-numeric strings" do
39
- "abc123".should be_alpha_numeric
40
+ expect("abc123").to be_alpha_numeric
40
41
  end
41
42
 
42
43
  it "should recognize punctuation strings" do
43
- "[...]".should be_punctuation
44
+ expect("[...]").to be_punctuation
44
45
  end
45
46
 
46
47
  it "should recognize symbolic strings" do
47
- "++".should be_symbolic
48
+ expect("++").to be_symbolic
48
49
  end
49
50
 
50
51
  it "should recognize space strings" do
51
- " \t".should be_space
52
+ expect(" \t").to be_space
52
53
  end
53
54
 
54
55
  it "should recognize visible strings" do
55
- "abc".should be_visible
56
- "ab c".should_not be_visible
56
+ expect("abc").to be_visible
57
+ expect("ab c").to_not be_visible
57
58
  end
58
59
 
59
60
  it "should recognize printable strings" do
60
- "abc, [123]\nDEF".should be_printable
61
+ expect("abc, [123]\nDEF").to be_printable
61
62
  end
62
63
 
63
64
  it "should recognize control strings" do
64
- "\b\b\a".should be_control
65
+ expect("\b\b\a").to be_control
65
66
  end
66
67
 
67
68
  it "should recognize signed ASCII strings" do
68
- "lol\0".should be_signed_ascii
69
+ expect("lol\0").to be_signed_ascii
69
70
  end
70
71
 
71
72
  it "should recognize ASCII strings" do
72
- "\xff\xfe".should be_ascii
73
+ expect("\xff\xfe").to be_ascii
73
74
  end
74
75
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,2 @@
1
1
  require 'rspec'
2
-
3
2
  require 'chars/version'
metadata CHANGED
@@ -1,85 +1,52 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: chars
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 0
9
- version: 0.2.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.4
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Postmodern
13
- autorequire:
8
+ autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2010-10-27 00:00:00 -07:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: ore
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 2
31
- - 0
32
- version: 0.2.0
11
+ date: 2021-10-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
33
20
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: ore-tasks
37
21
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
- requirements:
41
- - - ~>
42
- - !ruby/object:Gem::Version
43
- segments:
44
- - 0
45
- - 1
46
- - 2
47
- version: 0.1.2
48
- type: :development
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: rspec
52
- prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
54
- none: false
55
- requirements:
56
- - - ~>
57
- - !ruby/object:Gem::Version
58
- segments:
59
- - 2
60
- - 0
61
- - 0
62
- version: 2.0.0
63
- type: :development
64
- version_requirements: *id003
65
- description: Chars is a Ruby library for working with various character sets, recognizing text and generating random text from specific character sets.
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ description: Chars is a Ruby library for working with various character sets, recognizing
28
+ text and generating random text from specific character sets.
66
29
  email: postmodern.mod3@gmail.com
67
30
  executables: []
68
-
69
31
  extensions: []
70
-
71
- extra_rdoc_files:
72
- - README.md
32
+ extra_rdoc_files:
73
33
  - ChangeLog.md
74
34
  - LICENSE.txt
75
- files:
76
- - .document
77
- - .rspec
78
- - .yardopts
35
+ - README.md
36
+ files:
37
+ - ".document"
38
+ - ".gemspec"
39
+ - ".github/workflows/ruby.yml"
40
+ - ".gitignore"
41
+ - ".rspec"
42
+ - ".yardopts"
79
43
  - ChangeLog.md
44
+ - Gemfile
80
45
  - LICENSE.txt
81
46
  - README.md
82
47
  - Rakefile
48
+ - benchmarks/compare.rb
49
+ - benchmarks/strings_in.rb
83
50
  - chars.gemspec
84
51
  - gemspec.yml
85
52
  - lib/chars.rb
@@ -91,43 +58,34 @@ files:
91
58
  - lib/chars/version.rb
92
59
  - spec/char_set_spec.rb
93
60
  - spec/chars_spec.rb
94
- - spec/integer_spec.rb
61
+ - spec/extensions/integer_spec.rb
62
+ - spec/extensions/string_spec.rb
95
63
  - spec/spec_helper.rb
96
- - spec/string_spec.rb
97
- has_rdoc: yard
98
- homepage: http://github.com/postmodern/chars
99
- licenses:
64
+ homepage: https://github.com/postmodern/chars.rb#readme
65
+ licenses:
100
66
  - MIT
101
- post_install_message:
67
+ metadata:
68
+ documentation_uri: https://rubydoc.info/gems/chars
69
+ source_code_uri: https://github.com/postmodern/chars.rb
70
+ bug_tracker_uri: https://github.com/postmodern/chars.rb/issues
71
+ changelog_uri: https://github.com/postmodern/chars.rb/blob/master/ChangeLog.md
72
+ post_install_message:
102
73
  rdoc_options: []
103
-
104
- require_paths:
74
+ require_paths:
105
75
  - lib
106
- required_ruby_version: !ruby/object:Gem::Requirement
107
- none: false
108
- requirements:
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
109
78
  - - ">="
110
- - !ruby/object:Gem::Version
111
- segments:
112
- - 0
113
- version: "0"
114
- required_rubygems_version: !ruby/object:Gem::Requirement
115
- none: false
116
- requirements:
79
+ - !ruby/object:Gem::Version
80
+ version: 2.0.0
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
117
83
  - - ">="
118
- - !ruby/object:Gem::Version
119
- segments:
120
- - 0
121
- version: "0"
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
122
86
  requirements: []
123
-
124
- rubyforge_project: chars
125
- rubygems_version: 1.3.7
126
- signing_key:
127
- specification_version: 3
87
+ rubygems_version: 3.2.22
88
+ signing_key:
89
+ specification_version: 4
128
90
  summary: A Ruby library for working with various character sets
129
- test_files:
130
- - spec/integer_spec.rb
131
- - spec/chars_spec.rb
132
- - spec/char_set_spec.rb
133
- - spec/string_spec.rb
91
+ test_files: []