sake 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -21,3 +21,14 @@ rescue LoadError => boom
21
21
  puts "You are missing a dependency required for meta-operations on this gem."
22
22
  puts "#{boom.to_s.capitalize}."
23
23
  end
24
+
25
+ desc 'Generate RDoc documentation for Sake.'
26
+ Rake::RDocTask.new(:rdoc) do |rdoc|
27
+ files = ['README', 'LICENSE', 'lib/**/*.rb']
28
+ rdoc.rdoc_files.add(files)
29
+ rdoc.main = "README" # page to start on
30
+ rdoc.title = "sake"
31
+ rdoc.template = File.exists?(t="/Users/chris/ruby/projects/err/rock/template.rb") ? t : "/var/www/rock/template.rb"
32
+ rdoc.rdoc_dir = 'doc' # rdoc output folder
33
+ rdoc.options << '--inline-source'
34
+ end
@@ -1,5 +1,5 @@
1
1
  class Sake
2
- module Help
2
+ module Help #:nodoc:
3
3
  extend self
4
4
 
5
5
  def display
@@ -1,6 +1,6 @@
1
1
  require 'tempfile'
2
2
 
3
- class Pastie
3
+ class Pastie #:nodoc: all
4
4
  PASTE_URL = ENV['SAKE_PASTIE_URL'] || ENV['PASTIE_URL'] || 'http://pastie.caboo.se/pastes/create'
5
5
 
6
6
  def self.paste(text)
@@ -11,7 +11,8 @@ require 'open-uri'
11
11
  begin
12
12
  require 'ruby2ruby'
13
13
  rescue LoadError
14
- die "# Sake requires the ruby2ruby gem and Ruby 1.8.6."
14
+ puts "# Sake requires the ruby2ruby gem and Ruby 1.8.6."
15
+ exit
15
16
  end
16
17
  require File.dirname(__FILE__) + '/help'
17
18
  require File.dirname(__FILE__) + '/pastie'
@@ -70,10 +71,10 @@ require File.dirname(__FILE__) + '/pastie'
70
71
  # $ sake -S -d
71
72
  #
72
73
  class Sake
73
- module Version
74
+ module Version #:nodoc:
74
75
  Major = '1'
75
76
  Minor = '0'
76
- Tweak = '10'
77
+ Tweak = '11'
77
78
  String = [ Major, Minor, Tweak ].join('.')
78
79
  end
79
80
 
@@ -267,6 +268,8 @@ class Sake
267
268
  # tasks = TasksFile.parse('Rakefile').tasks
268
269
  # task = tasks['db:remigrate']
269
270
  class TasksArray < Array
271
+ ##
272
+ # Accepts a task name or index.
270
273
  def [](name_or_index)
271
274
  if name_or_index.is_a? String
272
275
  detect { |task| task.name == name_or_index }
@@ -432,12 +435,17 @@ class Sake
432
435
  end
433
436
 
434
437
  ##
435
- # String-ish duck typing
438
+ # String-ish duck typing, sorting based on Task names
436
439
  def <=>(other)
437
440
  to_s <=> other.to_s
438
441
  end
439
442
 
443
+ ##
444
+ # The task name
440
445
  def to_s; @name end
446
+
447
+ ##
448
+ # Basically to_s.inspect
441
449
  def inspect; @name.inspect end
442
450
  end
443
451
 
@@ -455,10 +463,14 @@ class Sake
455
463
  tasks_file.send(*args, &block)
456
464
  end
457
465
 
466
+ ##
467
+ # A TaskFile object of our Store
458
468
  def tasks_file
459
469
  @tasks_file ||= TasksFile.parse(path)
460
470
  end
461
471
 
472
+ ##
473
+ # The platform-aware path to the Store
462
474
  def path
463
475
  path = if PLATFORM =~ /win32/
464
476
  win32_path
@@ -469,7 +481,7 @@ class Sake
469
481
  path
470
482
  end
471
483
 
472
- def win32_path
484
+ def win32_path #:nodoc:
473
485
  unless File.exists?(win32home = ENV['HOMEDRIVE'] + ENV['HOMEPATH'])
474
486
  puts "# No HOMEDRIVE or HOMEPATH environment variable.",
475
487
  "# Sake needs to know where it should save Rake tasks!"
@@ -478,6 +490,8 @@ class Sake
478
490
  end
479
491
  end
480
492
 
493
+ ##
494
+ # Wrote our current tasks_file to disk, overwriting the current Store.
481
495
  def save!
482
496
  File.open(path, 'w') do |file|
483
497
  file.puts tasks_file.to_ruby
@@ -2,7 +2,7 @@ require 'sake' unless defined? Sake
2
2
  require 'mongrel'
3
3
 
4
4
  class Sake
5
- module Server
5
+ module Server #:nodoc:all
6
6
  extend self
7
7
 
8
8
  def start(args)
@@ -1,11 +1,11 @@
1
1
 
2
- # Gem::Specification for Sake-1.0.10
2
+ # Gem::Specification for Sake-1.0.11
3
3
  # Originally generated by Echoe
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{sake}
7
- s.version = "1.0.10"
8
- s.date = %q{2007-08-21}
7
+ s.version = "1.0.11"
8
+ s.date = %q{2007-09-09}
9
9
  s.summary = %q{Sake tastes great and helps maintain system-level Rake files.}
10
10
  s.email = %q{chris@ozmm.org}
11
11
  s.homepage = %q{http://errtheblog.com/}
@@ -44,3 +44,14 @@ end
44
44
  # puts "You are missing a dependency required for meta-operations on this gem."
45
45
  # puts "#{boom.to_s.capitalize}."
46
46
  # end
47
+ #
48
+ # desc 'Generate RDoc documentation for Sake.'
49
+ # Rake::RDocTask.new(:rdoc) do |rdoc|
50
+ # files = ['README', 'LICENSE', 'lib/**/*.rb']
51
+ # rdoc.rdoc_files.add(files)
52
+ # rdoc.main = "README" # page to start on
53
+ # rdoc.title = "sake"
54
+ # rdoc.template = File.exists?(t="/Users/chris/ruby/projects/err/rock/template.rb") ? t : "/var/www/rock/template.rb"
55
+ # rdoc.rdoc_dir = 'doc' # rdoc output folder
56
+ # rdoc.options << '--inline-source'
57
+ # end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: sake
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.10
7
- date: 2007-08-21 00:00:00 -07:00
6
+ version: 1.0.11
7
+ date: 2007-09-09 00:00:00 -05:00
8
8
  summary: Sake tastes great and helps maintain system-level Rake files.
9
9
  require_paths:
10
10
  - lib