factorylabs-cargo 0.0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Manifest.txt +21 -0
- data/README.rdoc +121 -0
- data/Rakefile +28 -0
- data/bin/cargo +3 -0
- data/bin/hack +32 -0
- data/bin/pack +4 -0
- data/bin/ship +7 -0
- data/bin/yank +9 -0
- data/files/cargo.png +0 -0
- data/files/cargo.user.js +94 -0
- data/lib/cargo/cargo_server.rb +69 -0
- data/lib/cargo/command_helpers.rb +61 -0
- data/lib/cargo.rb +6 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/spec/cargo_spec.rb +11 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +10 -0
- data/tasks/rspec.rake +21 -0
- metadata +110 -0
data/History.txt
ADDED
data/Manifest.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
History.txt
|
2
|
+
Manifest.txt
|
3
|
+
README.rdoc
|
4
|
+
Rakefile
|
5
|
+
bin/cargo
|
6
|
+
bin/hack
|
7
|
+
bin/pack
|
8
|
+
bin/ship
|
9
|
+
bin/yank
|
10
|
+
files/cargo.user.js
|
11
|
+
files/cargo.png
|
12
|
+
lib/cargo.rb
|
13
|
+
lib/cargo/cargo_server.rb
|
14
|
+
lib/cargo/command_helpers.rb
|
15
|
+
script/console
|
16
|
+
script/destroy
|
17
|
+
script/generate
|
18
|
+
spec/cargo_spec.rb
|
19
|
+
spec/spec.opts
|
20
|
+
spec/spec_helper.rb
|
21
|
+
tasks/rspec.rake
|
data/README.rdoc
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
== DESCRIPTION:
|
2
|
+
|
3
|
+
http://www.factorylabs.com/images/cargo.png
|
4
|
+
|
5
|
+
Cargo is a set of tools to help streamline using git. The type of tools and
|
6
|
+
usage vary, but they represent a process that we've adapted to streamline our
|
7
|
+
workflow.
|
8
|
+
|
9
|
+
More features will be added. Pivotal integration on git wrapper commands and
|
10
|
+
other features are on the unofficial list.
|
11
|
+
|
12
|
+
This is currently in alpha and has no tests (eeek!)
|
13
|
+
|
14
|
+
== FEATURES:
|
15
|
+
|
16
|
+
* Commands to streamline git usage.
|
17
|
+
* Server/userscript integration with Pivotal Tracker (and growlnotify).
|
18
|
+
|
19
|
+
== SYNOPSIS:
|
20
|
+
|
21
|
+
=== Cargo Server:
|
22
|
+
|
23
|
+
* cargo (runs the cargo server that listens for incoming events)
|
24
|
+
cargo[git:master] $ cargo
|
25
|
+
=> Starting Cargo 0.0.2 on http://0.0.0.0:8081
|
26
|
+
=> Ctrl-C to shutdown server
|
27
|
+
** Cargo listening at 0.0.0.0:8081
|
28
|
+
|
29
|
+
To install the userscript in either Firefox, or the nightly build of WebKit
|
30
|
+
(requirements outlined below) browse to http://localhost:8081/cargo.user.js
|
31
|
+
|
32
|
+
If you have the proper setup (Greasemonkey / GreaseKit) you'll be prompted to
|
33
|
+
install the user script. Once installed you'll be asked when starting a story
|
34
|
+
if a branch should be created automatically, and asked if you'd like your
|
35
|
+
changes committed when finishing a story (prompting is configurable).
|
36
|
+
|
37
|
+
=== Git Wrapper Commands:
|
38
|
+
|
39
|
+
* hack (update master create a topic branch)
|
40
|
+
cargo[git:master] $ hack
|
41
|
+
Already on "master"
|
42
|
+
From git@github.com:factorylabs/cargo
|
43
|
+
* branch master -> FETCH_HEAD
|
44
|
+
Topic name (story): fix_issue
|
45
|
+
Story number (optional): 1234
|
46
|
+
Switched to a new branch "fix_issue_1234"
|
47
|
+
cargo[git:fix_issue_1234] $
|
48
|
+
|
49
|
+
* pack (switch to master and merge branch)
|
50
|
+
cargo[git:fix_issue_1234] $ pack
|
51
|
+
Switched to branch "master"
|
52
|
+
cargo[git:master] $ git status
|
53
|
+
On branch master
|
54
|
+
Your branch is ahead of 'origin/master' by 7 commits.
|
55
|
+
|
56
|
+
nothing to commit (working directory clean)
|
57
|
+
cargo[git:master] $
|
58
|
+
|
59
|
+
* ship (switch to master and merge branch push to remote origin, delete topic branch)
|
60
|
+
cargo[git:fix_issue_1234] $ ship
|
61
|
+
Switched to branch "master"
|
62
|
+
Counting objects: 60, done.
|
63
|
+
Compressing objects: 100% (45/45), done.
|
64
|
+
Writing objects: 100% (46/46), 16.92 KiB, done.
|
65
|
+
Total 46 (delta 23), reused 0 (delta 0)
|
66
|
+
To git@github.com:factorylabs/cargo.git
|
67
|
+
41e9cfb..b51cba0 master -> master
|
68
|
+
cargo[git:master] $ git branch
|
69
|
+
* master
|
70
|
+
cargo[git:master] $
|
71
|
+
|
72
|
+
* yank (rebase current branch with latest from master)
|
73
|
+
cargo[git:fix_issue_1234] $ yank
|
74
|
+
Switched to branch "master"
|
75
|
+
From git@github.com:factorylabs/cargo
|
76
|
+
* branch master -> FETCH_HEAD
|
77
|
+
Switched to branch "fix_issue_1234"
|
78
|
+
Current branch fix_issue_1234 is up to date.
|
79
|
+
cargo[git:fix_issue_1234] $
|
80
|
+
|
81
|
+
== REQUIREMENTS:
|
82
|
+
|
83
|
+
The Cargo server and userscript integration for pivotal tracker requires one of
|
84
|
+
the following setups:
|
85
|
+
|
86
|
+
* Firefox 3.0.9+, and the Greasemonkey plugin that can be found at https://addons.mozilla.org/en-US/firefox/addon/748
|
87
|
+
|
88
|
+
Future support will include:
|
89
|
+
|
90
|
+
* Nightly Build of WebKit (OS X r42858)+, and GreaseKit that can be found at http://8-p.info/greasekit/
|
91
|
+
|
92
|
+
* Fluid support should be coming with the next public update of Safari.
|
93
|
+
|
94
|
+
== INSTALL:
|
95
|
+
|
96
|
+
sudo gem install factorylabs-cargo --source=http://gems.github.com
|
97
|
+
|
98
|
+
== LICENSE:
|
99
|
+
|
100
|
+
(The MIT License)
|
101
|
+
|
102
|
+
Copyright (c) 2009 Factory Design Labs
|
103
|
+
|
104
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
105
|
+
a copy of this software and associated documentation files (the
|
106
|
+
'Software'), to deal in the Software without restriction, including
|
107
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
108
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
109
|
+
permit persons to whom the Software is furnished to do so, subject to
|
110
|
+
the following conditions:
|
111
|
+
|
112
|
+
The above copyright notice and this permission notice shall be
|
113
|
+
included in all copies or substantial portions of the Software.
|
114
|
+
|
115
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
116
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
117
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
118
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
119
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
120
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
121
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
|
2
|
+
require File.dirname(__FILE__) + '/lib/cargo'
|
3
|
+
|
4
|
+
# Generate all the Rake tasks
|
5
|
+
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
6
|
+
$hoe = Hoe.new('cargo', Cargo::VERSION) do |p|
|
7
|
+
p.developer('Factory Design Labs', 'interactive@factorylabs.com')
|
8
|
+
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
9
|
+
p.post_install_message = ""
|
10
|
+
p.rubyforge_name = p.name
|
11
|
+
p.extra_deps = [
|
12
|
+
['rack', '>= 0.9.1'],
|
13
|
+
]
|
14
|
+
p.extra_dev_deps = [
|
15
|
+
['newgem', ">= #{::Newgem::VERSION}"]
|
16
|
+
]
|
17
|
+
|
18
|
+
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
19
|
+
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
20
|
+
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
21
|
+
p.rsync_args = '-av --delete --ignore-errors'
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'newgem/tasks' # load /tasks/*.rake
|
25
|
+
Dir['tasks/**/*.rake'].each { |t| load t }
|
26
|
+
|
27
|
+
# TODO - want other tests/tasks run by default? Add them to the list
|
28
|
+
# task :default => [:spec, :features]
|
data/bin/cargo
ADDED
data/bin/hack
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "#{File.dirname(__FILE__)}/../lib/cargo/command_helpers.rb"
|
3
|
+
|
4
|
+
|
5
|
+
git_freshen_master
|
6
|
+
|
7
|
+
if ARGV.empty?
|
8
|
+
total = `git branch`.scan("story").size
|
9
|
+
if total == 0
|
10
|
+
default = "story"
|
11
|
+
else
|
12
|
+
default = "story_#{total + 1}"
|
13
|
+
end
|
14
|
+
name = Readline.readline "Topic name (#{default}): "
|
15
|
+
if name.strip.empty?
|
16
|
+
name = default
|
17
|
+
end
|
18
|
+
else
|
19
|
+
name = ARGV[0]
|
20
|
+
end
|
21
|
+
|
22
|
+
if ARGV.length > 1
|
23
|
+
story_number = ARGV[1]
|
24
|
+
else
|
25
|
+
story_number = Readline.readline "Story number (optional): "
|
26
|
+
end
|
27
|
+
|
28
|
+
unless story_number.strip.empty?
|
29
|
+
name = "#{name}-#{story_number}"
|
30
|
+
end
|
31
|
+
|
32
|
+
cmd "git checkout -b #{name}"
|
data/bin/pack
ADDED
data/bin/ship
ADDED
data/bin/yank
ADDED
data/files/cargo.png
ADDED
Binary file
|
data/files/cargo.user.js
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
// ==UserScript==
|
2
|
+
// @name cargo
|
3
|
+
// @description Hijacks story stage changed events and sends an XHR request to your local cargo server that will create a new git branch when you start a story, and tries to commit that branch when you mark it as finished.
|
4
|
+
// @include http://www.pivotaltracker.com/projects/*
|
5
|
+
// @author Factory Design Labs
|
6
|
+
// ==/UserScript==
|
7
|
+
|
8
|
+
GARGO_SERVER = 'http://localhost:8081';
|
9
|
+
CARGO_ASK_FIRST = true;
|
10
|
+
|
11
|
+
Cargo = {
|
12
|
+
gm: true,
|
13
|
+
|
14
|
+
initialize: function() {
|
15
|
+
// make th script work with both GreaseKit and Greasemonkey
|
16
|
+
if (typeof(unsafeWindow) == 'undefined') {
|
17
|
+
this.gm = false;
|
18
|
+
window.unsafeWindow = window;
|
19
|
+
}
|
20
|
+
this.hijackActions();
|
21
|
+
},
|
22
|
+
|
23
|
+
hijackActions: function() {
|
24
|
+
unsafeWindow.Cargo = this;
|
25
|
+
var takeOverFunction = function() {
|
26
|
+
PerformStoryAction.prototype.signalSuccessFromServer =
|
27
|
+
PerformStoryAction.prototype.signalSuccessFromServer.wrap(
|
28
|
+
function(oldMethod) {
|
29
|
+
Cargo.performedStoryAction(this.story);
|
30
|
+
oldMethod();
|
31
|
+
}
|
32
|
+
);
|
33
|
+
}
|
34
|
+
|
35
|
+
if (this.gm) location.href = "javascript:(" + takeOverFunction + ")()";
|
36
|
+
else takeOverFunction();
|
37
|
+
},
|
38
|
+
|
39
|
+
performedStoryAction: function(story) {
|
40
|
+
var state = story.getCurrentState()
|
41
|
+
|
42
|
+
var params = {
|
43
|
+
id: story.getId(),
|
44
|
+
initials: (story.getOwnedBy()) ? story.getOwnedBy().initials : '',
|
45
|
+
name: story.getName(),
|
46
|
+
story_type: story.getStoryType()._displayName,
|
47
|
+
description: story.getDescription()
|
48
|
+
}
|
49
|
+
|
50
|
+
switch (state.toString()) {
|
51
|
+
case 'started':
|
52
|
+
if ((CARGO_ASK_FIRST) ? confirm("Create a working branch?") : true) {
|
53
|
+
this.request('start', params);
|
54
|
+
}
|
55
|
+
break;
|
56
|
+
case 'finished':
|
57
|
+
if ((CARGO_ASK_FIRST) ? confirm("Commit your working branch?") : true) {
|
58
|
+
this.request('finish', params);
|
59
|
+
}
|
60
|
+
break;
|
61
|
+
}
|
62
|
+
},
|
63
|
+
|
64
|
+
request: function(action, params) {
|
65
|
+
setTimeout(function() {
|
66
|
+
var method = 'POST';
|
67
|
+
var url = [GARGO_SERVER, action].join('/');
|
68
|
+
var headers = { 'Content-Type': 'application/x-www-form-urlencoded' };
|
69
|
+
var data = unsafeWindow.Object.toQueryString(params);
|
70
|
+
|
71
|
+
if (Cargo.gm) {
|
72
|
+
GM_xmlhttpRequest({method: method, headers: headers, url: url, data: data,
|
73
|
+
onerror: function() { alert("Error: Cargo server isn't started?"); },
|
74
|
+
onload: function(response) {
|
75
|
+
Cargo.debug(response);
|
76
|
+
}
|
77
|
+
});
|
78
|
+
} else {
|
79
|
+
new Ajax.Request(url, {method: method, parameters: params,
|
80
|
+
onFailure: function() { alert("Error: Cargo server isn't started?"); },
|
81
|
+
onSuccess: function(response) {
|
82
|
+
Cargo.debug(response);
|
83
|
+
}
|
84
|
+
});
|
85
|
+
}
|
86
|
+
}, 0);
|
87
|
+
},
|
88
|
+
|
89
|
+
debug: function() {
|
90
|
+
if (unsafeWindow.console && unsafeWindow.console.info) unsafeWindow.console.info(arguments);
|
91
|
+
}
|
92
|
+
};
|
93
|
+
|
94
|
+
Cargo.initialize();
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rack'
|
3
|
+
require 'cargo'
|
4
|
+
require "#{File.dirname(__FILE__)}/command_helpers.rb"
|
5
|
+
|
6
|
+
puts "=> Starting Cargo #{Cargo::VERSION} on http://0.0.0.0:8081"
|
7
|
+
puts "=> Ctrl-C to shutdown server"
|
8
|
+
puts "** Cargo listening at 0.0.0.0:8081"
|
9
|
+
|
10
|
+
class CargoServer
|
11
|
+
def call(env)
|
12
|
+
if env['REQUEST_METHOD'] == 'OPTIONS'
|
13
|
+
[200, {
|
14
|
+
'Access-Control-Allow-Origin' => '*', # TODO get this working with restrictions
|
15
|
+
'Access-Control-Allow-Methods' => 'GET, OPTIONS',
|
16
|
+
'Access-Control-Allow-Headers' => 'X-Prototype-Version, X-Requested-With, Accept',
|
17
|
+
'Access-Control-Max-Age' => '1728000',
|
18
|
+
'Access-Control' => 'allow <*>'
|
19
|
+
}, '']
|
20
|
+
else
|
21
|
+
req = Rack::Request.new(env)
|
22
|
+
puts req.path_info
|
23
|
+
case req.path_info
|
24
|
+
|
25
|
+
when '/start' # start a story
|
26
|
+
puts `hack #{escape(req['name'])[0..30]} #{req['id']}`
|
27
|
+
notify("Starting Story", "Starting story '#{req['name']}' [#{req['id']}]", 0)
|
28
|
+
|
29
|
+
[200, { 'Content-Type' => 'application/json; charset=utf-8'},
|
30
|
+
"{success: 'starting story'}"]
|
31
|
+
|
32
|
+
when '/finish' # finish a story
|
33
|
+
branch = git_branch
|
34
|
+
story_id = branch.split('-').last
|
35
|
+
if story_id == req['id']
|
36
|
+
puts `ship`
|
37
|
+
notify("Finishing Story", "Finishing story '#{req['name']}' [#{req['id']}]", 0)
|
38
|
+
else
|
39
|
+
notify("Story id doesn't match current branch", "Story id doesn't match current branch '#{branch}' [#{req['id']}]", 1)
|
40
|
+
end
|
41
|
+
|
42
|
+
[200, {'Content-Type' => 'application/json; charset=utf-8'},
|
43
|
+
"{success: 'finishing story'}"]
|
44
|
+
|
45
|
+
when '/cargo.user.js' # send the user script file
|
46
|
+
[200, {'Content-Type' => 'text/javascript'},
|
47
|
+
File.read("#{File.dirname(__FILE__)}/../../files/cargo.user.js")]
|
48
|
+
|
49
|
+
else # handle everything else like a 404
|
50
|
+
[404, {'Content-Type' => 'text/html'}, '404 Not Found']
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def escape(name)
|
57
|
+
name.gsub!(/\W+/, ' ') # all non-word chars to spaces
|
58
|
+
name.strip! # ohh la la
|
59
|
+
name.downcase! #
|
60
|
+
name.gsub!(/\ +/, '_')
|
61
|
+
end
|
62
|
+
|
63
|
+
def notify(title, message, priority)
|
64
|
+
puts message
|
65
|
+
system "growlnotify -n Cargo --image #{File.dirname(__FILE__)}/../../files/cargo.png -p #{priority} -m #{message} #{title}"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
Rack::Handler::Mongrel.run CargoServer.new, :Port => 8081
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'readline'
|
2
|
+
|
3
|
+
def git_branch
|
4
|
+
`git branch | grep "*"`.strip[2..-1]
|
5
|
+
end
|
6
|
+
|
7
|
+
def is_branch_dirty?
|
8
|
+
status = `git status`
|
9
|
+
/\#\s+modified\:/ =~ status
|
10
|
+
end
|
11
|
+
|
12
|
+
def git_checkout(branch)
|
13
|
+
cmd "git checkout #{branch}"
|
14
|
+
end
|
15
|
+
|
16
|
+
def stash_if_dirty
|
17
|
+
if is_branch_dirty?
|
18
|
+
cmd "git stash"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def apply_stash_if_was_dirty
|
23
|
+
stash_list = `git stash list`
|
24
|
+
if /stash\@\{\d\}\:/ =~ stash_list
|
25
|
+
cmd "git stash pop"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def git_merge_with_master(branch=git_branch)
|
30
|
+
git_checkout "master"
|
31
|
+
cmd "git merge #{branch}"
|
32
|
+
end
|
33
|
+
|
34
|
+
def git_freshen_master
|
35
|
+
git_checkout "master"
|
36
|
+
cmd "git pull origin master"
|
37
|
+
end
|
38
|
+
|
39
|
+
def cmd(input)
|
40
|
+
result = `#{input}`
|
41
|
+
puts result
|
42
|
+
if $?.exitstatus > 0
|
43
|
+
puts "Cargo (#{input}) failed, exiting. [#{$?.exitstatus}]"
|
44
|
+
exit 1
|
45
|
+
end
|
46
|
+
result
|
47
|
+
end
|
48
|
+
|
49
|
+
def compare_git_ver
|
50
|
+
m = /git version (\d+).(\d+).(\d+)/.match(`git version`.strip)
|
51
|
+
return true if m[1].to_i > 1
|
52
|
+
return false if m[1].to_i < 1
|
53
|
+
return true if m[2].to_i > 5
|
54
|
+
return false if m[2].to_i < 5
|
55
|
+
return true if m[3].to_i >= 3
|
56
|
+
return false
|
57
|
+
end
|
58
|
+
|
59
|
+
def check_git_ver
|
60
|
+
raise "Invalid git version, use at least 1.5.3" unless compare_git_ver
|
61
|
+
end
|
data/lib/cargo.rb
ADDED
data/script/console
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/console
|
3
|
+
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
+
|
5
|
+
libs = " -r irb/completion"
|
6
|
+
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
+
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
+
libs << " -r #{File.dirname(__FILE__) + '/../lib/cargo.rb'}"
|
9
|
+
puts "Loading cargo gem"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/destroy'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'rubigen'
|
6
|
+
rescue LoadError
|
7
|
+
require 'rubygems'
|
8
|
+
require 'rubigen'
|
9
|
+
end
|
10
|
+
require 'rubigen/scripts/generate'
|
11
|
+
|
12
|
+
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
+
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/spec/cargo_spec.rb
ADDED
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
data/spec/spec_helper.rb
ADDED
data/tasks/rspec.rake
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
begin
|
2
|
+
require 'spec'
|
3
|
+
rescue LoadError
|
4
|
+
require 'rubygems'
|
5
|
+
require 'spec'
|
6
|
+
end
|
7
|
+
begin
|
8
|
+
require 'spec/rake/spectask'
|
9
|
+
rescue LoadError
|
10
|
+
puts <<-EOS
|
11
|
+
To use rspec for testing you must install rspec gem:
|
12
|
+
gem install rspec
|
13
|
+
EOS
|
14
|
+
exit(0)
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Run the specs under spec/models"
|
18
|
+
Spec::Rake::SpecTask.new do |t|
|
19
|
+
t.spec_opts = ['--options', "spec/spec.opts"]
|
20
|
+
t.spec_files = FileList['spec/**/*_spec.rb']
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: factorylabs-cargo
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Factory Design Labs
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-04-30 00:00:00 -07:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rack
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.9.1
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: newgem
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.3.0
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: hoe
|
37
|
+
type: :development
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.8.0
|
44
|
+
version:
|
45
|
+
description: http://www.factorylabs.com/images/cargo.png Cargo is a set of tools to help streamline using git. The type of tools and usage vary, but they represent a process that we've adapted to streamline our workflow. More features will be added. Pivotal integration on git wrapper commands and other features are on the unofficial list. This is currently in alpha and has no tests (eeek!)
|
46
|
+
email:
|
47
|
+
- interactive@factorylabs.com
|
48
|
+
executables:
|
49
|
+
- cargo
|
50
|
+
- hack
|
51
|
+
- pack
|
52
|
+
- ship
|
53
|
+
- yank
|
54
|
+
extensions: []
|
55
|
+
|
56
|
+
extra_rdoc_files:
|
57
|
+
- History.txt
|
58
|
+
- Manifest.txt
|
59
|
+
- README.rdoc
|
60
|
+
files:
|
61
|
+
- History.txt
|
62
|
+
- Manifest.txt
|
63
|
+
- README.rdoc
|
64
|
+
- Rakefile
|
65
|
+
- bin/cargo
|
66
|
+
- bin/hack
|
67
|
+
- bin/pack
|
68
|
+
- bin/ship
|
69
|
+
- bin/yank
|
70
|
+
- files/cargo.user.js
|
71
|
+
- files/cargo.png
|
72
|
+
- lib/cargo.rb
|
73
|
+
- lib/cargo/cargo_server.rb
|
74
|
+
- lib/cargo/command_helpers.rb
|
75
|
+
- script/console
|
76
|
+
- script/destroy
|
77
|
+
- script/generate
|
78
|
+
- spec/cargo_spec.rb
|
79
|
+
- spec/spec.opts
|
80
|
+
- spec/spec_helper.rb
|
81
|
+
- tasks/rspec.rake
|
82
|
+
has_rdoc: true
|
83
|
+
homepage: http://www.factorylabs.com/images/cargo.png
|
84
|
+
post_install_message: ""
|
85
|
+
rdoc_options:
|
86
|
+
- --main
|
87
|
+
- README.rdoc
|
88
|
+
require_paths:
|
89
|
+
- lib
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: "0"
|
95
|
+
version:
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: "0"
|
101
|
+
version:
|
102
|
+
requirements: []
|
103
|
+
|
104
|
+
rubyforge_project: cargo
|
105
|
+
rubygems_version: 1.2.0
|
106
|
+
signing_key:
|
107
|
+
specification_version: 2
|
108
|
+
summary: http://www.factorylabs.com/images/cargo.png Cargo is a set of tools to help streamline using git
|
109
|
+
test_files: []
|
110
|
+
|