myrrha 3.0.0.rc7 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,10 @@
1
- # 3.0.0 / FIX ME
1
+ # 3.0.0 / 2013-02-11
2
2
 
3
3
  * Implementation of domains has been moved to the domain gem. The syntax to create domains
4
4
  has therefore changed. Myrrha::Domain does no longer exists.
5
5
  * An error handler can now be set on Coercions rules. The default one raises a
6
6
  Myrrha::Error, preserving backward compatibility.
7
+ * Fixed a to_ruby_literal bug that made JRuby using Marshall much too often.
7
8
 
8
9
  # 2.0.0 / 2012-09-26
9
10
 
data/Gemfile CHANGED
@@ -1,21 +1,21 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
3
  group :runtime do
4
- gem "domain", "~> 1.0.0.rc3"
4
+ gem "domain", "~> 1.0"
5
5
  end
6
6
 
7
7
  group :test do
8
- gem "rake", "~> 0.9.2"
9
- gem "rspec", "~> 2.8.0"
8
+ gem "rake", "~> 10.0"
9
+ gem "rspec", "~> 2.10"
10
10
  end
11
11
 
12
12
  group :release do
13
- gem "rake", "~> 0.9.2"
14
- gem "rspec", "~> 2.8.0"
13
+ gem "rake", "~> 10.0"
14
+ gem "rspec", "~> 2.10"
15
15
  gem "wlang", "~> 0.10.2"
16
16
  end
17
17
 
18
18
  group :doc do
19
19
  gem "yard", "~> 0.7.4"
20
- gem "bluecloth", "~> 2.2.0"
20
+ gem "bluecloth", "~> 2.2"
21
21
  end
@@ -3,16 +3,16 @@ GEM
3
3
  specs:
4
4
  bluecloth (2.2.0)
5
5
  diff-lcs (1.1.3)
6
- domain (1.0.0.rc3)
7
- rake (0.9.2.2)
8
- rspec (2.8.0)
9
- rspec-core (~> 2.8.0)
10
- rspec-expectations (~> 2.8.0)
11
- rspec-mocks (~> 2.8.0)
12
- rspec-core (2.8.0)
13
- rspec-expectations (2.8.0)
14
- diff-lcs (~> 1.1.2)
15
- rspec-mocks (2.8.0)
6
+ domain (1.0.0)
7
+ rake (10.0.3)
8
+ rspec (2.12.0)
9
+ rspec-core (~> 2.12.0)
10
+ rspec-expectations (~> 2.12.0)
11
+ rspec-mocks (~> 2.12.0)
12
+ rspec-core (2.12.2)
13
+ rspec-expectations (2.12.1)
14
+ diff-lcs (~> 1.1.3)
15
+ rspec-mocks (2.12.2)
16
16
  wlang (0.10.2)
17
17
  yard (0.7.4)
18
18
 
@@ -21,9 +21,9 @@ PLATFORMS
21
21
  ruby
22
22
 
23
23
  DEPENDENCIES
24
- bluecloth (~> 2.2.0)
25
- domain (~> 1.0.0.rc3)
26
- rake (~> 0.9.2)
27
- rspec (~> 2.8.0)
24
+ bluecloth (~> 2.2)
25
+ domain (~> 1.0)
26
+ rake (~> 10.0)
27
+ rspec (~> 2.10)
28
28
  wlang (~> 0.10.2)
29
29
  yard (~> 0.7.4)
@@ -229,7 +229,7 @@ module Myrrha
229
229
  # otherwise.
230
230
  #
231
231
  def subdomain?(child, parent)
232
- parent >= child rescue false
232
+ (child == parent) || (parent >= child rescue false)
233
233
  end
234
234
 
235
235
  # Extends existing rules
@@ -15,7 +15,7 @@ module Myrrha
15
15
  end
16
16
 
17
17
  # On safe .inspect
18
- safe = lambda{|x| TO_RUBY_THROUGH_INSPECT.include?(x.class)}
18
+ safe = lambda{|x,_| TO_RUBY_THROUGH_INSPECT.include?(x.class)}
19
19
  r.coercion(safe) do |s,t|
20
20
  s.inspect
21
21
  end
@@ -3,7 +3,7 @@ module Myrrha
3
3
 
4
4
  MAJOR = 3
5
5
  MINOR = 0
6
- TINY = "0.rc7"
6
+ TINY = 0
7
7
 
8
8
  def self.to_s
9
9
  [ MAJOR, MINOR, TINY ].join('.')
@@ -123,12 +123,12 @@ Gem::Specification.new do |s|
123
123
  # One call to add_development_dependency('gem_name', 'gem version requirement')
124
124
  # for each development dependency. These gems are required for developers
125
125
  #
126
- s.add_development_dependency("rake", "~> 0.9.2")
127
- s.add_development_dependency("rspec", "~> 2.8.0")
126
+ s.add_development_dependency("rake", "~> 10.0")
127
+ s.add_development_dependency("rspec", "~> 2.10")
128
128
  s.add_development_dependency("yard", "~> 0.7.4")
129
- s.add_development_dependency("bluecloth", "~> 2.2.0")
129
+ s.add_development_dependency("bluecloth", "~> 2.2")
130
130
  s.add_development_dependency("wlang", "~> 0.10.2")
131
- s.add_dependency("domain", "~> 1.0.0.rc3")
131
+ s.add_dependency("domain", "~> 1.0")
132
132
 
133
133
  # The version of ruby required by this gem
134
134
  #
@@ -1,6 +1,6 @@
1
1
  template-info:
