dm-timestamps 0.9.9 → 0.9.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,9 @@
1
+ === 0.9.10 / 2009-01-19
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Updated to set the timestamp for new records
6
+
1
7
  === 0.9.9 / 2009-01-04
2
8
 
3
9
  * 1 bug fix:
@@ -1,6 +1,6 @@
1
1
  require 'rubygems'
2
2
 
3
- gem 'dm-core', '~>0.9.9'
3
+ gem 'dm-core', '~>0.9.10'
4
4
  require 'dm-core'
5
5
 
6
6
  module DataMapper
@@ -23,7 +23,7 @@ module DataMapper
23
23
  private
24
24
 
25
25
  def set_timestamps
26
- return unless dirty?
26
+ return unless dirty? || new_record?
27
27
  TIMESTAMP_PROPERTIES.each do |name,(_type,proc)|
28
28
  if model.properties.has_property?(name)
29
29
  model.properties[name].set(self, proc.call(self, model.properties[name])) unless attribute_dirty?(name)
@@ -1,5 +1,5 @@
1
1
  module DataMapper
2
2
  module Timestamps
3
- VERSION = '0.9.9'
3
+ VERSION = '0.9.10'
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ require Pathname(__FILE__).dirname.expand_path.parent + 'spec_helper'
3
3
 
4
4
  # run the specs with dm-validations, if available
5
5
  begin
6
- gem 'dm-validations', '~>0.9.9'
6
+ gem 'dm-validations', '~>0.9.10'
7
7
  require 'dm-validations'
8
8
  rescue LoadError
9
9
  # do nothing
@@ -8,7 +8,7 @@ begin
8
8
  desc 'Run specifications'
9
9
  Spec::Rake::SpecTask.new(:spec) do |t|
10
10
  t.spec_opts << '--options' << 'spec/spec.opts' if File.exists?('spec/spec.opts')
11
- t.spec_files = Pathname.glob((ROOT + 'spec/**/*_spec.rb').to_s)
11
+ t.spec_files = Pathname.glob((ROOT + 'spec/**/*_spec.rb').to_s).map { |f| f.to_s }
12
12
 
13
13
  begin
14
14
  gem 'rcov', '~>0.8'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-timestamps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 0.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foy Savas
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-04 00:00:00 -08:00
12
+ date: 2009-01-19 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.9
23
+ version: 0.9.10
24
24
  version:
25
25
  description: DataMapper plugin for magical timestamps
26
26
  email: