public
Rubygem
Description: A lightweight and flexible website management system.
Homepage: http://webby.rubyforge.org/
Clone URL: git://github.com/TwP/webby.git
updating Mr Bones tasks
TwP (author)
Sat Jan 26 20:18:25 -0800 2008
commit  1a01f005a06051ad64e88abd2d2d4db4543225c6
tree    6454fdd49e0b1c712388a7c153313f2ce1c88cd5
parent  3005c49a817588e7c2cffac77065ef3dd55e1426
...
7
8
9
10
11
12
13
...
24
25
26
 
27
28
29
...
7
8
9
 
10
11
12
...
23
24
25
26
27
28
29
0
@@ -7,7 +7,6 @@ namespace :doc do
0
   desc 'Generate RDoc documentation'
0
   Rake::RDocTask.new do |rd|
0
     rd.main = PROJ.rdoc_main
0
- rd.options << '-d' if !WIN32 and `which dot` =~ %r/\/dot/
0
     rd.rdoc_dir = PROJ.rdoc_dir
0
 
0
     incl = Regexp.new(PROJ.rdoc_include.join('|'))
0
@@ -24,6 +23,7 @@ namespace :doc do
0
     title = "#{PROJ.rubyforge_name}'s " + title if PROJ.rubyforge_name != title
0
 
0
     rd.options << "-t #{title}"
0
+ rd.options.concat(PROJ.rdoc_opts)
0
   end
0
 
0
   desc 'Generate ri locally for testing'
...
69
70
71
72
 
73
74
75
76
77
 
78
79
80
...
69
70
71
 
72
73
74
75
76
 
77
78
79
80
0
@@ -69,12 +69,12 @@ namespace :gem do
0
 
0
   desc 'Install the gem'
0
   task :install => [:clobber, :package] do
0
- sh "#{SUDO} #{GEM} install pkg/#{PROJ.spec.file_name}"
0
+ sh "#{SUDO} #{GEM} install pkg/#{PROJ.spec.full_name}"
0
   end
0
 
0
   desc 'Uninstall the gem'
0
   task :uninstall do
0
- sh "#{SUDO} #{GEM} uninstall -v '#{PROJ.version}' #{PROJ.name}"
0
+ sh "#{SUDO} #{GEM} uninstall -v '#{PROJ.version}' -x #{PROJ.name}"
0
   end
0
 
0
 end # namespace :gem
...
130
131
132
133
 
134
135
136
137
 
 
 
 
 
138
139
140
...
148
149
150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
...
130
131
132
 
133
134
 
 
 
135
136
137
138
139
140
141
142
...
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
0
@@ -130,11 +130,13 @@ def depend_on( name, version = nil )
0
   PROJ.dependencies << (version.nil? ? [name] : [name, ">= #{version}"])
0
 end
0
 
0
-# Adds the given _path_ to the include path if it is not already there
0
+# Adds the given arguments to the include path if they are not already there
0
 #
0
-def ensure_in_path( path )
0
- path = File.expand_path(path)
0
- $:.unshift(path) if test(?d, path) and not $:.include?(path)
0
+def ensure_in_path( *args )
0
+ args.each do |path|
0
+ path = File.expand_path(path)
0
+ $:.unshift(path) if test(?d, path) and not $:.include?(path)
0
+ end
0
 end
0
 
0
 # Find a rake task using the task name and remove any description text. This
0
@@ -148,4 +150,18 @@ def remove_desc_for_task( names )
0
   end
0
 end
0
 
0
+# Change working directories to _dir_, call the _block_ of code, and then
0
+# change back to the original working directory (the current directory when
0
+# this method was called).
0
+#
0
+def in_directory( dir, &block )
0
+ curdir = pwd
0
+ begin
0
+ cd dir
0
+ return block.call
0
+ ensure
0
+ cd curdir
0
+ end
0
+end
0
+
0
 # EOF
...
8
9
10
 
11
12
13
14
15
16
 
17
18
19
...
21
22
23
 
24
25
26
...
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
23
24
25
26
27
28
29
0
@@ -8,12 +8,14 @@ namespace :spec do
0
   Spec::Rake::SpecTask.new(:run) do |t|
0
     t.spec_opts = PROJ.spec_opts
0
     t.spec_files = PROJ.specs
0
+ t.libs += PROJ.libs
0
   end
0
 
0
   desc 'Run all specs with text output'
0
   Spec::Rake::SpecTask.new(:specdoc) do |t|
0
     t.spec_opts = PROJ.spec_opts + ['--format', 'specdoc']
0
     t.spec_files = PROJ.specs
0
+ t.libs += PROJ.libs
0
   end
0
 
0
   if HAVE_RCOV
0
@@ -21,6 +23,7 @@ namespace :spec do
0
     Spec::Rake::SpecTask.new(:rcov) do |t|
0
       t.spec_opts = PROJ.spec_opts
0
       t.spec_files = PROJ.specs
0
+ t.libs += PROJ.libs
0
       t.rcov = true
0
       t.rcov_opts = PROJ.rcov_opts + ['--exclude', 'spec']
0
     end

Comments

    No one has commented yet.