caricature 0.6.3 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. data/README.rdoc +98 -0
  2. data/Rakefile +250 -47
  3. data/caricature.gemspec +79 -190
  4. data/lib/caricature/clr/descriptor.rb +14 -4
  5. data/lib/caricature/clr/isolation.rb +9 -0
  6. data/lib/caricature/clr/isolator.rb +4 -0
  7. data/lib/caricature/clr/messenger.rb +12 -17
  8. data/lib/caricature/clr.rb +1 -1
  9. data/lib/caricature/descriptor.rb +1 -1
  10. data/lib/caricature/expectation.rb +21 -11
  11. data/lib/caricature/isolation.rb +9 -3
  12. data/lib/caricature/isolator.rb +25 -9
  13. data/lib/caricature/messenger.rb +1 -1
  14. data/lib/caricature/verification.rb +2 -1
  15. data/lib/caricature/version.rb +6 -0
  16. data/lib/caricature.rb +8 -5
  17. data/spec/bacon_helper.rb +50 -30
  18. data/spec/bin/ClrModels.dll +0 -0
  19. data/spec/bin/ClrModels.dll.mdb +0 -0
  20. data/spec/integration/callback_spec.rb +157 -0
  21. data/spec/integration/ruby_to_ruby_spec.rb +12 -1
  22. data/spec/models/ClrModels.cs +8 -8
  23. data/spec/unit/expectation_spec.rb +35 -0
  24. metadata +35 -125
  25. data/.gitignore +0 -4
  26. data/README.markdown +0 -80
  27. data/VERSION +0 -1
  28. data/doc/Array.html +0 -251
  29. data/doc/Caricature/ArgumentRecording.html +0 -366
  30. data/doc/Caricature/ClrClassDescriptor.html +0 -303
  31. data/doc/Caricature/ClrClassMessenger.html +0 -263
  32. data/doc/Caricature/ClrInterfaceDescriptor.html +0 -295
  33. data/doc/Caricature/ClrInterfaceIsolator.html +0 -365
  34. data/doc/Caricature/ClrInterfaceMessenger.html +0 -260
  35. data/doc/Caricature/ClrIsolator.html +0 -425
  36. data/doc/Caricature/Expectation.html +0 -549
  37. data/doc/Caricature/ExpectationBuilder.html +0 -308
  38. data/doc/Caricature/ExpectationSyntax.html +0 -466
  39. data/doc/Caricature/Expectations.html +0 -347
  40. data/doc/Caricature/Interception/ClassMethods.html +0 -364
  41. data/doc/Caricature/Interception.html +0 -534
  42. data/doc/Caricature/Isolation.html +0 -763
  43. data/doc/Caricature/Isolator.html +0 -519
  44. data/doc/Caricature/MemberDescriptor.html +0 -335
  45. data/doc/Caricature/Messenger.html +0 -413
  46. data/doc/Caricature/MethodCallRecorder.html +0 -404
  47. data/doc/Caricature/MethodCallRecording.html +0 -493
  48. data/doc/Caricature/RubyIsolator.html +0 -416
  49. data/doc/Caricature/RubyMessenger.html +0 -261
  50. data/doc/Caricature/RubyObjectDescriptor.html +0 -289
  51. data/doc/Caricature/TypeDescriptor.html +0 -378
  52. data/doc/Caricature/Verification.html +0 -443
  53. data/doc/Caricature.html +0 -358
  54. data/doc/Class.html +0 -287
  55. data/doc/Hash.html +0 -255
  56. data/doc/Module.html +0 -287
  57. data/doc/Object.html +0 -409
  58. data/doc/README_markdown.html +0 -241
  59. data/doc/String.html +0 -369
  60. data/doc/System/String.html +0 -289
  61. data/doc/System/Type.html +0 -289
  62. data/doc/System.html +0 -207
  63. data/doc/created.rid +0 -1
  64. data/doc/images/brick.png +0 -0
  65. data/doc/images/brick_link.png +0 -0
  66. data/doc/images/bug.png +0 -0
  67. data/doc/images/bullet_black.png +0 -0
  68. data/doc/images/bullet_toggle_minus.png +0 -0
  69. data/doc/images/bullet_toggle_plus.png +0 -0
  70. data/doc/images/date.png +0 -0
  71. data/doc/images/find.png +0 -0
  72. data/doc/images/loadingAnimation.gif +0 -0
  73. data/doc/images/macFFBgHack.png +0 -0
  74. data/doc/images/package.png +0 -0
  75. data/doc/images/page_green.png +0 -0
  76. data/doc/images/page_white_text.png +0 -0
  77. data/doc/images/page_white_width.png +0 -0
  78. data/doc/images/plugin.png +0 -0
  79. data/doc/images/ruby.png +0 -0
  80. data/doc/images/tag_green.png +0 -0
  81. data/doc/images/wrench.png +0 -0
  82. data/doc/images/wrench_orange.png +0 -0
  83. data/doc/images/zoom.png +0 -0
  84. data/doc/index.html +0 -342
  85. data/doc/js/darkfish.js +0 -116
  86. data/doc/js/jquery.js +0 -32
  87. data/doc/js/quicksearch.js +0 -114
  88. data/doc/js/thickbox-compressed.js +0 -10
  89. data/doc/lib/caricature/clr/aspnet_mvc_rb.html +0 -52
  90. data/doc/lib/caricature/clr/descriptor_rb.html +0 -52
  91. data/doc/lib/caricature/clr/isolation_rb.html +0 -52
  92. data/doc/lib/caricature/clr/isolator_rb.html +0 -52
  93. data/doc/lib/caricature/clr/messenger_rb.html +0 -52
  94. data/doc/lib/caricature/clr_rb.html +0 -52
  95. data/doc/lib/caricature/descriptor_rb.html +0 -52
  96. data/doc/lib/caricature/expectation_rb.html +0 -52
  97. data/doc/lib/caricature/isolation_rb.html +0 -52
  98. data/doc/lib/caricature/isolator_rb.html +0 -52
  99. data/doc/lib/caricature/messaging_rb.html +0 -52
  100. data/doc/lib/caricature/messenger_rb.html +0 -52
  101. data/doc/lib/caricature/method_call_recorder_rb.html +0 -52
  102. data/doc/lib/caricature/verification_rb.html +0 -52
  103. data/doc/lib/caricature_rb.html +0 -52
  104. data/doc/lib/core_ext/array_rb.html +0 -52
  105. data/doc/lib/core_ext/class_rb.html +0 -52
  106. data/doc/lib/core_ext/core_ext_rb.html +0 -52
  107. data/doc/lib/core_ext/hash_rb.html +0 -52
  108. data/doc/lib/core_ext/module_rb.html +0 -52
  109. data/doc/lib/core_ext/object_rb.html +0 -52
  110. data/doc/lib/core_ext/string_rb.html +0 -52
  111. data/doc/lib/core_ext/system/string_rb.html +0 -52
  112. data/doc/lib/core_ext/system/type_rb.html +0 -52
  113. data/doc/rdoc.css +0 -696
  114. data/irb_init.rb +0 -9
  115. data/lib/bin/Workarounds.dll +0 -0
  116. data/lib/bin/Workarounds.pdb +0 -0
  117. data/pkg/.gitignore +0 -0
  118. data/pkg/caricature-0.1.0.gem +0 -0
  119. data/pkg/caricature-0.5.0.gem +0 -0
  120. data/pkg/caricature-0.6.0.gem +0 -0
  121. data/spec/bin/.gitignore +0 -0
  122. data/workarounds/ReflectionHelper.cs +0 -30
