epitools 0.5.136 → 0.5.137

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.
@@ -238,9 +238,17 @@ describe String do
238
238
  message.rot13.should_not == message
239
239
  message.rot13.rot13.should == message
240
240
  end
241
+
242
+ it "rotNs" do
243
+ "hi".rot(6).should == "no"
244
+ "IBM".rot(-1).should == "HAL"
245
+ "moz".rot(20).should == "git"
246
+ "ohggf".rot(13).should == "butts"
247
+ "secret".rot(13).should == "secret".rot13
248
+ end
241
249
 
242
250
  it "tightens" do
243
- " hi there".tighten.should == "hi there"
251
+ " hi \tthere \n".tighten.should == "hi there"
244
252
  end
245
253
 
246
254
  it "dewhitespaces" do
@@ -413,6 +421,10 @@ describe String do
413
421
  lambda { "57 butts".parse_units }.should raise_error
414
422
  end
415
423
 
424
+ it "to_hexes" do
425
+ "\0\a".to_hex.should == "0007"
426
+ end
427
+
416
428
  end
417
429
 
418
430
 
@@ -1087,6 +1099,20 @@ describe Range do
1087
1099
  end
1088
1100
 
1089
1101
 
1102
+ describe Date do
1103
+
1104
+ it "finds" do
1105
+ d = Date.parse("2001-01-01")
1106
+ prev_wed = Date.parse("2000-12-27")
1107
+ next_wed = Date.parse("2001-01-03")
1108
+ d.find_backwards { wednesday? }.first == prev_wed
1109
+ d.find_forwards { wednesday? }.first == next_wed
1110
+ d.find_bidirectional { wednesday? }.take(2) == [prev_wed, next_wed]
1111
+ end
1112
+
1113
+ end
1114
+
1115
+
1090
1116
  describe ObjectSpace do
1091
1117
 
1092
1118
  it "is Enumerable" do
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epitools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.136
4
+ version: 0.5.137
5
5
  platform: ruby
6
6
  authors:
7
7
  - epitron
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2023-03-16 00:00:00.000000000 Z
10
+ date: 2026-09-15 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rspec
@@ -54,6 +53,7 @@ files:
54
53
  - lib/epitools/core_ext/argv.rb
55
54
  - lib/epitools/core_ext/array.rb
56
55
  - lib/epitools/core_ext/class.rb
56
+ - lib/epitools/core_ext/date.rb
57
57
  - lib/epitools/core_ext/enumerable.rb
58
58
  - lib/epitools/core_ext/file.rb
59
59
  - lib/epitools/core_ext/hash.rb
@@ -129,7 +129,6 @@ homepage: http://github.com/epitron/epitools
129
129
  licenses:
130
130
  - WTFPL
131
131
  metadata: {}
132
- post_install_message:
133
132
  rdoc_options: []
134
133
  require_paths:
135
134
  - lib
@@ -144,8 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
143
  - !ruby/object:Gem::Version
145
144
  version: '0'
146
145
  requirements: []
147
- rubygems_version: 3.3.25
148
- signing_key:
146
+ rubygems_version: 3.6.9
149
147
  specification_version: 3
150
148
  summary: Not utils... METILS!
151
149
  test_files: []