hammock 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.5.2 2009-10-29
2
+ Added Time#to_i_msec.
3
+
4
+
1
5
  == 0.5.1 2009-10-28
2
6
  Added Numeric#commas, #sigfigs and #xsecs.
3
7
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
data/hammock.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hammock}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ben Hoskings"]
12
- s.date = %q{2009-10-28}
12
+ s.date = %q{2009-10-29}
13
13
  s.description = %q{}
14
14
  s.email = %q{ben@hoskings.net}
15
15
  s.extra_rdoc_files = [
@@ -52,6 +52,7 @@ Gem::Specification.new do |s|
52
52
  "lib/hammock/monkey_patches/object.rb",
53
53
  "lib/hammock/monkey_patches/route_set.rb",
54
54
  "lib/hammock/monkey_patches/string.rb",
55
+ "lib/hammock/monkey_patches/time.rb",
55
56
  "lib/hammock/mutex.rb",
56
57
  "lib/hammock/overrides.rb",
57
58
  "lib/hammock/resource_mapping_hooks.rb",
data/lib/hammock.rb CHANGED
@@ -4,7 +4,7 @@ require 'ambition'
4
4
  require 'ambition/adapters/active_record'
5
5
 
6
6
  module Hammock
7
- VERSION = '0.5.1'
7
+ VERSION = '0.5.2'
8
8
  IncludeTarget = ActionController::Base
9
9
 
10
10
  def self.included base # :nodoc:
@@ -0,0 +1,21 @@
1
+ module Hammock
2
+ module TimePatches
3
+ MixInto = Time
4
+
5
+ def self.included base # :nodoc:
6
+ base.send :include, InstanceMethods
7
+ base.send :extend, ClassMethods # TODO maybe include in the metaclass instead of extending the class?
8
+ end
9
+
10
+ module ClassMethods
11
+ end
12
+
13
+ module InstanceMethods
14
+
15
+ def to_i_msec
16
+ (to_f * 1000).floor
17
+ end
18
+
19
+ end
20
+ end
21
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Hoskings
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-28 00:00:00 +11:00
12
+ date: 2009-10-29 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -77,6 +77,7 @@ files:
77
77
  - lib/hammock/monkey_patches/object.rb
78
78
  - lib/hammock/monkey_patches/route_set.rb
79
79
  - lib/hammock/monkey_patches/string.rb
80
+ - lib/hammock/monkey_patches/time.rb
80
81
  - lib/hammock/mutex.rb
81
82
  - lib/hammock/overrides.rb
82
83
  - lib/hammock/resource_mapping_hooks.rb