data/README.rdoc ADDED
@@ -0,0 +1,98 @@
1
+ = Caricature - Bringing simple mocking to the DLR
2
+
3
+ * http://github.com/#{github_username}/#{project_name}
4
+
5
+ == DESCRIPTION:
6
+
7
+ This project aims to make interop between IronRuby objects and .NET objects easier.
8
+ The idea is that it integrates nicely with bacon and later rspec and that it transparently lets you mock ironruby ojbects
9
+ as well as CLR objects/interfaces.
10
+ Caricature handles interfaces, interface inheritance, CLR objects, CLR object instances, Ruby classes and instances of Ruby classes.
11
+
12
+ From the start I wanted to do away with names like mock, stub, record, replay, verify etc.
13
+ Instead I took the advice from Roy Osherhove and went with a name of Isolation for creating a mock.
14
+
15
+ An Isolation will create what in Rhino.Mocks would be called a DynamicMock (but can be a partial too) :)
16
+ In Moq it would be the Loose mocking strategy.
17
+
18
+ The naming of the methods for creating mocks is the one that JP Boodhoo proposed WhenToldTo and WasToldTo.
19
+ To specify a stub/expectation on an isolation you have one and only one way of doing that with the method called when_receiving.
20
+ Then only if you're interested in asserting if a method has been called you can use the did_receive? method for this.
21
+
22
+ It may be very important to note that when you're going to be isolating CLR classes to be used in other CLR classes
23
+ you still need to obide by the CLR rules. That means if you want to redefine a method you'll need to make sure it's
24
+ marked as virtual. Static types are still governed by static type rules. I'm working on a solution around those
25
+ problems but for the time being this is how it has to be.
26
+
27
+ == FEATURES/PROBLEMS:
28
+
29
+ * [CLR-to-CLR mocking]: Caricature won't mock static methods because you can't override those according to CLR rules
30
+ * [CLR-to-CLR mocking]: Caricature can only override methods that are marked virtual (CLR rules)
31
+
32
+ == SYNOPSIS:
33
+
34
+ isolation = Isolation.for(Ninja)
35
+ isolation.when_receiving(:attack) do |exp|
36
+ exp.with(:shuriken)
37
+ exp.return(3)
38
+ end
39
+
40
+ Battle.new(mock)
41
+ battle.combat
42
+
43
+ isolation.did_receive?(:attack).should.be.successful
44
+
45
+
46
+ == REQUIREMENTS:
47
+
48
+ * To use the caricature library you need to have uuidtools installed
49
+ sudo gem install uuidtools
50
+ sudo igem install uuidtools
51
+
52
+ == INSTALL:
53
+
54
+ sudo gem install caricature
55
+
56
+ == LICENSE:
57
+
58
+ Caricature -- A simple mocking framework for IronRuby
59
+
60
+ Copyright (c) 2009, Caricature Team
61
+ http://github.com/casualjim/caricature
62
+ All rights reserved.
63
+
64
+ Redistribution and use in source and binary forms,
65
+ with or without modification, are permitted provided
66
+ that the following conditions are met:
67
+
68
+ * Redistributions of source code must retain the
69
+ above copyright notice, this list of conditions and
70
+ the following disclaimer.
71
+
72
+ * Redistributions in binary form must reproduce
73
+ the above copyright notice, this list of conditions
74
+ and the following disclaimer in the documentation
75
+ and/or other materials provided with the distribution.
76
+
77
+ * Neither the name of the Caricature Team nor the
78
+ names of its contributors may be used to endorse
79
+ or promote products derived from this software
80
+ without specific prior written permission.
81
+
82
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
83
+ CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
84
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
85
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
86
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
87
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
88
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
89
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
90
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
91
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
92
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
93
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
94
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
95
+ SUCH DAMAGE.
96
+
97
+ [This is the BSD license, see
98
+ http://www.opensource.org/licenses/bsd-license.php]
data/Rakefile CHANGED
@@ -1,8 +1,10 @@
1
1
  require 'rubygems'
2
- require 'ftools'
2
+ require 'fileutils'
3
3
  require 'rake/rdoctask'
4
- require 'jeweler'
5
4
 
5
+ $:.unshift 'lib'
6
+ require 'caricature'
7
+
6
8
  desc "The default task is to run all the specs"
7
9
  task :default => [:clr_models, :spec]
8
10
 
@@ -34,68 +36,269 @@ end
34
36
  desc "Compiles the clr models"
35
37
  task :clr_models do
36
38
  Dir.chdir(File.dirname(__FILE__))
37
- files = Dir.glob("spec/models/*.cs").collect { |f| f.gsub(/\//, "\\") }.join(" ")
38
- system "#{csc} /noconfig /target:library /debug+ /debug:full /out:spec\\bin\\ClrModels.dll #{files}"
39
- end
39
+ files = Dir.glob("spec/models/*.cs").join(' ') #.collect { |f| f.gsub(/\//, "\\") }.join(" ")
40
+ system "#{csc} /noconfig /target:library /debug+ /debug:full /out:spec/bin/ClrModels.dll #{files}"
41
+ end
40
42
 
41
- desc "Compiles the CLR workarounds"
42
- task :workarounds do
43
- Dir.chdir(File.dirname(__FILE__))
44
- files = Dir.glob("workarounds/*.cs").collect { |f| f.gsub(/\//, "\\") }.join(" ")
45
- system "#{csc} /noconfig /target:library /debug+ /debug:full /out:lib\\bin\\Workarounds.dll #{files}"
46
- end
43
+ ##############################################################################
44
+ # OPTIONS
45
+ ##############################################################################
46
+
47
+ PKG_NAME = 'caricature'
48
+ PKG_VERSION = Caricature::VERSION
49
+ AUTHORS = ['Ivan Porto Carrero']
50
+ EMAIL = "ivan@flanders.co.nz"
51
+ HOMEPAGE = "http://casualjim.github.com/caricature"
52
+ SUMMARY = "Caricature brings simple mocking to Ruby, DLR and CLR."
53
+
54
+ # These are the common rdoc options that are shared between generation of
55
+ # rdoc files using BOTH 'rake rdoc' and the installation by users of a
56
+ # RubyGem version which builds rdoc's along with its installation. Any
57
+ # rdoc options that are ONLY for developers running 'rake rdoc' should be
58
+ # added in the 'Rake::RDocTask' block below.
59
+ RDOC_OPTIONS = [
60
+ "--quiet",
61
+ "--title", SUMMARY,
62
+ "--main", "lib/caricature/isolation.rb",
63
+ "--line-numbers",
64
+ "--inline-source",
65
+ "--format","darkfish"
66
+ ]
67
+
68
+ # Extra files outside of the lib dir that should be included with the rdocs.
69
+ RDOC_FILES = (%w( README.rdoc)).sort
70
+
71
+ # The full file list used for rdocs, tarballs, gems, and for generating the xmpp4r.gemspec.
72
+ PKG_FILES = (%w( Rakefile caricature.gemspec ) + RDOC_FILES + Dir["{lib,spec}/**/*"]).sort
73
+
74
+ # RDOC
75
+ #######
76
+ Rake::RDocTask.new do |rd|
77
+
78
+ # which dir should rdoc files be installed in?
79
+ rd.rdoc_dir = 'rdoc'
47
80
 
48
- file_list = Dir.glob("lib/**/*.rb")
81
+ # the full list of files to be included
82
+ rd.rdoc_files.include(RDOC_FILES, "lib/**/*.rb")
83
+
84
+ # the full list of options that are common between gem build
85
+ # and 'rake rdoc' build of docs.
86
+ rd.options = RDOC_OPTIONS
87
+
88
+ # Devs Only : Uncomment to also document private methods in the rdocs
89
+ # Please don't check this change in to the source repo.
90
+ #rd.options << '--all'
91
+
92
+ # Devs Only : Uncomment to generate dot (graphviz) diagrams along with rdocs.
93
+ # This requires that graphiz (dot) be installed as a local binary and on your path.
94
+ # See : http://www.graphviz.org/
95
+ # Please don't check this change in to the source repo as it introduces a binary dependency.
96
+ #rd.options << '--diagram'
97
+ #rd.options << '--fileboxes'
49
98
 
50
- desc "Create RDoc documentation"
51
- file 'doc/index.html' => file_list do
52
- puts "######## Creating RDoc documentation"
53
- system "rdoc --title 'Caricature isolation framework documentation' -m README README.markdown lib/"
54
99
  end
55
100
 
56
- desc "An alias for creating the RDoc documentation"
57
- task :rdoc do
58
- Rake::Task['doc/index.html'].invoke
101
+ desc "Check syntax of all Ruby files."
102
+ task :check_syntax do
103
+ `find . -name "*.rb" |xargs -n1 ruby -c |grep -v "Syntax OK"`
104
+ puts "* Done"
59
105
  end
60
106
 
107
+ ##############################################################################
108
+ # PACKAGING & INSTALLATION
109
+ ##############################################################################
110
+
111
+ # What files/dirs should 'rake clean' remove?
112
+ #CLEAN.include ["*.gem", "pkg", "rdoc", "coverage"]
113
+
61
114
  begin
115
+ require 'rake/gempackagetask'
62
116
 
63
- Jeweler::Tasks.new do |gemspec|
64
- gemspec.name = "caricature"
65
- gemspec.summary = "Caricature - Bringing simple mocking to the DLR"
66
- gemspec.email = "ivan@flanders.co.nz"
67
- gemspec.homepage = "http://github.com/casualjim/caricature"
68
- gemspec.description = "This project aims to make interop between IronRuby objects and .NET objects easier. The idea is that it integrates nicely with bacon and later rspec and that it transparently lets you mock ironruby ojbects as well as CLR objects/interfaces. Caricature handles interfaces, interface inheritance, CLR objects, CLR object instances, Ruby classes and instances of Ruby classes."
69
- gemspec.authors = ["Ivan Porto Carrero"]
70
- gemspec.rubyforge_project = 'caricature' # This line would be new
117
+ spec = Gem::Specification.new do |s|
118
+ s.name = PKG_NAME
119
+ s.version = PKG_VERSION
120
+ s.authors = AUTHORS
121
+ s.email = EMAIL
122
+ s.homepage = HOMEPAGE
123
+ s.rubyforge_project = PKG_NAME
124
+ s.summary = SUMMARY
125
+ s.description = s.summary
126
+ s.platform = Gem::Platform::RUBY
127
+ s.require_path = 'lib'
128
+ s.executables = []
129
+ s.files = PKG_FILES
130
+ s.test_files = []
131
+ s.has_rdoc = true
132
+ s.extra_rdoc_files = RDOC_FILES
133
+ s.rdoc_options = RDOC_OPTIONS
134
+ s.required_ruby_version = ">= 1.8.4"
135
+ s.add_runtime_dependency(%q<uuidtools>, [">= 2.0.0"])
71
136
  end
72
- rescue LoadError
73
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
74
- end
75
137
 
76
- begin
77
- require 'rake/contrib/sshpublisher'
78
- namespace :rubyforge do
138
+ Rake::GemPackageTask.new(spec) do |pkg|
139
+ pkg.gem_spec = spec
140
+ pkg.need_tar = true
141
+ pkg.need_zip = true
142
+ end
79
143
 
80
- desc "Release gem and RDoc documentation to RubyForge"
81
- task :release => ["rubyforge:release:gem", 'rubyforge:release:docs']
144
+ namespace :gem do
82
145
 
83
- namespace :release do
84
- desc "Publish RDoc to RubyForge."
85
- task :docs => [:rdoc] do
86
- config = YAML.load(
87
- File.read(File.expand_path('~/.rubyforge/user-config.yml'))
88
- )
146
+ desc "Run :package and install the .gem locally"
147
+ task :install => [:update_gemspec, :package] do
148
+ sh %{sudo gem install --local pkg/#{PKG_NAME}-#{PKG_VERSION}.gem}
149
+ end
150
+
151
+ desc "Like gem:install but without ri or rdocs"
152
+ task :install_fast => [:update_gemspec, :package] do
153
+ sh %{sudo gem install --local pkg/#{PKG_NAME}-#{PKG_VERSION}.gem --no-rdoc --no-ri}
154
+ end
155
+
156
+ desc "Run :clean and uninstall the .gem"
157
+ task :uninstall => :clean do
158
+ sh %{sudo gem uninstall #{PKG_NAME}}
159
+ end
89
160
 
90
- host = "#{config['username']}@rubyforge.org"
91
- remote_dir = "/var/www/gforge-projects/caricature/"
92
- local_dir = 'doc'
161
+ # Thanks to the Merb project for this code.
162
+ desc "Update Github Gemspec"
163
+ task :update_gemspec do
164
+ skip_fields = %w(new_platform original_platform date)
93
165
 
94
- Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
166
+ result = "# WARNING : RAKE AUTO-GENERATED FILE. DO NOT MANUALLY EDIT!\n"
167
+ result << "# RUN : 'rake gem:update_gemspec'\n\n"
168
+ result << "Gem::Specification.new do |s|\n"
169
+ spec.instance_variables.sort.each do |ivar|
170
+ value = spec.instance_variable_get(ivar)
171
+ name = ivar.to_s.split("@").last
172
+ next if skip_fields.include?(name) || value.nil? || value == "" || (value.respond_to?(:empty?) && value.empty?)
173
+ if name == "dependencies"
174
+ value.each do |d|
175
+ dep, *ver = d.to_s.split(" ")
176
+ result << " s.add_dependency #{dep.inspect}, #{ver.join(" ").inspect.gsub(/[()]/, "")}\n"
177
+ end
178
+ else
179
+ case value
180
+ when Array
181
+ value = name != "files" ? value.inspect : value.sort.uniq.inspect.split(",").join(",\n")
182
+ when String, Fixnum, true, false
183
+ value = value.inspect
184
+ else
185
+ value = value.to_s.inspect
186
+ end
187
+ result << " s.#{name} = #{value}\n"
188
+ end
95
189
  end
190
+ result << "end"
191
+ File.open(File.join(File.dirname(__FILE__), "#{spec.name}.gemspec"), "w"){|f| f << result}
96
192
  end
97
- end
193
+
194
+ end # namespace :gem
195
+
196
+ # also keep the gemspec up to date each time we package a tarball or gem
197
+ task :package => ['gem:update_gemspec']
198
+ task :gem => ['gem:update_gemspec']
199
+
98
200
  rescue LoadError
99
- puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
201
+ puts <<EOF
202
+ ###
203
+ Packaging Warning : RubyGems is apparently not installed on this
204
+ system and any file add/remove/rename will not
205
+ be auto-updated in the 'caricature.gemspec' when you run any
206
+ package tasks. All such file changes are recommended
207
+ to be packaged on a system with RubyGems installed
208
+ if you intend to push commits to the Git repo so the
209
+ gemspec will also stay in sync for others.
210
+ ###
211
+ EOF
100
212
  end
101
213
 
214
+ # we are apparently on a system that does not have RubyGems installed.
215
+ # Lets try to provide only the basic tarball package tasks as a fallback.
216
+ unless defined? Gem
217
+ begin
218
+ require 'rake/packagetask'
219
+ Rake::PackageTask.new(PKG_NAME, PKG_VERSION) do |p|
220
+ p.package_files = PKG_FILES
221
+ p.need_tar = true
222
+ p.need_zip = true
223
+ end
224
+ rescue LoadError
225
+ puts <<EOF
226
+ ###
227
+ Warning : Unable to require the 'rake/packagetask'. Is Rake installed?
228
+ ###
229
+ EOF
230
+ end
231
+ end
232
+
233
+
234
+ # # Generate all the Rake tasks
235
+ # # Run 'rake -T' to see list of generated tasks (from gem root directory)
236
+ # $hoe = Hoe.spec 'cloudslide' do
237
+ # self.developer 'Ivan Porto Carrero', 'ivan@flanders.co.nz'
238
+ # self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
239
+ # self.rubyforge_name = self.name # TODO this is default value
240
+ # self.extra_deps = [['uuidtools','>= 2.0.0'], ['newgem', '>= 1.5.2']]
241
+ # end
242
+ #
243
+ # require 'newgem/tasks'
244
+ # Dir['tasks/**/*.rake'].each { |t| load t }
245
+
246
+ # TODO - want other tests/tasks run by default? Add them to the list
247
+ # remove_task :default
248
+ # task :default => [:spec, :features]
249
+
250
+ # file_list = Dir.glob("lib/**/*.rb")
251
+
252
+ # desc "Create RDoc documentation"
253
+ # file 'doc/index.html' => file_list do
254
+ # puts "######## Creating RDoc documentation"
255
+ # system "rdoc --title 'Caricature isolation framework documentation' -m README README.markdown lib/"
256
+ # end
257
+ #
258
+ # desc "An alias for creating the RDoc documentation"
259
+ # task :rdoc do
260
+ # Rake::Task['doc/index.html'].invoke
261
+ # end
262
+
263
+ # begin
264
+ #
265
+ # Jeweler::Tasks.new do |gemspec|
266
+ # gemspec.name = "caricature"
267
+ # gemspec.summary = "Caricature - Bringing simple mocking to the DLR"
268
+ # gemspec.email = "ivan@flanders.co.nz"
269
+ # gemspec.homepage = "http://github.com/casualjim/caricature"
270
+ # gemspec.description = "This project aims to make interop between IronRuby objects and .NET objects easier. The idea is that it integrates nicely with bacon and later rspec and that it transparently lets you mock ironruby ojbects as well as CLR objects/interfaces. Caricature handles interfaces, interface inheritance, CLR objects, CLR object instances, Ruby classes and instances of Ruby classes."
271
+ # gemspec.authors = ["Ivan Porto Carrero"]
272
+ # gemspec.rubyforge_project = 'caricature' # This line would be new
273
+ # end
274
+ # rescue LoadError
275
+ # puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
276
+ # end
277
+ #
278
+ # begin
279
+ # require 'rake/contrib/sshpublisher'
280
+ # namespace :rubyforge do
281
+ #
282
+ # desc "Release gem and RDoc documentation to RubyForge"
283
+ # task :release => ["rubyforge:release:gem", 'rubyforge:release:docs']
284
+ #
285
+ # namespace :release do
286
+ # desc "Publish RDoc to RubyForge."
287
+ # task :docs => [:rdoc] do
288
+ # config = YAML.load(
289
+ # File.read(File.expand_path('~/.rubyforge/user-config.yml'))
290
+ # )
291
+ #
292
+ # host = "#{config['username']}@rubyforge.org"
293
+ # remote_dir = "/var/www/gforge-projects/caricature/"
294
+ # local_dir = 'doc'
295
+ #
296
+ # Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
297
+ # end
298
+ # end
299
+ # end
300
+ # rescue LoadError
301
+ # puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
302
+ # end
303
+ #
304
+ #