dohutil 0.2.21 → 0.2.22

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
  SHA1:
3
- metadata.gz: b8f103855d81471d55d21e5e82d5afe28535076d
4
- data.tar.gz: 67f646fc7603cc1994fa820504e534495cd109ee
3
+ metadata.gz: 155fa31234d015b8cf53f9387291301ab3f94924
4
+ data.tar.gz: ebd7365a1be071cc1e182955d9f6ea1cb0023f6f
5
5
  SHA512:
6
- metadata.gz: 977f1c9ae0a7bd91f6585be7e53d01ef9a915d9bcf73e196997625c188640142cb568e892619d6f1fee319dd9f00624d80138ddda6eee2383c368c0fd7cddaa1
7
- data.tar.gz: 8041f8df2d6e55c16370cf509090a87f0625e0e3f10fe10db5e701d99b19461fd80a958bd65d45d40866beb8b8daf22a099aa44fecf0eaa5bb4a02a0dc087142
6
+ metadata.gz: 90412525f9590864197a27f57e93a352f4ac1728658e821de5dd8bc36d8ae3abd2ea5eda14f7683c5a420f0077e93a47ea5aa32703eac0d884b36d780e1a9aae
7
+ data.tar.gz: 64d44cb9dd7af9e5f1e1bf13898fa9ae8809a10c1b02733859e689337a514bcdbba3bb4ab2e1c70e499636e5595b46b0278fc896e3b6d830ab49f8f38b05b2ac
@@ -0,0 +1,8 @@
1
+ class Random
2
+ def self.current_seed
3
+ curseed = Random.srand(0)
4
+ Random.srand(curseed)
5
+ curseed
6
+ end
7
+ end
8
+
@@ -0,0 +1,7 @@
1
+ def errors_matching(&block)
2
+ m = Module.new
3
+ (class << m; self; end).instance_eval do
4
+ define_method(:===, &block)
5
+ end
6
+ m
7
+ end
@@ -59,6 +59,7 @@ class Test_core_ext_force_deep_copy < DohTest::TestGroup
59
59
  child.var2 = {'key1' => 'val1'}
60
60
  child.var3 = Parent.new
61
61
  child.var3.var1 = ['blah']
62
+ child.var3.var2 = nil
62
63
  child2 = child.dup
63
64
  assert(!child2.var1.equal?(child.var1))
64
65
  assert(!child2.var2.equal?(child.var2))
@@ -0,0 +1,21 @@
1
+ require 'dohutil/exception'
2
+
3
+ module Doh
4
+
5
+ class Test_core_ext_exception < DohTest::TestGroup
6
+ def test_matches
7
+ begin
8
+ raise 'some string it should match'
9
+ rescue errors_matching {|excpt| excpt.to_s =~ /string it should/}
10
+ end
11
+ begin
12
+ raise 'some str it shouldnt match'
13
+ rescue errors_matching {|excpt| excpt.to_s =~ /string it should/}
14
+ assert(false)
15
+ rescue StandardError => _excpt
16
+ assert(true)
17
+ end
18
+ end
19
+ end
20
+
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohutil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.21
4
+ version: 0.2.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makani Mason
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-16 00:00:00.000000000 Z
12
+ date: 2014-12-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dohroot
@@ -61,6 +61,7 @@ extensions: []
61
61
  extra_rdoc_files:
62
62
  - MIT-LICENSE
63
63
  files:
64
+ - MIT-LICENSE
64
65
  - lib/dohutil/app/cli.rb
65
66
  - lib/dohutil/app/init_from_prog.rb
66
67
  - lib/dohutil/app/init_from_pwd.rb
@@ -79,10 +80,12 @@ files:
79
80
  - lib/dohutil/core_ext/force_deep_copy.rb
80
81
  - lib/dohutil/core_ext/hash.rb
81
82
  - lib/dohutil/core_ext/inspect.rb
83
+ - lib/dohutil/core_ext/random.rb
82
84
  - lib/dohutil/core_ext/string.rb
83
85
  - lib/dohutil/current_date.rb
84
86
  - lib/dohutil/disable_verbose.rb
85
87
  - lib/dohutil/env.rb
88
+ - lib/dohutil/exception.rb
86
89
  - lib/dohutil/move_weekday.rb
87
90
  - lib/dohutil/password_helper.rb
88
91
  - lib/dohutil/to_display.rb
@@ -91,8 +94,8 @@ files:
91
94
  - test/core_ext/datewithtime.dt.rb
92
95
  - test/core_ext/force_deep_copy.dt.rb
93
96
  - test/core_ext/string.dt.rb
97
+ - test/exception.dt.rb
94
98
  - test/move_weekday.dt.rb
95
- - MIT-LICENSE
96
99
  homepage: https://github.com/atpsoft/dohutil
97
100
  licenses:
98
101
  - MIT
@@ -113,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
116
  version: '0'
114
117
  requirements: []
115
118
  rubyforge_project:
116
- rubygems_version: 2.0.6
119
+ rubygems_version: 2.4.1
117
120
  signing_key:
118
121
  specification_version: 4
119
122
  summary: assorted tiny utilities
@@ -123,4 +126,5 @@ test_files:
123
126
  - test/core_ext/datewithtime.dt.rb
124
127
  - test/core_ext/force_deep_copy.dt.rb
125
128
  - test/core_ext/string.dt.rb
129
+ - test/exception.dt.rb
126
130
  - test/move_weekday.dt.rb