sake 1.0.11 → 1.0.12

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 (4) hide show
  1. data/lib/help.rb +4 -0
  2. data/lib/sake.rb +20 -8
  3. data/sake.gemspec +4 -6
  4. metadata +5 -5
@@ -12,6 +12,10 @@ Usage: sake [options]
12
12
  -T pattern Show installed Sake tasks matching <pattern>.
13
13
  -T file Show tasks in <file>.
14
14
  -T file pattern Show tasks in <file>.
15
+ -Tv Show all installed Sake tasks.
16
+ -Tv pattern Show all installed Sake tasks matching <pattern>.
17
+ -Tv file Show all tasks in <file>.
18
+ -Tv file pattern Show all tasks in <file>.
15
19
 
16
20
  -i file Install all tasks from <file>.
17
21
  -i file tasks Install tasks from <file>. Can be one or more tasks.
@@ -9,6 +9,9 @@ require 'rake'
9
9
  require 'fileutils'
10
10
  require 'open-uri'
11
11
  begin
12
+ gem 'ParseTree', '=2.0.1'
13
+ require 'parse_tree'
14
+ gem 'ruby2ruby', '=1.1.7'
12
15
  require 'ruby2ruby'
13
16
  rescue LoadError
14
17
  puts "# Sake requires the ruby2ruby gem and Ruby 1.8.6."
@@ -74,7 +77,7 @@ class Sake
74
77
  module Version #:nodoc:
75
78
  Major = '1'
76
79
  Minor = '0'
77
- Tweak = '11'
80
+ Tweak = '12'
78
81
  String = [ Major, Minor, Tweak ].join('.')
79
82
  end
80
83
 
@@ -101,7 +104,13 @@ class Sake
101
104
  # $ sake -T db
102
105
  # $ sake -T file.rake
103
106
  # $ sake -T file.rake db
104
- if (index = @args.index('-T')) || @args.empty?
107
+ # Show all Sake tasks in the store or in a file, optionally searching for a pattern.
108
+ # $ sake -Tv
109
+ # $ sake -Tv db
110
+ # $ sake -Tv file.rake
111
+ # $ sake -Tv file.rake db
112
+ if (index = @args.index('-T') || @args.index('-Tv')) || @args.empty?
113
+ display_hidden = true if @args.index('-Tv')
105
114
  begin
106
115
  tasks = TasksFile.parse(@args[index + 1]).tasks
107
116
  pattern = @args[index + 2]
@@ -109,8 +118,7 @@ class Sake
109
118
  tasks = Store.tasks.sort
110
119
  pattern = index ? @args[index + 1] : nil
111
120
  end
112
-
113
- return show_tasks(tasks, pattern)
121
+ return show_tasks(tasks, pattern, display_hidden)
114
122
 
115
123
  ##
116
124
  # Install a Rakefile or a single Rake task
@@ -171,8 +179,8 @@ class Sake
171
179
 
172
180
  private
173
181
 
174
- def show_tasks(tasks = [], pattern = nil)
175
- Rake.application.show(tasks, pattern)
182
+ def show_tasks(tasks = [], pattern = nil, display_hidden = nil)
183
+ Rake.application.show(tasks, pattern, display_hidden)
176
184
  end
177
185
 
178
186
  def install(index)
@@ -511,7 +519,7 @@ module Rake # :nodoc: all
511
519
 
512
520
  ##
513
521
  # Show tasks that don't have comments'
514
- def display_tasks_and_comments(tasks = nil, pattern = nil)
522
+ def display_tasks_and_comments(tasks = nil, pattern = nil, display_hidden = nil)
515
523
  tasks ||= self.tasks
516
524
 
517
525
  if pattern ||= options.show_task_pattern
@@ -522,7 +530,11 @@ module Rake # :nodoc: all
522
530
 
523
531
  tasks.each do |t|
524
532
  comment = " # #{t.comment}" if t.comment
525
- printf "sake %-#{width}s#{comment}\n", t.name
533
+ if display_hidden
534
+ printf "sake %-#{width}s#{comment}\n", t.name
535
+ else
536
+ printf "sake %-#{width}s#{comment}\n", t.name if t.name && t.comment
537
+ end
526
538
  end
527
539
  end
528
540
  alias_method :show, :display_tasks_and_comments
@@ -1,21 +1,19 @@
1
1
 
2
- # Gem::Specification for Sake-1.0.11
2
+ # Gem::Specification for Sake-1.0.12
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.11"
8
- s.date = %q{2007-09-09}
7
+ s.version = "1.0.12"
8
+ s.date = %q{2008-01-18}
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/}
12
12
  s.rubyforge_project = %q{err}
13
13
  s.description = %q{Sake tastes great and helps maintain system-level Rake files.}
14
- s.default_executable = %q{sake}
15
14
  s.has_rdoc = true
16
15
  s.authors = ["Chris Wanstrath"]
17
- s.files = ["./bin/sake", "./lib/help.rb", "./lib/pastie.rb", "./lib/sake.rb", "./lib/server.rb", "./Manifest", "./Rakefile", "./README", "./LICENSE", "sake.gemspec", "bin/sake"]
18
- s.executables = ["sake"]
16
+ s.files = ["./bin/sake", "./lib/help.rb", "./lib/pastie.rb", "./lib/sake.rb", "./lib/server.rb", "./Manifest", "./Rakefile", "./README", "./LICENSE", "sake.gemspec"]
19
17
  end
20
18
 
21
19
 
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: sake
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.11
7
- date: 2007-09-09 00:00:00 -05:00
6
+ version: 1.0.12
7
+ date: 2008-01-18 00:00:00 -08:00
8
8
  summary: Sake tastes great and helps maintain system-level Rake files.
9
9
  require_paths:
10
10
  - lib
@@ -45,8 +45,8 @@ rdoc_options: []
45
45
 
46
46
  extra_rdoc_files: []
47
47
 
48
- executables:
49
- - sake
48
+ executables: []
49
+
50
50
  extensions: []
51
51
 
52
52
  requirements: []