morph 0.3.5 → 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +2 -0
  2. data/lib/morph.rb +4 -1
  3. data/morph.gemspec +3 -3
  4. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.3.6. call to_time() on XMLRPC::DateTime when setting it as an attribute value
2
+
1
3
  v0.3.5. retain morph_methods when inheriting class and parent both include Morph
2
4
 
3
5
  v0.3.4. return instance morph_attributes ordered by original addition of attribute
data/lib/morph.rb CHANGED
@@ -18,7 +18,7 @@ rescue Exception => e
18
18
  end
19
19
 
20
20
  module Morph
21
- VERSION = "0.3.5" unless defined? Morph::VERSION
21
+ VERSION = "0.3.6" unless defined? Morph::VERSION
22
22
 
23
23
  class << self
24
24
  def generate_migrations object, options={}
@@ -161,6 +161,9 @@ module Morph
161
161
  attributes.each do |name, value|
162
162
  name = name.to_s if name.is_a?(Symbol)
163
163
  attribute = name.gsub(':',' ').underscore
164
+
165
+ value = value.to_time if defined?(XMLRPC::DateTime) && value.is_a?(XMLRPC::DateTime)
166
+
164
167
  case value
165
168
  when String, Date, Time, TrueClass, FalseClass, Fixnum, Float
166
169
  object.morph(attribute, value)
data/morph.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "morph"
5
- s.version = "0.3.5"
5
+ s.version = "0.3.6"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Rob McKinnon"]
9
- s.date = "2012-08-31"
9
+ s.date = "2013-06-03"
10
10
  s.description = "Morph mixin allows you to emerge Ruby class definitions from data via calling assignment methods.\n"
11
11
  s.email = ["rob ~@nospam@~ rubyforge.org"]
12
12
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README"]
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Morph", "--main", "README", "--inline-source"]
17
17
  s.require_paths = ["lib"]
18
18
  s.rubyforge_project = "morph"
19
- s.rubygems_version = "1.8.24"
19
+ s.rubygems_version = "1.8.23"
20
20
  s.summary = "Morph mixin allows you to emerge class definitions via calling assignment methods."
21
21
 
22
22
  if s.respond_to? :specification_version then
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: morph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-31 00:00:00.000000000 Z
12
+ date: 2013-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '1.2'
107
107
  requirements: []
108
108
  rubyforge_project: morph
109
- rubygems_version: 1.8.24
109
+ rubygems_version: 1.8.23
110
110
  signing_key:
111
111
  specification_version: 3
112
112
  summary: Morph mixin allows you to emerge class definitions via calling assignment