hub 1.11.0 → 1.11.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of hub might be problematic. Click here for more details.
- data/Rakefile +1 -1
- data/lib/hub/context.rb +72 -44
- data/lib/hub/runner.rb +1 -0
- data/lib/hub/ssh_config.rb +12 -57
- data/lib/hub/version.rb +1 -1
- metadata +5 -50
- data/bin/bench +0 -37
- data/script/cached-bundle +0 -46
- data/script/s3-put +0 -71
- data/script/test +0 -41
- data/script/test_each +0 -9
- data/test/context_test.rb +0 -79
- data/test/deps.rip +0 -1
- data/test/fakebin/git +0 -11
- data/test/fakebin/open +0 -3
- data/test/github_api_test.rb +0 -79
- data/test/helper.rb +0 -131
- data/test/hub_test.rb +0 -607
- data/test/standalone_test.rb +0 -57
data/test/standalone_test.rb
DELETED
@@ -1,57 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
require 'hub/standalone'
|
3
|
-
require 'fileutils'
|
4
|
-
require 'stringio'
|
5
|
-
|
6
|
-
class StandaloneTest < Minitest::Test
|
7
|
-
include FileUtils
|
8
|
-
|
9
|
-
def setup
|
10
|
-
rm "hub" if File.exists? 'hub'
|
11
|
-
rm_rf "/tmp/_hub_private" if File.exists? '/tmp/_hub_private'
|
12
|
-
mkdir "/tmp/_hub_private"
|
13
|
-
chmod 0400, "/tmp/_hub_private"
|
14
|
-
end
|
15
|
-
|
16
|
-
def teardown
|
17
|
-
rm "hub" if File.exists? 'hub'
|
18
|
-
rm_rf "/tmp/_hub_private" if File.exists? "/tmp/_hub_private"
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_standalone
|
22
|
-
io = StringIO.new
|
23
|
-
Hub::Standalone.build io
|
24
|
-
standalone = io.string
|
25
|
-
|
26
|
-
assert_includes "This file is generated code", standalone
|
27
|
-
assert_includes "Runner", standalone
|
28
|
-
assert_includes "Args", standalone
|
29
|
-
assert_includes "Commands", standalone
|
30
|
-
assert_includes ".execute(*ARGV)", standalone
|
31
|
-
assert_not_includes "module Standalone", standalone
|
32
|
-
|
33
|
-
standalone =~ /__END__\s*(.+)/m
|
34
|
-
assert_equal File.read('man/hub.1'), $1
|
35
|
-
end
|
36
|
-
|
37
|
-
def test_standalone_save
|
38
|
-
Hub::Standalone.save("hub")
|
39
|
-
output = `RUBYOPT= RUBYLIB= ./hub version 2>&1`
|
40
|
-
assert_equal <<-OUT, output
|
41
|
-
git version 1.7.0.4
|
42
|
-
hub version #{Hub::VERSION}
|
43
|
-
OUT
|
44
|
-
end
|
45
|
-
|
46
|
-
def test_standalone_save_permission_denied
|
47
|
-
assert_raises Errno::EACCES do
|
48
|
-
Hub::Standalone.save("hub", "/tmp/_hub_private")
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def test_standalone_save_doesnt_exist
|
53
|
-
assert_raises Errno::ENOENT do
|
54
|
-
Hub::Standalone.save("hub", "/tmp/something/not/real")
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|