sbfaulkner-sequel_timestamped 1.0.3 → 1.0.4

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.
data/README.markdown CHANGED
@@ -31,6 +31,10 @@ Install the gem(s):
31
31
 
32
32
  ## UPDATES
33
33
 
34
+ ### 1.0.4
35
+
36
+ - [foca] define callback methods instead of using deprecated api
37
+
34
38
  ### 1.0.3
35
39
 
36
40
  - add support for utc (or localtime) by passing option :using => :utc (or :localtime)
@@ -3,8 +3,8 @@ module Sequel
3
3
  module Timestamped
4
4
  def self.apply(model, options = {})
5
5
  using = options[:using] || :localtime
6
- model.class_eval "before_create { self.created_at = Time.now.#{using} if self.created_at.nil? }" if model.columns.include?(:created_at)
7
- model.class_eval "before_save { self.updated_at = Time.now.#{using} }" if model.columns.include?(:updated_at)
6
+ model.class_eval "def before_create; super; self.created_at = Time.now.#{using} if self.created_at.nil?; end" if model.columns.include?(:created_at)
7
+ model.class_eval "def before_save; super; self.updated_at = Time.now.#{using}; end" if model.columns.include?(:updated_at)
8
8
  end
9
9
  end
10
10
  end
@@ -1,7 +1,7 @@
1
1
  SPEC = Gem::Specification.new do |s|
2
2
  # identify the gem
3
3
  s.name = "sequel_timestamped"
4
- s.version = "1.0.3"
4
+ s.version = "1.0.4"
5
5
  s.author = "S. Brent Faulkner"
6
6
  s.email = "brentf@unwwwired.net"
7
7
  s.homepage = "http://github.com/sbfaulkner/sequel_timestamped"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbfaulkner-sequel_timestamped
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - S. Brent Faulkner
@@ -9,11 +9,12 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-05 00:00:00 -08:00
12
+ date: 2009-04-08 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sequel
17
+ type: :runtime
17
18
  version_requirement:
18
19
  version_requirements: !ruby/object:Gem::Requirement
19
20
  requirements: