myrrha 1.2.1 → 1.2.2
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/CHANGELOG.md +17 -0
- data/Gemfile +5 -6
- data/Gemfile.lock +15 -15
- data/README.md +5 -2
- data/Rakefile +1 -1
- data/lib/myrrha.rb +15 -9
- data/lib/myrrha/loader.rb +1 -0
- data/lib/myrrha/version.rb +5 -5
- data/myrrha.gemspec +28 -28
- data/myrrha.noespec +6 -8
- data/spec/coercions/test_dup.rb +18 -6
- data/tasks/debug_mail.rake +42 -45
- data/tasks/gem.rake +13 -13
- data/tasks/spec_test.rake +8 -16
- data/tasks/unit_test.rake +9 -10
- data/tasks/yard.rake +13 -13
- metadata +68 -107
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
# 1.2.2 / 2012-01-26
|
2
|
+
|
3
|
+
* Ensure that inheritance intuitively applies when duplicating a set of coercion
|
4
|
+
rules. Rules that, in the parent, rely on the recursive application of other
|
5
|
+
rules (such as recursively applying coercions on arrays) will now correctly
|
6
|
+
use the rules defined on the duplicated Coercions object.
|
7
|
+
|
8
|
+
In particular, this means that the following scenario now correctly works:
|
9
|
+
|
10
|
+
Dupped = Myrrha::ToRubyLiteral.dup.append do |r|
|
11
|
+
r.coercion(Foo){|s,_| ...}
|
12
|
+
end
|
13
|
+
Dupped.apply([1, Foo.new])
|
14
|
+
|
15
|
+
In the scenario above, Foo was marshalled as the new rules was not used by
|
16
|
+
the Array rule, defined on the parent.
|
17
|
+
|
1
18
|
# 1.2.1 / 2011-08-31
|
2
19
|
|
3
20
|
* Regenerated gem using Ruby 1.8.7, to avoid Rubygems/Syck/Ruby issues (see
|
data/Gemfile
CHANGED
@@ -2,17 +2,16 @@ source 'http://rubygems.org'
|
|
2
2
|
|
3
3
|
group :test do
|
4
4
|
gem "rake", "~> 0.9.2"
|
5
|
-
gem "rspec", "~> 2.
|
5
|
+
gem "rspec", "~> 2.8.0"
|
6
6
|
end
|
7
7
|
|
8
8
|
group :release do
|
9
9
|
gem "rake", "~> 0.9.2"
|
10
|
-
gem "rspec", "~> 2.
|
11
|
-
gem "wlang", "~> 0.10.
|
10
|
+
gem "rspec", "~> 2.8.0"
|
11
|
+
gem "wlang", "~> 0.10.2"
|
12
12
|
end
|
13
13
|
|
14
14
|
group :doc do
|
15
|
-
gem "yard", "~> 0.7.
|
16
|
-
gem "bluecloth", "~> 2.
|
15
|
+
gem "yard", "~> 0.7.4"
|
16
|
+
gem "bluecloth", "~> 2.2.0"
|
17
17
|
end
|
18
|
-
|
data/Gemfile.lock
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
bluecloth (2.
|
5
|
-
diff-lcs (1.1.
|
6
|
-
rake (0.9.2)
|
7
|
-
rspec (2.
|
8
|
-
rspec-core (~> 2.
|
9
|
-
rspec-expectations (~> 2.
|
10
|
-
rspec-mocks (~> 2.
|
11
|
-
rspec-core (2.
|
12
|
-
rspec-expectations (2.
|
4
|
+
bluecloth (2.2.0)
|
5
|
+
diff-lcs (1.1.3)
|
6
|
+
rake (0.9.2.2)
|
7
|
+
rspec (2.8.0)
|
8
|
+
rspec-core (~> 2.8.0)
|
9
|
+
rspec-expectations (~> 2.8.0)
|
10
|
+
rspec-mocks (~> 2.8.0)
|
11
|
+
rspec-core (2.8.0)
|
12
|
+
rspec-expectations (2.8.0)
|
13
13
|
diff-lcs (~> 1.1.2)
|
14
|
-
rspec-mocks (2.
|
14
|
+
rspec-mocks (2.8.0)
|
15
15
|
wlang (0.10.2)
|
16
|
-
yard (0.7.
|
16
|
+
yard (0.7.4)
|
17
17
|
|
18
18
|
PLATFORMS
|
19
19
|
java
|
20
20
|
ruby
|
21
21
|
|
22
22
|
DEPENDENCIES
|
23
|
-
bluecloth (~> 2.
|
23
|
+
bluecloth (~> 2.2.0)
|
24
24
|
rake (~> 0.9.2)
|
25
|
-
rspec (~> 2.
|
26
|
-
wlang (~> 0.10.
|
27
|
-
yard (~> 0.7.
|
25
|
+
rspec (~> 2.8.0)
|
26
|
+
wlang (~> 0.10.2)
|
27
|
+
yard (~> 0.7.4)
|
data/README.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
# Myrrha (v1.
|
1
|
+
# Myrrha (v1.2.2)
|
2
|
+
|
3
|
+
[](http://travis-ci.org/blambeau/myrrha)
|
4
|
+
[](https://gemnasium.com/blambeau/myrrha)
|
2
5
|
|
3
6
|
## Description
|
4
7
|
|
@@ -17,7 +20,7 @@ a numeric, a boolean, a date, a time, an URI, and so on.
|
|
17
20
|
# Bug fixes (tiny) do not even add new default rules to coerce and
|
18
21
|
# to\_ruby\_literal. Minor version can, which could break your code.
|
19
22
|
# Therefore, please always use:
|
20
|
-
gem "myrrha", "~> 1.
|
23
|
+
gem "myrrha", "~> 1.2.2"
|
21
24
|
|
22
25
|
## Links
|
23
26
|
|
data/Rakefile
CHANGED
data/lib/myrrha.rb
CHANGED
@@ -112,13 +112,14 @@ module Myrrha
|
|
112
112
|
#
|
113
113
|
# Creates an empty list of coercion rules
|
114
114
|
#
|
115
|
-
def initialize(
|
116
|
-
@
|
117
|
-
@
|
118
|
-
@
|
115
|
+
def initialize(&defn)
|
116
|
+
@definitions = []
|
117
|
+
@upons = []
|
118
|
+
@rules = []
|
119
|
+
@fallbacks = []
|
119
120
|
@appender = :<<
|
120
|
-
@main_target_domain =
|
121
|
-
|
121
|
+
@main_target_domain = nil
|
122
|
+
extend_rules(:<<, defn) if defn
|
122
123
|
end
|
123
124
|
|
124
125
|
#
|
@@ -333,13 +334,18 @@ module Myrrha
|
|
333
334
|
# @return [Coercions] a copy of this set of rules
|
334
335
|
#
|
335
336
|
def dup
|
336
|
-
Coercions.new
|
337
|
+
c = Coercions.new
|
338
|
+
@definitions.each do |defn|
|
339
|
+
c.extend_rules(*defn)
|
340
|
+
end
|
341
|
+
c
|
337
342
|
end
|
338
343
|
|
339
|
-
|
344
|
+
protected
|
340
345
|
|
341
346
|
# Extends existing rules
|
342
347
|
def extend_rules(appender, block)
|
348
|
+
@definitions << [appender, block]
|
343
349
|
@appender = appender
|
344
350
|
block.call(self)
|
345
351
|
self
|
@@ -382,4 +388,4 @@ module Myrrha
|
|
382
388
|
|
383
389
|
end # module Myrrha
|
384
390
|
require "myrrha/version"
|
385
|
-
require "myrrha/loader"
|
391
|
+
require "myrrha/loader"
|
data/lib/myrrha/loader.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
|
data/lib/myrrha/version.rb
CHANGED
data/myrrha.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# We require your library, mainly to have access to the VERSION number.
|
1
|
+
# We require your library, mainly to have access to the VERSION number.
|
2
2
|
# Feel free to set $version manually.
|
3
3
|
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
|
4
4
|
require "myrrha/version"
|
@@ -9,15 +9,15 @@ $version = Myrrha::Version.to_s
|
|
9
9
|
# should be correctly packaged given what you have described in the .noespec file.
|
10
10
|
#
|
11
11
|
Gem::Specification.new do |s|
|
12
|
-
|
12
|
+
|
13
13
|
################################################################### ABOUT YOUR GEM
|
14
|
-
|
15
|
-
# Gem name (required)
|
14
|
+
|
15
|
+
# Gem name (required)
|
16
16
|
s.name = "myrrha"
|
17
|
-
|
17
|
+
|
18
18
|
# Gem version (required)
|
19
19
|
s.version = $version
|
20
|
-
|
20
|
+
|
21
21
|
# A short summary of this gem
|
22
22
|
#
|
23
23
|
# This is displayed in `gem list -d`.
|
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
# The description should be more detailed than the summary. For example,
|
29
29
|
# you might wish to copy the entire README into the description.
|
30
30
|
s.description = "Myrrha provides the coercion framework which is missing to Ruby. Coercions\nare simply defined as a set of rules for converting values from source to target\ndomains (in an abstract sense). As a typical and useful example, it comes with \na coerce() method providing a unique entry point for converting a string to \na numeric, a boolean, a date, a time, an URI, and so on. "
|
31
|
-
|
31
|
+
|
32
32
|
# The URL of this gem home page (optional)
|
33
33
|
s.homepage = "http://rubydoc.info/github/blambeau/myrrha/master/frames"
|
34
34
|
|
@@ -38,7 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
# you know what you do!
|
39
39
|
#
|
40
40
|
# s.date = Time.now.strftime('%Y-%m-%d')
|
41
|
-
|
41
|
+
|
42
42
|
# The license(s) for the library. Each license must be a short name, no
|
43
43
|
# more than 64 characters.
|
44
44
|
#
|
@@ -49,35 +49,35 @@ Gem::Specification.new do |s|
|
|
49
49
|
# s.rubyforge_project = nil
|
50
50
|
|
51
51
|
################################################################### ABOUT THE AUTHORS
|
52
|
-
|
52
|
+
|
53
53
|
# The list of author names who wrote this gem.
|
54
54
|
#
|
55
55
|
# If you are providing multiple authors and multiple emails they should be
|
56
56
|
# in the same order.
|
57
|
-
#
|
57
|
+
#
|
58
58
|
s.authors = ["Bernard Lambeau"]
|
59
|
-
|
59
|
+
|
60
60
|
# Contact emails for this gem
|
61
61
|
#
|
62
62
|
# If you are providing multiple authors and multiple emails they should be
|
63
63
|
# in the same order.
|
64
64
|
#
|
65
|
-
# NOTE: Somewhat strangly this attribute is always singular!
|
65
|
+
# NOTE: Somewhat strangly this attribute is always singular!
|
66
66
|
# Don't replace by s.emails = ...
|
67
67
|
s.email = ["blambeau@gmail.com"]
|
68
68
|
|
69
69
|
################################################################### PATHS, FILES, BINARIES
|
70
|
-
|
71
|
-
# Paths in the gem to add to $LOAD_PATH when this gem is
|
70
|
+
|
71
|
+
# Paths in the gem to add to $LOAD_PATH when this gem is
|
72
72
|
# activated (required).
|
73
73
|
#
|
74
74
|
# The default 'lib' is typically sufficient.
|
75
75
|
s.require_paths = ["lib"]
|
76
|
-
|
76
|
+
|
77
77
|
# Files included in this gem.
|
78
78
|
#
|
79
79
|
# By default, we take all files included in the Manifest.txt file on root
|
80
|
-
# of the project. Entries of the manifest are interpreted as Dir[...]
|
80
|
+
# of the project. Entries of the manifest are interpreted as Dir[...]
|
81
81
|
# patterns so that lazy people may use wilcards like lib/**/*
|
82
82
|
#
|
83
83
|
here = File.expand_path(File.dirname(__FILE__))
|
@@ -107,7 +107,7 @@ Gem::Specification.new do |s|
|
|
107
107
|
# <= Less than or equal to
|
108
108
|
# ~> Approximately greater than
|
109
109
|
#
|
110
|
-
# Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
|
110
|
+
# Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
|
111
111
|
# for setting your gem version.
|
112
112
|
#
|
113
113
|
# For your requirements to other gems, remember that
|
@@ -119,15 +119,15 @@ Gem::Specification.new do |s|
|
|
119
119
|
|
120
120
|
#
|
121
121
|
# One call to add_dependency('gem_name', 'gem version requirement') for each
|
122
|
-
# runtime dependency. These gems will be installed with your gem.
|
122
|
+
# runtime dependency. These gems will be installed with your gem.
|
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
126
|
s.add_development_dependency("rake", "~> 0.9.2")
|
127
|
-
s.add_development_dependency("rspec", "~> 2.
|
128
|
-
s.add_development_dependency("yard", "~> 0.7.
|
129
|
-
s.add_development_dependency("bluecloth", "~> 2.
|
130
|
-
s.add_development_dependency("wlang", "~> 0.10.
|
127
|
+
s.add_development_dependency("rspec", "~> 2.8.0")
|
128
|
+
s.add_development_dependency("yard", "~> 0.7.4")
|
129
|
+
s.add_development_dependency("bluecloth", "~> 2.2.0")
|
130
|
+
s.add_development_dependency("wlang", "~> 0.10.2")
|
131
131
|
|
132
132
|
|
133
133
|
# The version of ruby required by this gem
|
@@ -144,18 +144,18 @@ Gem::Specification.new do |s|
|
|
144
144
|
#
|
145
145
|
# s.platform = nil
|
146
146
|
|
147
|
-
# Extensions to build when installing the gem.
|
147
|
+
# Extensions to build when installing the gem.
|
148
148
|
#
|
149
|
-
# Valid types of extensions are extconf.rb files, configure scripts
|
149
|
+
# Valid types of extensions are extconf.rb files, configure scripts
|
150
150
|
# and rakefiles or mkrf_conf files.
|
151
151
|
#
|
152
152
|
s.extensions = []
|
153
|
-
|
154
|
-
# External (to RubyGems) requirements that must be met for this gem to work.
|
153
|
+
|
154
|
+
# External (to RubyGems) requirements that must be met for this gem to work.
|
155
155
|
# It’s simply information for the user.
|
156
156
|
#
|
157
157
|
s.requirements = nil
|
158
|
-
|
158
|
+
|
159
159
|
# A message that gets displayed after the gem is installed
|
160
160
|
#
|
161
161
|
# Uncomment and set this if you want to say something to the user
|
@@ -173,7 +173,7 @@ Gem::Specification.new do |s|
|
|
173
173
|
# details.
|
174
174
|
#
|
175
175
|
# s.cert_chain = []
|
176
|
-
|
176
|
+
|
177
177
|
################################################################### RDOC
|
178
178
|
|
179
179
|
# An ARGV style array of options to RDoc
|
data/myrrha.noespec
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
# Noe template for ruby gem libraries (https://github.com/blambeau/noe) - short version
|
2
|
-
# Run 'noe show-spec' and 'noe help show-spec' for additional details.
|
3
1
|
template-info:
|
4
2
|
name: "ruby"
|
5
|
-
version: 1.
|
3
|
+
version: 1.7.0
|
6
4
|
manifest:
|
7
5
|
tasks/debug_mail.txt:
|
8
6
|
safe-override: false
|
@@ -12,7 +10,7 @@ variables:
|
|
12
10
|
upper:
|
13
11
|
Myrrha
|
14
12
|
version:
|
15
|
-
1.2.
|
13
|
+
1.2.2
|
16
14
|
summary: |-
|
17
15
|
Myrrha provides the coercion framework which is missing to Ruby.
|
18
16
|
description: |-
|
@@ -29,10 +27,10 @@ variables:
|
|
29
27
|
- http://rubygems.org/gems/myrrha
|
30
28
|
dependencies:
|
31
29
|
- {name: rake, version: "~> 0.9.2", groups: [test, release]}
|
32
|
-
- {name: rspec, version: "~> 2.
|
33
|
-
- {name: yard, version: "~> 0.7.
|
34
|
-
- {name: bluecloth, version: "~> 2.
|
35
|
-
- {name: wlang, version: "~> 0.10.
|
30
|
+
- {name: rspec, version: "~> 2.8.0", groups: [test, release]}
|
31
|
+
- {name: yard, version: "~> 0.7.4", groups: [doc ]}
|
32
|
+
- {name: bluecloth, version: "~> 2.2.0", groups: [doc ]}
|
33
|
+
- {name: wlang, version: "~> 0.10.2", groups: [release ]}
|
36
34
|
rake_tasks:
|
37
35
|
debug_mail:
|
38
36
|
rx_changelog_sections: /^# /
|
data/spec/coercions/test_dup.rb
CHANGED
@@ -2,13 +2,17 @@ require 'spec_helper'
|
|
2
2
|
module Myrrha
|
3
3
|
describe "Coercions#dup" do
|
4
4
|
let(:rules){ Coercions.new{|r|
|
5
|
-
r.coercion String, Integer, lambda{|s,t| Integer(s)}
|
5
|
+
r.coercion String, Integer, lambda{|s,t| Integer(s) }
|
6
|
+
r.coercion Array, Integer, lambda{|s,t|
|
7
|
+
s.inject(0){|sum,x| sum + r.apply(x,t)}
|
8
|
+
}
|
6
9
|
}}
|
7
|
-
|
10
|
+
|
8
11
|
it "should duplicate the rules" do
|
9
12
|
rules.dup.coerce("12", Integer).should eql(12)
|
13
|
+
rules.dup.coerce(["12", "10"], Integer).should eql(22)
|
10
14
|
end
|
11
|
-
|
15
|
+
|
12
16
|
it "should not touch the original" do
|
13
17
|
dupped = rules.dup.append do |r|
|
14
18
|
r.coercion String, Float, lambda{|s,t| Float(s)}
|
@@ -16,13 +20,21 @@ module Myrrha
|
|
16
20
|
dupped.coerce("12", Float).should eql(12.0)
|
17
21
|
lambda{ rules.coerce("12", Float) }.should raise_error(Myrrha::Error)
|
18
22
|
end
|
19
|
-
|
23
|
+
|
20
24
|
it "should not forget main_target_domain" do
|
21
25
|
rules = Coercions.new do |r|
|
22
26
|
r.main_target_domain = Integer
|
23
27
|
end
|
24
28
|
rules.dup.main_target_domain.should eql(Integer)
|
25
29
|
end
|
26
|
-
|
30
|
+
|
31
|
+
it 'should apply inheritance in a intuitive way' do
|
32
|
+
dupped = rules.dup.append do |r|
|
33
|
+
r.coercion Float, Integer, lambda{|s,t| s.round}
|
34
|
+
end
|
35
|
+
dupped.coerce(12.15, Integer).should eq(12)
|
36
|
+
dupped.coerce([12.15, 10], Integer).should eq(22)
|
37
|
+
end
|
38
|
+
|
27
39
|
end
|
28
|
-
end
|
40
|
+
end
|
data/tasks/debug_mail.rake
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Installs a rake task for debuging the announcement mail.
|
2
2
|
#
|
3
3
|
# This file installs the 'rake debug_mail' that flushes an announcement mail
|
4
|
-
# for your library on the standard output. It is automatically generated
|
5
|
-
# by Noe from your .noespec file, and should therefore be configured there,
|
4
|
+
# for your library on the standard output. It is automatically generated
|
5
|
+
# by Noe from your .noespec file, and should therefore be configured there,
|
6
6
|
# under the variables/rake_tasks/debug_mail entry, as illustrated below:
|
7
7
|
#
|
8
8
|
# variables:
|
@@ -12,9 +12,9 @@
|
|
12
12
|
# nb_changelog_sections: 1
|
13
13
|
# ...
|
14
14
|
#
|
15
|
-
# If you have specific needs requiring manual intervention on this file,
|
15
|
+
# If you have specific needs requiring manual intervention on this file,
|
16
16
|
# don't forget to set safe-override to false in your noe specification:
|
17
|
-
#
|
17
|
+
#
|
18
18
|
# template-info:
|
19
19
|
# manifest:
|
20
20
|
# tasks/debug_mail.rake:
|
@@ -22,8 +22,8 @@
|
|
22
22
|
#
|
23
23
|
# The mail template used can be found in debug_mail.txt. That file may be
|
24
24
|
# changed to tune the mail you want to send. If you do so, don't forget to
|
25
|
-
# add a manifest entry in your .noespec file to avoid overriding you
|
26
|
-
# changes. The mail template uses wlang, with parentheses for block
|
25
|
+
# add a manifest entry in your .noespec file to avoid overriding you
|
26
|
+
# changes. The mail template uses wlang, with parentheses for block
|
27
27
|
# delimiters.
|
28
28
|
#
|
29
29
|
# template-info:
|
@@ -31,48 +31,45 @@
|
|
31
31
|
# tasks/debug_mail.txt:
|
32
32
|
# safe-override: false
|
33
33
|
#
|
34
|
-
|
35
|
-
|
34
|
+
desc "Debug the release announcement mail"
|
35
|
+
task :debug_mail do
|
36
|
+
begin
|
37
|
+
require 'wlang'
|
38
|
+
rescue LoadError
|
39
|
+
abort "wlang is not available. Try 'gem install wlang'"
|
40
|
+
end
|
36
41
|
require 'yaml'
|
37
|
-
|
38
|
-
desc "Debug the release announcement mail"
|
39
|
-
task :debug_mail do
|
40
|
-
# Check that a .noespec file exists
|
41
|
-
noespec_file = File.expand_path('../../myrrha.noespec', __FILE__)
|
42
|
-
unless File.exists?(noespec_file)
|
43
|
-
raise "Unable to find .noespec project file, sorry."
|
44
|
-
end
|
45
|
-
|
46
|
-
# Load it as well as variables and options
|
47
|
-
noespec = YAML::load(File.read(noespec_file))
|
48
|
-
vars = noespec['variables'] || {}
|
49
|
-
|
50
|
-
# Changes are taken from CHANGELOG
|
51
|
-
logs = Dir[File.expand_path("../../CHANGELOG.*", __FILE__)]
|
52
|
-
unless logs.size == 1
|
53
|
-
abort "Unable to find a changelog file"
|
54
|
-
end
|
55
42
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
break if end_found >= 1
|
61
|
-
end_found += 1
|
62
|
-
end
|
63
|
-
changes << line
|
64
|
-
}
|
65
|
-
vars['changes'] = changes.join
|
66
|
-
|
67
|
-
# WLang template
|
68
|
-
template = File.expand_path('../debug_mail.txt', __FILE__)
|
69
|
-
|
70
|
-
# Let's go!
|
71
|
-
$stdout << WLang::file_instantiate(template, vars, "wlang/active-text")
|
43
|
+
# Check that a .noespec file exists
|
44
|
+
noespec_file = File.expand_path('../../myrrha.noespec', __FILE__)
|
45
|
+
unless File.exists?(noespec_file)
|
46
|
+
raise "Unable to find .noespec project file, sorry."
|
72
47
|
end
|
73
48
|
|
74
|
-
|
75
|
-
|
76
|
-
|
49
|
+
# Load it as well as variables and options
|
50
|
+
noespec = YAML::load(File.read(noespec_file))
|
51
|
+
vars = noespec['variables'] || {}
|
52
|
+
|
53
|
+
# Changes are taken from CHANGELOG
|
54
|
+
logs = Dir[File.expand_path("../../CHANGELOG.*", __FILE__)]
|
55
|
+
unless logs.size == 1
|
56
|
+
abort "Unable to find a changelog file"
|
77
57
|
end
|
58
|
+
|
59
|
+
# Load interesting changesets
|
60
|
+
changes, end_found = [], 0
|
61
|
+
File.readlines(logs.first).select{|line|
|
62
|
+
if line =~ /^# /
|
63
|
+
break if end_found >= 1
|
64
|
+
end_found += 1
|
65
|
+
end
|
66
|
+
changes << line
|
67
|
+
}
|
68
|
+
vars['changes'] = changes.join
|
69
|
+
|
70
|
+
# WLang template
|
71
|
+
template = File.expand_path('../debug_mail.txt', __FILE__)
|
72
|
+
|
73
|
+
# Let's go!
|
74
|
+
$stdout << WLang::file_instantiate(template, vars, "wlang/active-text")
|
78
75
|
end
|
data/tasks/gem.rake
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Installs rake tasks for gemming and packaging
|
2
2
|
#
|
3
|
-
# This file installs the 'rake package', 'rake gem' tasks and associates
|
4
|
-
# (clobber_package, repackage, ...). It is automatically generated by Noe
|
5
|
-
# from your .noespec file, and should therefore be configured there, under
|
3
|
+
# This file installs the 'rake package', 'rake gem' tasks and associates
|
4
|
+
# (clobber_package, repackage, ...). It is automatically generated by Noe
|
5
|
+
# from your .noespec file, and should therefore be configured there, under
|
6
6
|
# the variables/rake_tasks/gem entry, as illustrated below:
|
7
7
|
#
|
8
8
|
# variables:
|
@@ -15,9 +15,9 @@
|
|
15
15
|
# need_zip: false
|
16
16
|
# ...
|
17
17
|
#
|
18
|
-
# If you have specific needs requiring manual intervention on this file,
|
18
|
+
# If you have specific needs requiring manual intervention on this file,
|
19
19
|
# don't forget to set safe-override to false in your noe specification:
|
20
|
-
#
|
20
|
+
#
|
21
21
|
# template-info:
|
22
22
|
# manifest:
|
23
23
|
# tasks/gem.rake:
|
@@ -32,28 +32,28 @@ begin
|
|
32
32
|
|
33
33
|
# Version of the package
|
34
34
|
t.version = $gemspec.version
|
35
|
-
|
35
|
+
|
36
36
|
# Directory used to store the package files
|
37
37
|
t.package_dir = "pkg"
|
38
|
-
|
38
|
+
|
39
39
|
# True if a gzipped tar file (tgz) should be produced
|
40
40
|
t.need_tar = false
|
41
|
-
|
41
|
+
|
42
42
|
# True if a gzipped tar file (tar.gz) should be produced
|
43
43
|
t.need_tar_gz = false
|
44
|
-
|
44
|
+
|
45
45
|
# True if a bzip2'd tar file (tar.bz2) should be produced
|
46
46
|
t.need_tar_bz2 = false
|
47
|
-
|
47
|
+
|
48
48
|
# True if a zip file should be produced (default is false)
|
49
49
|
t.need_zip = false
|
50
|
-
|
50
|
+
|
51
51
|
# List of files to be included in the package.
|
52
52
|
t.package_files = $gemspec.files
|
53
|
-
|
53
|
+
|
54
54
|
# Tar command for gzipped or bzip2ed archives.
|
55
55
|
t.tar_command = "tar"
|
56
|
-
|
56
|
+
|
57
57
|
# Zip command for zipped archives.
|
58
58
|
t.zip_command = "zip"
|
59
59
|
|
data/tasks/spec_test.rake
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Installs a rake task for for running examples written using rspec.
|
2
2
|
#
|
3
3
|
# This file installs the 'rake spec_test' (aliased as 'rake spec') as well as
|
4
|
-
# extends 'rake test' to run spec tests, if any. It is automatically generated
|
5
|
-
# by Noe from your .noespec file, and should therefore be configured there,
|
4
|
+
# extends 'rake test' to run spec tests, if any. It is automatically generated
|
5
|
+
# by Noe from your .noespec file, and should therefore be configured there,
|
6
6
|
# under the variables/rake_tasks/spec_test entry, as illustrated below:
|
7
7
|
#
|
8
8
|
# variables:
|
@@ -13,16 +13,16 @@
|
|
13
13
|
# rspec_opts: [--color, --backtrace]
|
14
14
|
# ...
|
15
15
|
#
|
16
|
-
# If you have specific needs requiring manual intervention on this file,
|
16
|
+
# If you have specific needs requiring manual intervention on this file,
|
17
17
|
# don't forget to set safe-override to false in your noe specification:
|
18
|
-
#
|
18
|
+
#
|
19
19
|
# template-info:
|
20
20
|
# manifest:
|
21
21
|
# tasks/spec_test.rake:
|
22
22
|
# safe-override: false
|
23
23
|
#
|
24
|
-
# This file has been written to conform to RSpec v2.4.0. More information about
|
25
|
-
# rspec and options of the rake task defined below can be found on
|
24
|
+
# This file has been written to conform to RSpec v2.4.0. More information about
|
25
|
+
# rspec and options of the rake task defined below can be found on
|
26
26
|
# http://relishapp.com/rspec
|
27
27
|
#
|
28
28
|
begin
|
@@ -32,15 +32,7 @@ begin
|
|
32
32
|
# Glob pattern to match files.
|
33
33
|
t.pattern = "spec/**/test_*.rb"
|
34
34
|
|
35
|
-
#
|
36
|
-
# 'bundle exec'. Set this to true to ignore the presence of a Gemfile,
|
37
|
-
# and not add 'bundle exec' to the command.
|
38
|
-
t.skip_bundler = false
|
39
|
-
|
40
|
-
# Name of Gemfile to use
|
41
|
-
t.gemfile = "Gemfile"
|
42
|
-
|
43
|
-
# Whether or not to fail Rake when an error occurs (typically when
|
35
|
+
# Whether or not to fail Rake when an error occurs (typically when
|
44
36
|
# examples fail).
|
45
37
|
t.fail_on_error = true
|
46
38
|
|
@@ -60,7 +52,7 @@ begin
|
|
60
52
|
# Command line options to pass to rcov. See 'rcov --help' about this
|
61
53
|
t.rcov_opts = []
|
62
54
|
|
63
|
-
# Command line options to pass to ruby. See 'ruby --help' about this
|
55
|
+
# Command line options to pass to ruby. See 'ruby --help' about this
|
64
56
|
t.ruby_opts = []
|
65
57
|
|
66
58
|
# Path to rspec
|
data/tasks/unit_test.rake
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# Installs a rake task for for running unit tests.
|
2
2
|
#
|
3
|
-
# This file installs the 'rake unit_test' and extends 'rake test' to run unit
|
4
|
-
# tests, if any. It is automatically generated by Noe from your .noespec file,
|
5
|
-
# and should therefore be configured there, under the variables/rake_tasks/unit_test
|
3
|
+
# This file installs the 'rake unit_test' and extends 'rake test' to run unit
|
4
|
+
# tests, if any. It is automatically generated by Noe from your .noespec file,
|
5
|
+
# and should therefore be configured there, under the variables/rake_tasks/unit_test
|
6
6
|
# entry, as illustrated below:
|
7
7
|
#
|
8
8
|
# variables:
|
@@ -13,15 +13,15 @@
|
|
13
13
|
# warning: false
|
14
14
|
# ...
|
15
15
|
#
|
16
|
-
# If you have specific needs requiring manual intervention on this file,
|
16
|
+
# If you have specific needs requiring manual intervention on this file,
|
17
17
|
# don't forget to set safe-override to false in your noe specification:
|
18
|
-
#
|
18
|
+
#
|
19
19
|
# template-info:
|
20
20
|
# manifest:
|
21
21
|
# tasks/unit_test.rake:
|
22
22
|
# safe-override: false
|
23
23
|
#
|
24
|
-
# More info about the TestTask and its options can be found on
|
24
|
+
# More info about the TestTask and its options can be found on
|
25
25
|
# http://rake.rubyforge.org/classes/Rake/TestTask.html
|
26
26
|
#
|
27
27
|
begin
|
@@ -36,7 +36,7 @@ begin
|
|
36
36
|
# True if verbose test output desired. (default is false)
|
37
37
|
t.verbose = false
|
38
38
|
|
39
|
-
# Test options passed to the test suite. An explicit TESTOPTS=opts
|
39
|
+
# Test options passed to the test suite. An explicit TESTOPTS=opts
|
40
40
|
# on the command line will override this. (default is NONE)
|
41
41
|
t.options = nil
|
42
42
|
|
@@ -52,10 +52,10 @@ begin
|
|
52
52
|
# * :rake -- Rake provided test loading script (default).
|
53
53
|
# * :testrb -- Ruby provided test loading script.
|
54
54
|
# * :direct -- Load tests using command line loader.
|
55
|
-
#
|
55
|
+
#
|
56
56
|
t.loader = :rake
|
57
57
|
|
58
|
-
# Array of commandline options to pass to ruby when running test
|
58
|
+
# Array of commandline options to pass to ruby when running test
|
59
59
|
# loader.
|
60
60
|
t.ruby_opts = []
|
61
61
|
|
@@ -74,4 +74,3 @@ ensure
|
|
74
74
|
desc "Run all tests"
|
75
75
|
task :test => [:unit_test]
|
76
76
|
end
|
77
|
-
|
data/tasks/yard.rake
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Installs a rake task to generate API documentation using yard.
|
2
2
|
#
|
3
|
-
# This file installs the 'rake yard' task. It is automatically generated by Noe from
|
4
|
-
# your .noespec file, and should therefore be configured there, under the
|
3
|
+
# This file installs the 'rake yard' task. It is automatically generated by Noe from
|
4
|
+
# your .noespec file, and should therefore be configured there, under the
|
5
5
|
# variables/rake_tasks/yard entry, as illustrated below:
|
6
6
|
#
|
7
7
|
# variables:
|
@@ -11,15 +11,15 @@
|
|
11
11
|
# options: []
|
12
12
|
# ...
|
13
13
|
#
|
14
|
-
# If you have specific needs requiring manual intervention on this file,
|
14
|
+
# If you have specific needs requiring manual intervention on this file,
|
15
15
|
# don't forget to set safe-override to false in your noe specification:
|
16
|
-
#
|
16
|
+
#
|
17
17
|
# template-info:
|
18
18
|
# manifest:
|
19
19
|
# tasks/yard.rake:
|
20
20
|
# safe-override: false
|
21
21
|
#
|
22
|
-
# This file has been written to conform to yard v0.6.4. More information about
|
22
|
+
# This file has been written to conform to yard v0.6.4. More information about
|
23
23
|
# yard and the rake task installed below can be found on http://yardoc.org/
|
24
24
|
#
|
25
25
|
begin
|
@@ -28,20 +28,20 @@ begin
|
|
28
28
|
YARD::Rake::YardocTask.new(:yard) do |t|
|
29
29
|
# Array of options passed to yardoc commandline. See 'yardoc --help' about this
|
30
30
|
t.options = ["--output-dir", "doc/api", "-", "README.md", "CHANGELOG.md", "LICENCE.md"]
|
31
|
-
|
32
|
-
# Array of ruby source files (and any extra documentation files
|
31
|
+
|
32
|
+
# Array of ruby source files (and any extra documentation files
|
33
33
|
# separated by '-')
|
34
34
|
t.files = ["lib/**/*.rb"]
|
35
|
-
|
35
|
+
|
36
36
|
# A proc to call before running the task
|
37
37
|
# t.before = proc{ }
|
38
|
-
|
38
|
+
|
39
39
|
# A proc to call after running the task
|
40
40
|
# r.after = proc{ }
|
41
|
-
|
42
|
-
# An optional lambda to run against all objects being generated.
|
43
|
-
# Any object that the lambda returns false for will be excluded
|
44
|
-
# from documentation.
|
41
|
+
|
42
|
+
# An optional lambda to run against all objects being generated.
|
43
|
+
# Any object that the lambda returns false for will be excluded
|
44
|
+
# from documentation.
|
45
45
|
# t.verifier = lambda{|obj| true}
|
46
46
|
end
|
47
47
|
rescue LoadError
|
metadata
CHANGED
@@ -1,118 +1,85 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: myrrha
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.2.2
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 2
|
9
|
-
- 1
|
10
|
-
version: 1.2.1
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Bernard Lambeau
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
requirement: &
|
12
|
+
date: 2012-01-26 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: rake
|
16
|
+
requirement: &75384950 !ruby/object:Gem::Requirement
|
22
17
|
none: false
|
23
|
-
requirements:
|
18
|
+
requirements:
|
24
19
|
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
hash: 63
|
27
|
-
segments:
|
28
|
-
- 0
|
29
|
-
- 9
|
30
|
-
- 2
|
20
|
+
- !ruby/object:Gem::Version
|
31
21
|
version: 0.9.2
|
32
|
-
version_requirements: *id001
|
33
|
-
name: rake
|
34
|
-
prerelease: false
|
35
22
|
type: :development
|
36
|
-
|
37
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *75384950
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec
|
27
|
+
requirement: &75384660 !ruby/object:Gem::Requirement
|
38
28
|
none: false
|
39
|
-
requirements:
|
29
|
+
requirements:
|
40
30
|
- - ~>
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
|
43
|
-
segments:
|
44
|
-
- 2
|
45
|
-
- 6
|
46
|
-
- 0
|
47
|
-
version: 2.6.0
|
48
|
-
version_requirements: *id002
|
49
|
-
name: rspec
|
50
|
-
prerelease: false
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 2.8.0
|
51
33
|
type: :development
|
52
|
-
|
53
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *75384660
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: yard
|
38
|
+
requirement: &75384390 !ruby/object:Gem::Requirement
|
54
39
|
none: false
|
55
|
-
requirements:
|
40
|
+
requirements:
|
56
41
|
- - ~>
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
|
59
|
-
segments:
|
60
|
-
- 0
|
61
|
-
- 7
|
62
|
-
- 2
|
63
|
-
version: 0.7.2
|
64
|
-
version_requirements: *id003
|
65
|
-
name: yard
|
66
|
-
prerelease: false
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.7.4
|
67
44
|
type: :development
|
68
|
-
|
69
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *75384390
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: bluecloth
|
49
|
+
requirement: &75384020 !ruby/object:Gem::Requirement
|
70
50
|
none: false
|
71
|
-
requirements:
|
51
|
+
requirements:
|
72
52
|
- - ~>
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
|
75
|
-
segments:
|
76
|
-
- 2
|
77
|
-
- 1
|
78
|
-
- 0
|
79
|
-
version: 2.1.0
|
80
|
-
version_requirements: *id004
|
81
|
-
name: bluecloth
|
82
|
-
prerelease: false
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.2.0
|
83
55
|
type: :development
|
84
|
-
|
85
|
-
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *75384020
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: wlang
|
60
|
+
requirement: &75383730 !ruby/object:Gem::Requirement
|
86
61
|
none: false
|
87
|
-
requirements:
|
62
|
+
requirements:
|
88
63
|
- - ~>
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
|
91
|
-
segments:
|
92
|
-
- 0
|
93
|
-
- 10
|
94
|
-
- 1
|
95
|
-
version: 0.10.1
|
96
|
-
version_requirements: *id005
|
97
|
-
name: wlang
|
98
|
-
prerelease: false
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 0.10.2
|
99
66
|
type: :development
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *75383730
|
69
|
+
description: ! "Myrrha provides the coercion framework which is missing to Ruby. Coercions\nare
|
70
|
+
simply defined as a set of rules for converting values from source to target\ndomains
|
71
|
+
(in an abstract sense). As a typical and useful example, it comes with \na coerce()
|
72
|
+
method providing a unique entry point for converting a string to \na numeric, a
|
73
|
+
boolean, a date, a time, an URI, and so on. "
|
74
|
+
email:
|
106
75
|
- blambeau@gmail.com
|
107
76
|
executables: []
|
108
|
-
|
109
77
|
extensions: []
|
110
|
-
|
111
|
-
extra_rdoc_files:
|
78
|
+
extra_rdoc_files:
|
112
79
|
- README.md
|
113
80
|
- CHANGELOG.md
|
114
81
|
- LICENCE.md
|
115
|
-
files:
|
82
|
+
files:
|
116
83
|
- examples/to_ruby_literal_foo.rb
|
117
84
|
- examples/coerce_foo.rb
|
118
85
|
- examples/coerce_noext.rb
|
@@ -166,38 +133,32 @@ files:
|
|
166
133
|
- README.md
|
167
134
|
homepage: http://rubydoc.info/github/blambeau/myrrha/master/frames
|
168
135
|
licenses: []
|
169
|
-
|
170
136
|
post_install_message:
|
171
137
|
rdoc_options: []
|
172
|
-
|
173
|
-
require_paths:
|
138
|
+
require_paths:
|
174
139
|
- lib
|
175
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
141
|
none: false
|
177
|
-
requirements:
|
178
|
-
- -
|
179
|
-
- !ruby/object:Gem::Version
|
180
|
-
|
181
|
-
segments:
|
142
|
+
requirements:
|
143
|
+
- - ! '>='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
segments:
|
182
147
|
- 0
|
183
|
-
|
184
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
hash: 657683567
|
149
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
150
|
none: false
|
186
|
-
requirements:
|
187
|
-
- -
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
|
190
|
-
segments:
|
191
|
-
- 0
|
192
|
-
version: "0"
|
151
|
+
requirements:
|
152
|
+
- - ! '>='
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0'
|
193
155
|
requirements: []
|
194
|
-
|
195
156
|
rubyforge_project:
|
196
|
-
rubygems_version: 1.8.
|
157
|
+
rubygems_version: 1.8.15
|
197
158
|
signing_key:
|
198
159
|
specification_version: 3
|
199
160
|
summary: Myrrha provides the coercion framework which is missing to Ruby.
|
200
|
-
test_files:
|
161
|
+
test_files:
|
201
162
|
- spec/spec_helper.rb
|
202
163
|
- spec/myrrha/test_coercions.rb
|
203
164
|
- spec/myrrha/test_domain.rb
|