public
Fork of evilchelu/braid
Description: Simple tool for managing vendor branches across different SCMs
Homepage: http://evil.che.lu/projects/braid
Clone URL: git://github.com/fsvehla/braid.git
add --rails_plugin (-p) option to braid add to make adding plugin mirrors 
easier

braid add -p svn://blah # => adds blah mirror in vendor/plugins/blah
evilchelu (author)
Sun Mar 02 09:17:31 -0800 2008
commit  e6c55f999836eb3007e2367a2e7f2c189500462d
tree    df0e91652f1a27d2a78d2a3c0871b9e74891f849
parent  77685786917908440eeaa5d5f503c4cc4e5f2501
...
58
59
60
61
 
62
63
64
 
65
66
67
...
154
155
156
 
 
 
 
 
 
 
 
157
158
159
...
58
59
60
 
61
62
63
 
64
65
66
67
...
154
155
156
157
158
159
160
161
162
163
164
165
166
167
0
@@ -58,10 +58,10 @@ Main {
0
       . braid add svn://remote/path --branch notmaster
0
     txt
0
 
0
- mixin :argument_remote, :option_type, :optional_mirror, :option_branch
0
+ mixin :argument_remote, :option_type, :optional_mirror, :option_branch, :option_rails_plugin
0
 
0
     run{
0
- Braid::Command.run(:add, remote, {"type" => type, "mirror" => mirror, "branch" => branch})
0
+ Braid::Command.run(:add, remote, {"type" => type, "mirror" => mirror, "branch" => branch, "rails_plugin" => rails_plugin})
0
     }
0
   }
0
 
0
@@ -154,6 +154,14 @@ Main {
0
     }
0
   end
0
 
0
+ mixin :option_rails_plugin do
0
+ option(:rails_plugin, :p){
0
+ optional
0
+ desc 'added mirror is a rails plugin'
0
+ attr
0
+ }
0
+ end
0
+
0
   run{ help! }
0
 }
0
 
...
17
18
19
 
20
21
22
...
90
91
92
 
 
 
 
93
94
95
...
17
18
19
20
21
22
23
...
91
92
93
94
95
96
97
98
99
100
0
@@ -17,6 +17,7 @@ module Braid
0
       raise Braid::Config::BranchIsRequired unless params["branch"]
0
       raise Braid::Config::MirrorNameIsRequired unless mirror
0
 
0
+ params.delete("rails_plugin")
0
       add(mirror, params)
0
       [mirror, get(mirror)]
0
     end
0
@@ -90,6 +91,10 @@ module Braid
0
         type = options["type"] || extract_type_from_path(remote)
0
         mirror = options["mirror"] || extract_mirror_from_path(remote)
0
 
0
+ if options["rails_plugin"]
0
+ mirror = "vendor/plugins/#{mirror}"
0
+ end
0
+
0
         [remove_trailing_slash(mirror), {"type" => type, "remote" => remote, "branch" => branch}]
0
       end
0
 

Comments

    No one has commented yet.