dia 2.1.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog +11 -0
- data/lib/dia.rb +1 -1
- data/lib/dia/ruby_block.rb +14 -11
- metadata +3 -3
data/Changelog
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
2010-08-12 Robert Gleeson <rob@flowof.info> (v2.2.1)
|
2
|
+
|
3
|
+
* Fixed a bug that saw #e ( an alias for #exception ) always return nil.
|
4
|
+
#exception itself worked properly.
|
5
|
+
|
6
|
+
* #redirect_stderr, #redirect_stdout, and #rescue_exception are
|
7
|
+
have been added to the RubyBlock class and are documented as getters.
|
8
|
+
They're aliased as #redirect_stderr?, #redirect_stdout? and
|
9
|
+
#rescue_exception? respectively.
|
10
|
+
|
11
|
+
|
1
12
|
2010-08-12 Robert Gleeson <rob@flowof.info> (v2.1.0)
|
2
13
|
|
3
14
|
* Implemented Dia::RubyBlock#value.
|
data/lib/dia.rb
CHANGED
data/lib/dia/ruby_block.rb
CHANGED
@@ -11,11 +11,9 @@ module Dia
|
|
11
11
|
attr_reader :stdout
|
12
12
|
attr_reader :exception
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
alias_method :e, :exception
|
14
|
+
attr_accessor :redirect_stderr
|
15
|
+
attr_accessor :redirect_stdout
|
16
|
+
attr_accessor :rescue_exception
|
19
17
|
|
20
18
|
# @param [String] Profile Accepts one of five profiles which can be found
|
21
19
|
# under the {Dia::Profiles} module.
|
@@ -48,7 +46,8 @@ module Dia
|
|
48
46
|
# @return [nil] Returns nil if Dia was not set to redirect stdout before a call
|
49
47
|
# to {#run} or {#run_nonblock}.
|
50
48
|
#
|
51
|
-
# @see #redirect_stdout=
|
49
|
+
# @see #redirect_stdout= Redirection of stdout can be enabled through #redirect_stdout=
|
50
|
+
#
|
52
51
|
#
|
53
52
|
# @see #redirect_stdout? #redirect_stdout? can tell you if Standard Output is being
|
54
53
|
# redirected.
|
@@ -89,9 +88,10 @@ module Dia
|
|
89
88
|
# @see #redirect_stdout= Redirection of stdout can be enabled through #redirect_stdout=.
|
90
89
|
#
|
91
90
|
# @see #stdout Standard Ouput can be accessed through #stdout.
|
92
|
-
def redirect_stdout
|
91
|
+
def redirect_stdout
|
93
92
|
!!@redirect_stdout
|
94
93
|
end
|
94
|
+
alias :redirect_stdout? :redirect_stdout
|
95
95
|
|
96
96
|
# Provides access to the Standard Error stream of the process that was last used to execute
|
97
97
|
# a sandbox. This feature is disabled by default.
|
@@ -143,12 +143,13 @@ module Dia
|
|
143
143
|
# @see #redirect_stderr= Redirection of stderr can be enabled through #redirect_stderr=.
|
144
144
|
#
|
145
145
|
# @see #stderr Standard Error output can be accessed through #stderr.
|
146
|
-
def redirect_stderr
|
146
|
+
def redirect_stderr
|
147
147
|
!!@redirect_stderr
|
148
148
|
end
|
149
|
+
alias :redirect_stderr? :redirect_stderr
|
149
150
|
|
150
|
-
# This method will tell you if an exception has been rescued in the process that
|
151
|
-
#
|
151
|
+
# This method will tell you if an exception has been rescued in the process that was
|
152
|
+
# last used to execute a sandbox.
|
152
153
|
#
|
153
154
|
# @return [true] Returns true when an exception has been rescued.
|
154
155
|
#
|
@@ -187,9 +188,10 @@ module Dia
|
|
187
188
|
#
|
188
189
|
# @see #rescue_exception= The rescue of exceptions can be enabled or disabled through
|
189
190
|
# #rescue_exception=
|
190
|
-
def rescue_exception
|
191
|
+
def rescue_exception
|
191
192
|
!!@rescue
|
192
193
|
end
|
194
|
+
alias :rescue_exception? :rescue_exception
|
193
195
|
|
194
196
|
# This method can enable or disable a feature that will try to rescue exceptions
|
195
197
|
# that are raised in the process that is spawned to execute a sandbox.
|
@@ -235,6 +237,7 @@ module Dia
|
|
235
237
|
end
|
236
238
|
@e
|
237
239
|
end
|
240
|
+
alias :e :exception
|
238
241
|
|
239
242
|
# Provides access to the return value of the block that has been supplied to the constructor.
|
240
243
|
#
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 2
|
7
|
+
- 2
|
7
8
|
- 1
|
8
|
-
|
9
|
-
version: 2.1.0
|
9
|
+
version: 2.2.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Robert Gleeson
|
@@ -93,7 +93,7 @@ has_rdoc: yard
|
|
93
93
|
homepage:
|
94
94
|
licenses: []
|
95
95
|
|
96
|
-
post_install_message: " -------------------------------------------------------------------------------- \n Thanks for installing Dia, 2.1
|
96
|
+
post_install_message: " -------------------------------------------------------------------------------- \n Thanks for installing Dia, 2.2.1! \n The >=2.0.0 releases are not backward compatiable with the 1.0 series.\n \n Resources: \n * API Documentation http://yardoc.org/docs/robgleeson-Dia/\n * Github http://github.com/robgleeson/dia \n * Mailing List http://groups.google.com/group/ruby-dia\n\n Release notes are available at the mailing list.\n\n Happy Hacking!\n -------------------------------------------------------------------------------- \n"
|
97
97
|
rdoc_options: []
|
98
98
|
|
99
99
|
require_paths:
|