git-hub 1.5.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- metadata +29 -55
- data/LICENSE +0 -20
- data/README.md +0 -339
- data/Rakefile +0 -104
- data/bin/hub +0 -7
- data/lib/hub.rb +0 -5
- data/lib/hub/args.rb +0 -99
- data/lib/hub/commands.rb +0 -716
- data/lib/hub/context.rb +0 -159
- data/lib/hub/runner.rb +0 -71
- data/lib/hub/standalone.rb +0 -52
- data/lib/hub/version.rb +0 -3
- data/man/hub.1 +0 -356
- data/man/hub.1.html +0 -370
- data/man/hub.1.ronn +0 -275
- data/test/alias_test.rb +0 -41
- data/test/deps.rip +0 -1
- data/test/fakebin/git +0 -11
- data/test/fakebin/open +0 -3
- data/test/helper.rb +0 -111
- data/test/hub_test.rb +0 -844
- data/test/standalone_test.rb +0 -49
data/test/standalone_test.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift File.dirname(__FILE__)
|
2
|
-
require 'helper'
|
3
|
-
require 'fileutils'
|
4
|
-
|
5
|
-
class StandaloneTest < Test::Unit::TestCase
|
6
|
-
include FileUtils
|
7
|
-
|
8
|
-
def setup
|
9
|
-
rm "hub" if File.exists? 'hub'
|
10
|
-
rm_rf "/tmp/_hub_private" if File.exists? '/tmp/_hub_private'
|
11
|
-
mkdir "/tmp/_hub_private"
|
12
|
-
chmod 0400, "/tmp/_hub_private"
|
13
|
-
end
|
14
|
-
|
15
|
-
def teardown
|
16
|
-
rm "hub" if File.exists? 'hub'
|
17
|
-
rm_rf "/tmp/_hub_private" if File.exists? "/tmp/_hub_private"
|
18
|
-
end
|
19
|
-
|
20
|
-
def test_standalone
|
21
|
-
standalone = Hub::Standalone.build
|
22
|
-
assert_includes "This file, hub, is generated code", standalone
|
23
|
-
assert_includes "Runner", standalone
|
24
|
-
assert_includes "Args", standalone
|
25
|
-
assert_includes "Commands", standalone
|
26
|
-
assert_includes ".execute(*ARGV)", standalone
|
27
|
-
assert_not_includes "module Standalone", standalone
|
28
|
-
|
29
|
-
standalone =~ /__END__\s*(.+)/m
|
30
|
-
assert_equal File.read('man/hub.1'), $1
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_standalone_save
|
34
|
-
Hub::Standalone.save("hub")
|
35
|
-
assert_equal Hub::Standalone.build, File.read('./hub')
|
36
|
-
end
|
37
|
-
|
38
|
-
def test_standalone_save_permission_denied
|
39
|
-
assert_raises Errno::EACCES do
|
40
|
-
Hub::Standalone.save("hub", "/tmp/_hub_private")
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_standalone_save_doesnt_exist
|
45
|
-
assert_raises Errno::ENOENT do
|
46
|
-
Hub::Standalone.save("hub", "/tmp/something/not/real")
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|