dohutil 0.2.15 → 0.2.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2de6b7bc26a1564bbbd0264d949e62c47ed5c9e
4
- data.tar.gz: 5d44a1d2bf47503018e9e2b8800d339bf92e382a
3
+ metadata.gz: 9943e3b40985ecf8e35a51a232ad923a9338ef16
4
+ data.tar.gz: a3dcee6a012b55181f5ce547138d3e50f207799c
5
5
  SHA512:
6
- metadata.gz: 9d3d281cc7588f75162046022593780ee0e41f468fff0e93c845c013485461934fe90c25a3e8d2b71d2585377f2941d44071797eb8f073bc78331c207203568e
7
- data.tar.gz: a4e3c947bd80b804e1db9de21de298d3d59156a1ace88eca34d3c5b8590952d678ad4067c56963690b58c59b175a6a6d51a9ca51eb160788e36639c117bc34fc
6
+ metadata.gz: 9f36348f48ed710c54f11ff3f4b4de92d850d667639dce1319e8d93fd18049e25db37181b6e1b9f63cf29f48a711937d1a0ed494fd7aed1ee83c9c782491f039
7
+ data.tar.gz: e1a8bb8677cb7784ea570cebda7793523bfc31cdfbac943e2312109566314ccca20b76bccda3f81499bb8e25d76c8bcc71c1ca7b489f1b51b39c4826c1f38d9c
@@ -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
+
@@ -28,6 +28,10 @@ def clear_current_date
28
28
  @current_date_stack.clear
29
29
  end
30
30
 
31
+ def date_as_start_of_day(date_obj, &block)
32
+ date_as(DateTime.new(date_obj.year, date_obj.month, date_obj.day, 0, 0, 0), &block)
33
+ end
34
+
31
35
  def date_as(date_obj)
32
36
  push_current_date(date_obj)
33
37
  begin
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.15
4
+ version: 0.2.16
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: 2013-06-27 00:00:00.000000000 Z
12
+ date: 2013-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dohroot
@@ -77,6 +77,7 @@ files:
77
77
  - lib/dohutil/core_ext/force_deep_copy.rb
78
78
  - lib/dohutil/core_ext/hash.rb
79
79
  - lib/dohutil/core_ext/inspect.rb
80
+ - lib/dohutil/core_ext/random.rb
80
81
  - lib/dohutil/core_ext/string.rb
81
82
  - lib/dohutil/current_date.rb
82
83
  - lib/dohutil/env.rb
@@ -108,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
109
  version: '0'
109
110
  requirements: []
110
111
  rubyforge_project:
111
- rubygems_version: 2.0.3
112
+ rubygems_version: 2.0.2
112
113
  signing_key:
113
114
  specification_version: 4
114
115
  summary: assorted tiny utilities