ianwhite-garlic 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/garlic +7 -5
- data/lib/garlic/{runner.rb → session.rb} +1 -1
- data/lib/garlic/tasks.rb +1 -1
- data/lib/garlic.rb +4 -4
- data/lib/tabtab_definition.rb +7 -0
- metadata +4 -3
data/bin/garlic
CHANGED
@@ -15,7 +15,7 @@ garlic - run a command in different versions of rails
|
|
15
15
|
USAGE: garlic [options] [command]
|
16
16
|
|
17
17
|
COMMANDS:
|
18
|
-
#{Garlic::
|
18
|
+
#{Garlic::Session.commands_with_description.map{|method, desc| " %-17s %s" % [method, desc]}.join("\n")}
|
19
19
|
|
20
20
|
The default command is "default"
|
21
21
|
|
@@ -31,6 +31,8 @@ You can generate a sample garlic.rb with
|
|
31
31
|
|
32
32
|
end_doc
|
33
33
|
|
34
|
+
@verbose = false
|
35
|
+
|
34
36
|
GetoptLong.new(
|
35
37
|
['--help', '-h', GetoptLong::NO_ARGUMENT],
|
36
38
|
['--verbose', '-v', GetoptLong::NO_ARGUMENT],
|
@@ -48,14 +50,14 @@ GetoptLong.new(
|
|
48
50
|
end
|
49
51
|
|
50
52
|
begin
|
51
|
-
# generate a config file
|
52
53
|
if ARGV.first == 'generate'
|
53
54
|
generate_config(*ARGV[1..-1])
|
54
|
-
|
55
|
-
# run a garlic command
|
56
55
|
else
|
57
|
-
|
56
|
+
# run a garlic command
|
57
|
+
raise "Unknown command: #{ARGV.first}" unless ARGV.empty? || Garlic::Session.commands.include?(ARGV.first)
|
58
58
|
|
59
|
+
verbose(@verbose)
|
60
|
+
|
59
61
|
# configure the garlic runner
|
60
62
|
garlic @config_file do
|
61
63
|
verbose @verbose
|
data/lib/garlic/tasks.rb
CHANGED
@@ -14,7 +14,7 @@ task :garlic do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
namespace :garlic do
|
17
|
-
Garlic::
|
17
|
+
Garlic::Session.commands_with_description.each do |command, description|
|
18
18
|
desc description
|
19
19
|
task command do
|
20
20
|
garlic.send command
|
data/lib/garlic.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require "garlic/
|
1
|
+
require "garlic/session"
|
2
2
|
require "garlic/configurator"
|
3
3
|
require "garlic/repo"
|
4
4
|
require "garlic/target"
|
@@ -11,14 +11,14 @@ module Garlic
|
|
11
11
|
module Version
|
12
12
|
Major = 0
|
13
13
|
Minor = 1
|
14
|
-
Tiny =
|
14
|
+
Tiny = 3
|
15
15
|
|
16
16
|
String = [Major, Minor, Tiny].join('.')
|
17
17
|
end
|
18
18
|
|
19
|
-
# return the current garlic
|
19
|
+
# return the current garlic session
|
20
20
|
def garlic(config = nil, &block)
|
21
|
-
@garlic ||= Garlic::
|
21
|
+
@garlic ||= Garlic::Session.new(self)
|
22
22
|
load_config(config)
|
23
23
|
@garlic.configure(&block) if block_given?
|
24
24
|
@garlic
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ianwhite-garlic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian White
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-23 00:00:00 -08:00
|
13
13
|
default_executable: garlic
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -25,11 +25,12 @@ files:
|
|
25
25
|
- lib/garlic/configurator.rb
|
26
26
|
- lib/garlic/generator.rb
|
27
27
|
- lib/garlic/repo.rb
|
28
|
-
- lib/garlic/
|
28
|
+
- lib/garlic/session.rb
|
29
29
|
- lib/garlic/shell.rb
|
30
30
|
- lib/garlic/target.rb
|
31
31
|
- lib/garlic/tasks.rb
|
32
32
|
- lib/garlic.rb
|
33
|
+
- lib/tabtab_definition.rb
|
33
34
|
- templates/default.rb
|
34
35
|
- templates/rspec.rb
|
35
36
|
- templates/shoulda.rb
|