2
2
  name: rubygem.noe
3
- version: 1.7.4
3
+ version: 2.0.1
4
4
  manifest:
5
5
  tasks/debug_mail.txt:
6
6
  safe-override: false
@@ -10,7 +10,7 @@ variables:
10
10
  upper:
11
11
  Myrrha
12
12
  version:
13
- 3.0.0.rc7
13
+ 3.0.0
14
14
  summary: |-
15
15
  Myrrha provides the coercion framework which is missing to Ruby.
16
16
  description: |-
@@ -26,11 +26,11 @@ variables:
26
26
  - http://github.com/blambeau/myrrha
27
27
  - http://rubygems.org/gems/myrrha
28
28
  dependencies:
29
- - {name: domain, version: "~> 1.0.0.rc3", groups: [runtime] }
30
- - {name: rake, version: "~> 0.9.2", groups: [test, release]}
31
- - {name: rspec, version: "~> 2.8.0", groups: [test, release]}
29
+ - {name: domain, version: "~> 1.0", groups: [runtime] }
30
+ - {name: rake, version: "~> 10.0", groups: [test, release]}
31
+ - {name: rspec, version: "~> 2.10", groups: [test, release]}
32
32
  - {name: yard, version: "~> 0.7.4", groups: [doc ]}
33
- - {name: bluecloth, version: "~> 2.2.0", groups: [doc ]}
33
+ - {name: bluecloth, version: "~> 2.2", groups: [doc ]}
34
34
  - {name: wlang, version: "~> 0.10.2", groups: [release ]}
35
35
  rake_tasks:
36
36
  debug_mail:
@@ -9,10 +9,15 @@ module Myrrha
9
9
  end
10
10
  end
11
11
 
12
- specify {
12
+ it 'works as expected with modules and classes' do
13
13
  r.subdomain?(Symbol, Object).should be_true
14
14
  r.subdomain?(Class, Module).should be_true
15
- }
15
+ end
16
+
17
+ it 'works as expected with Symbol target domains' do
18
+ r.subdomain?(:to_ruby_literal, :to_ruby_literal).should be_true
19
+ r.subdomain?(:to_ruby_literal, :none).should be_false
20
+ end
16
21
 
17
22
  end
18
23
  end
@@ -1,12 +1,16 @@
1
1
  require 'spec_helper'
2
2
  describe "to_ruby_literal" do
3
3
 
4
+ it 'works on Symbols' do
5
+ Myrrha::ToRubyLiteral.apply(:name).should eq(':name')
6
+ end
7
+
4
8
  $VALUES.each do |value|
5
9
  describe "on #{value.inspect}" do
6
- specify{ Kernel.eval(value.to_ruby_literal).should eq(value) }
10
+ specify{ Kernel.eval(value.to_ruby_literal).should eq(value) }
7
11
  end
8
12
  end
9
-
13
+
10
14
  it "should work on objects that implement to_ruby_literal" do
11
15
  class ToRubyLiteralizable
12
16
  def to_ruby_literal
@@ -15,5 +19,5 @@ describe "to_ruby_literal" do
15
19
  end
16
20
  Myrrha.to_ruby_literal(ToRubyLiteralizable.new).should eq(:foo)
17
21
  end
18
-
22
+
19
23
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myrrha
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc7
5
- prerelease: 6
4
+ version: 3.0.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Bernard Lambeau
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-25 00:00:00.000000000 Z
12
+ date: 2013-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.9.2
21
+ version: '10.0'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 0.9.2
29
+ version: '10.0'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rspec
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - ~>
36
36
  - !ruby/object:Gem::Version
37
- version: 2.8.0
37
+ version: '2.10'
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - ~>
44
44
  - !ruby/object:Gem::Version
45
- version: 2.8.0
45
+ version: '2.10'
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: yard
48
48
  requirement: !ruby/object:Gem::Requirement
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 2.2.0
69
+ version: '2.2'
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: 2.2.0
77
+ version: '2.2'
78
78
  - !ruby/object:Gem::Dependency
79
79
  name: wlang
80
80
  requirement: !ruby/object:Gem::Requirement
@@ -98,7 +98,7 @@ dependencies:
98
98
  requirements:
99
99
  - - ~>
100
100
  - !ruby/object:Gem::Version
101
- version: 1.0.0.rc3
101
+ version: '1.0'
102
102
  type: :runtime
103
103
  prerelease: false
104
104
  version_requirements: !ruby/object:Gem::Requirement
@@ -106,7 +106,7 @@ dependencies:
106
106
  requirements:
107
107
  - - ~>
108
108
  - !ruby/object:Gem::Version
109
- version: 1.0.0.rc3
109
+ version: '1.0'
110
110
  description: ! "Myrrha provides the coercion framework which is missing to Ruby. Coercions\nare
111
111
  simply defined as a set of rules for converting values from source to target\ndomains
112
112
  (in an abstract sense). As a typical and useful example, it comes with \na coerce()
@@ -190,12 +190,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
190
190
  - - ! '>='
191
191
  - !ruby/object:Gem::Version
192
192
  version: '0'
193
+ segments:
194
+ - 0
195
+ hash: 509203281058914080
193
196
  required_rubygems_version: !ruby/object:Gem::Requirement
194
197
  none: false
195
198
  requirements:
196
- - - ! '>'
199
+ - - ! '>='
197
200
  - !ruby/object:Gem::Version
198
- version: 1.3.1
201
+ version: '0'
199
202
  requirements: []
200
203
  rubyforge_project:
201
204
  rubygems_version: 1.8.24