blockenspiel 0.3.2 → 0.3.3
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/Blockenspiel.rdoc +4 -4
- data/History.rdoc +5 -0
- data/ImplementingDSLblocks.rdoc +2 -2
- data/README.rdoc +4 -4
- data/Rakefile +13 -3
- data/lib/blockenspiel/impl.rb +8 -11
- data/lib/blockenspiel/version.rb +1 -1
- data/lib/blockenspiel_unmixer.jar +0 -0
- metadata +19 -5
data/Blockenspiel.rdoc
CHANGED
@@ -304,7 +304,7 @@ multiple threads trying to mix methods into the same object concurrently.
|
|
304
304
|
=== Requirements
|
305
305
|
|
306
306
|
* Ruby 1.8.6 or later (1.8.7 recommended), Ruby 1.9.1 or later, or JRuby 1.2
|
307
|
-
or later (1.
|
307
|
+
or later (1.5 recommended).
|
308
308
|
|
309
309
|
=== Installation
|
310
310
|
|
@@ -314,8 +314,8 @@ multiple threads trying to mix methods into the same object concurrently.
|
|
314
314
|
|
315
315
|
* Implementing wildcard DSL methods using <tt>method_missing</tt> doesn't
|
316
316
|
work. I haven't yet figured out the right semantics for this case.
|
317
|
-
* Including Blockenspiel::DSL in a module is not yet
|
318
|
-
is planned in a future release.
|
317
|
+
* Including Blockenspiel::DSL in a module (rather than a class) is not yet
|
318
|
+
supported, but this is planned in a future release.
|
319
319
|
|
320
320
|
=== Development and support
|
321
321
|
|
@@ -347,7 +347,7 @@ Luis Lavena.
|
|
347
347
|
|
348
348
|
=== License
|
349
349
|
|
350
|
-
Copyright 2008-
|
350
|
+
Copyright 2008-2010 Daniel Azuma.
|
351
351
|
|
352
352
|
All rights reserved.
|
353
353
|
|
data/History.rdoc
CHANGED
data/ImplementingDSLblocks.rdoc
CHANGED
@@ -879,7 +879,7 @@ This requires dynamic generation of the proxy class. We could implement it using
|
|
879
879
|
def add_route(path, options = {})
|
880
880
|
# ...
|
881
881
|
|
882
|
-
You can install blockenspiel as a gem. It is compatible with MRI 1.8.7 or later, MRI 1.9.1 or later, and JRuby 1.
|
882
|
+
You can install blockenspiel as a gem. It is compatible with MRI 1.8.7 or later, MRI 1.9.1 or later, and JRuby 1.5 or later.
|
883
883
|
|
884
884
|
gem install blockenspiel
|
885
885
|
|
@@ -937,4 +937,4 @@ The Blockenspiel library provides a concrete and robust implementation of DSL bl
|
|
937
937
|
|
938
938
|
=== About the author
|
939
939
|
|
940
|
-
Daniel Azuma is Chief Software Architect at GeoPage. He has been working with Ruby
|
940
|
+
Daniel Azuma is Chief Software Architect at GeoPage. He has been working with Ruby since 2005, and finds the language generally pleasant to work with, though he thinks the scoping rules could use some improvement. His home page is at http://www.daniel-azuma.com/
|
data/README.rdoc
CHANGED
@@ -56,7 +56,7 @@ For an extended analysis of different ways to implement DSL blocks, see
|
|
56
56
|
=== Requirements
|
57
57
|
|
58
58
|
* Ruby 1.8.6 or later (1.8.7 recommended), Ruby 1.9.1 or later, or JRuby 1.2
|
59
|
-
or later (1.
|
59
|
+
or later (1.5 recommended).
|
60
60
|
|
61
61
|
=== Installation
|
62
62
|
|
@@ -66,8 +66,8 @@ For an extended analysis of different ways to implement DSL blocks, see
|
|
66
66
|
|
67
67
|
* Implementing wildcard DSL methods using <tt>method_missing</tt> doesn't
|
68
68
|
work. I haven't yet figured out the right semantics for this case.
|
69
|
-
* Including Blockenspiel::DSL in a module is not yet
|
70
|
-
is planned in a future release.
|
69
|
+
* Including Blockenspiel::DSL in a module (rather than a class) is not yet
|
70
|
+
supported, but this is planned in a future release.
|
71
71
|
|
72
72
|
=== Development and support
|
73
73
|
|
@@ -96,7 +96,7 @@ Blockenspiel for now, to reduce dependencies.
|
|
96
96
|
|
97
97
|
=== License
|
98
98
|
|
99
|
-
Copyright 2008-
|
99
|
+
Copyright 2008-2010 Daniel Azuma.
|
100
100
|
|
101
101
|
All rights reserved.
|
102
102
|
|
data/Rakefile
CHANGED
@@ -37,6 +37,8 @@ require 'rake/clean'
|
|
37
37
|
require 'rake/gempackagetask'
|
38
38
|
require 'rake/testtask'
|
39
39
|
require 'rake/rdoctask'
|
40
|
+
require 'rdoc'
|
41
|
+
require 'rdoc/rdoc'
|
40
42
|
require 'rdoc/generator/darkfish'
|
41
43
|
|
42
44
|
require ::File.expand_path("#{::File.dirname(__FILE__)}/lib/blockenspiel/version")
|
@@ -75,7 +77,7 @@ end
|
|
75
77
|
gemspec_ = ::Gem::Specification.new do |s_|
|
76
78
|
s_.name = 'blockenspiel'
|
77
79
|
s_.summary = 'Blockenspiel is a helper library designed to make it easy to implement DSL blocks.'
|
78
|
-
s_.version = ::Blockenspiel::VERSION_STRING
|
80
|
+
s_.version = ::Blockenspiel::VERSION_STRING.dup
|
79
81
|
s_.author = 'Daniel Azuma'
|
80
82
|
s_.email = 'dazuma@gmail.com'
|
81
83
|
s_.description = 'Blockenspiel is a helper library designed to make it easy to implement DSL blocks. It is designed to be comprehensive and robust, supporting most common usage patterns, and working correctly in the presence of nested blocks and multithreading.'
|
@@ -190,9 +192,17 @@ task :release_gem_to_gemcutter => [:package] do |t_|
|
|
190
192
|
if v_ != ::Blockenspiel::VERSION_STRING
|
191
193
|
abort "Versions don't match: #{v_} vs #{::Blockenspiel::VERSION_STRING}"
|
192
194
|
end
|
195
|
+
mri_gem_ = "blockenspiel-#{v_}.gem"
|
196
|
+
jruby_gem_ = "blockenspiel-#{v_}-java.gem"
|
197
|
+
if !::File.file?("pkg/#{mri_gem_}") || !::File.readable?("pkg/#{mri_gem_}")
|
198
|
+
abort "You haven't built #{mri_gem_} yet. Try rake package"
|
199
|
+
end
|
200
|
+
if !::File.file?("pkg/#{jruby_gem_}") || !::File.readable?("pkg/#{jruby_gem_}")
|
201
|
+
abort "You haven't built #{jruby_gem_} yet. Try jrake package"
|
202
|
+
end
|
193
203
|
puts "Releasing blockenspiel #{v_} to GemCutter"
|
194
|
-
`cd pkg && gem push
|
195
|
-
`cd pkg && gem push
|
204
|
+
`cd pkg && gem push #{mri_gem_}`
|
205
|
+
`cd pkg && gem push #{jruby_gem_}`
|
196
206
|
end
|
197
207
|
|
198
208
|
|
data/lib/blockenspiel/impl.rb
CHANGED
@@ -505,8 +505,9 @@ module Blockenspiel
|
|
505
505
|
#
|
506
506
|
# If you want your method to take a block, you have several options
|
507
507
|
# depending on your Ruby version. If you are running the standard Matz
|
508
|
-
# Ruby interpreter (MRI) version 1.8.7 or later (including 1.9.x),
|
509
|
-
#
|
508
|
+
# Ruby interpreter (MRI) version 1.8.7 or later (including 1.9.x), or a
|
509
|
+
# compatible interpreter such as JRuby 1.5 or later, you can use the
|
510
|
+
# standard "&" block argument notation to receive the block.
|
510
511
|
# Note that you must call the passed block using the +call+ method since
|
511
512
|
# Ruby doesn't support invoking such a block with +yield+.
|
512
513
|
# For example, to create a method named "foo" that takes one parameter
|
@@ -521,15 +522,11 @@ module Blockenspiel
|
|
521
522
|
#
|
522
523
|
# foo("hello"){ "a value" }
|
523
524
|
#
|
524
|
-
# If you are using MRI 1.8.6,
|
525
|
-
#
|
526
|
-
#
|
527
|
-
#
|
528
|
-
#
|
529
|
-
# standard way to create a method that takes a block, Blockenspiel
|
530
|
-
# provides an alternative in the form of the <tt>:block</tt> option.
|
531
|
-
# This option causes blocks provided by the caller to be included in
|
532
|
-
# the normal parameter list to your method, instead of as a block
|
525
|
+
# If you are using MRI 1.8.6, or another Ruby interpreter that doesn't
|
526
|
+
# fully support this syntax (such as JRuby versions older than 1.5),
|
527
|
+
# Blockenspiel provides an alternative in the form of the <tt>:block</tt>
|
528
|
+
# option. This option causes blocks provided by the caller to be included
|
529
|
+
# in the normal parameter list to your method, instead of as a block
|
533
530
|
# parameter. It can be set to <tt>:first</tt> or <tt>:last</tt> to
|
534
531
|
# prepend or append, respectively, the block (as a +Proc+ object) to
|
535
532
|
# the parameter list. If the caller does not include a block when
|
data/lib/blockenspiel/version.rb
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blockenspiel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Daniel Azuma
|
@@ -9,7 +15,7 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2010-05-24 00:00:00 -07:00
|
13
19
|
default_executable:
|
14
20
|
dependencies: []
|
15
21
|
|
@@ -55,21 +61,29 @@ rdoc_options: []
|
|
55
61
|
require_paths:
|
56
62
|
- lib
|
57
63
|
required_ruby_version: !ruby/object:Gem::Requirement
|
64
|
+
none: false
|
58
65
|
requirements:
|
59
66
|
- - ">="
|
60
67
|
- !ruby/object:Gem::Version
|
68
|
+
hash: 59
|
69
|
+
segments:
|
70
|
+
- 1
|
71
|
+
- 8
|
72
|
+
- 6
|
61
73
|
version: 1.8.6
|
62
|
-
version:
|
63
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
64
76
|
requirements:
|
65
77
|
- - ">="
|
66
78
|
- !ruby/object:Gem::Version
|
79
|
+
hash: 3
|
80
|
+
segments:
|
81
|
+
- 0
|
67
82
|
version: "0"
|
68
|
-
version:
|
69
83
|
requirements: []
|
70
84
|
|
71
85
|
rubyforge_project: virtuoso
|
72
|
-
rubygems_version: 1.3.
|
86
|
+
rubygems_version: 1.3.7
|
73
87
|
signing_key:
|
74
88
|
specification_version: 3
|
75
89
|
summary: Blockenspiel is a helper library designed to make it easy to implement DSL blocks.
|