myrrha 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ # 3.1 / 2014-08-07
2
+
3
+ * Added a coercion rule for Time -> DateTime
4
+ * 'time' is now always required
5
+
1
6
  # 3.0.0 / 2013-02-11
2
7
 
3
8
  * Implementation of domains has been moved to the domain gem. The syntax to create domains
@@ -1,3 +1,4 @@
1
+ require 'time'
1
2
  require_relative "myrrha/version"
2
3
  require_relative "myrrha/loader"
3
4
  require_relative 'myrrha/errors'
@@ -55,7 +55,8 @@ module Myrrha
55
55
  g.coercion Symbol, Module, lambda{|s,t| g.constant_lookup(s.to_s, t) }
56
56
  g.coercion String, Class, lambda{|s,t| g.constant_lookup(s, t) }
57
57
  g.coercion String, Module, lambda{|s,t| g.constant_lookup(s, t) }
58
- g.coercion String, Time, lambda{|s,t| require 'time'; Time.parse(s) }
58
+ g.coercion String, Time, lambda{|s,t| Time.parse(s) }
59
+ g.coercion Time, DateTime, lambda{|s,t| DateTime.parse(s.iso8601) }
59
60
 
60
61
  # By default, we try to invoke :parse on the class
61
62
  g.fallback(String) do |s,t|
@@ -2,7 +2,7 @@ module Myrrha
2
2
  module Version
3
3
 
4
4
  MAJOR = 3
5
- MINOR = 0
5
+ MINOR = 1
6
6
  TINY = 0
7
7
 
8
8
  def self.to_s
@@ -10,7 +10,7 @@ variables:
10
10
  upper:
11
11
  Myrrha
12
12
  version:
13
- 3.0.0
13
+ 3.1.0
14
14
  summary: |-
15
15
  Myrrha provides the coercion framework which is missing to Ruby.
16
16
  description: |-
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myrrha
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
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: 2013-02-11 00:00:00.000000000 Z
12
+ date: 2014-08-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -192,7 +192,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  segments:
194
194
  - 0
195
- hash: 509203281058914080
195
+ hash: -1329841827516948830
196
196
  required_rubygems_version: !ruby/object:Gem::Requirement
197
197
  none: false
198
198
  requirements:
@@ -201,7 +201,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  version: '0'
202
202
  requirements: []
203
203
  rubyforge_project:
204
- rubygems_version: 1.8.24
204
+ rubygems_version: 1.8.25
205
205
  signing_key:
206
206
  specification_version: 3
207
207
  summary: Myrrha provides the coercion framework which is missing to Ruby.