sake 1.0.1 → 1.0.2

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.
Files changed (3) hide show
  1. data/lib/help.rb +1 -1
  2. data/lib/sake.rb +17 -15
  3. metadata +2 -2
data/lib/help.rb CHANGED
@@ -16,7 +16,7 @@ Usage: sake [options]
16
16
  -i file Install all tasks from <file>.
17
17
  -i file tasks Install tasks from <file>. Can be one or more tasks.
18
18
 
19
- -u tasks Uninstalls one or more tasks.
19
+ -u tasks Uninstall one or more tasks.
20
20
 
21
21
  -e file Show the source for all tasks from <file>.
22
22
  -e file tasks Show the source for <task> as defined in <file>.
data/lib/sake.rb CHANGED
@@ -68,7 +68,7 @@ class Sake
68
68
  module Version
69
69
  Major = '1'
70
70
  Minor = '0'
71
- Tweak = '1'
71
+ Tweak = '2'
72
72
  String = [ Major, Minor, Tweak ].join('.')
73
73
  end
74
74
 
@@ -95,13 +95,13 @@ class Sake
95
95
  # $ sake -T db
96
96
  # $ sake -T file.rake
97
97
  # $ sake -T file.rake db
98
- if index = @args.index('-T')
98
+ if (index = @args.index('-T')) || @args.empty?
99
99
  begin
100
100
  tasks = TasksFile.parse(@args[index + 1]).tasks
101
101
  pattern = @args[index + 2]
102
102
  rescue
103
103
  tasks = Store.tasks.sort
104
- pattern = @args[index + 1]
104
+ pattern = index ? @args[index + 1] : nil
105
105
  end
106
106
 
107
107
  return show_tasks(tasks, pattern)
@@ -448,7 +448,20 @@ class Sake
448
448
  end
449
449
 
450
450
  def path
451
- File.join(File.expand_path('~'), '.sake')
451
+ if PLATFORM =~ /win32/
452
+ win32_path
453
+ else
454
+ File.join(File.expand_path('~'), '.sake')
455
+ end
456
+ end
457
+
458
+ def win32_path
459
+ unless File.exists?(win32home = ENV['HOMEDRIVE'] + ENV['HOMEPATH'])
460
+ puts "# No HOMEDRIVE or HOMEPATH environment variable.",
461
+ "# Sake needs to know where it should save Rake tasks!"
462
+ else
463
+ File.join(win32home, 'Sakefile')
464
+ end
452
465
  end
453
466
 
454
467
  def save!
@@ -494,17 +507,6 @@ module Rake # :nodoc: all
494
507
  sake_original_have_rakefile(*args) || true
495
508
  end
496
509
  end
497
-
498
- class Task
499
- ##
500
- # We want only run a Sake task -- not any other matching
501
- # or duplicate tasks.
502
- def enhance(deps=nil, &block)
503
- @prerequisites |= deps if deps
504
- @actions = [block] if block_given?
505
- self
506
- end
507
- end
508
510
  end
509
511
 
510
512
  ##
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.1
7
- date: 2007-06-23 00:00:00 -07:00
6
+ version: 1.0.2
7
+ date: 2007-06-24 00:00:00 -07:00
8
8
  summary: Sake tastes great and helps maintain system-level Rake files.
9
9
  require_paths:
10
10
  - lib