topfunky-github 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +18 -0
- data/bin/github +5 -0
- data/commands/commands.rb +127 -0
- data/commands/helpers.rb +123 -0
- data/lib/github.rb +145 -0
- data/lib/github/command.rb +87 -0
- data/lib/github/extensions.rb +28 -0
- data/lib/github/helper.rb +4 -0
- data/spec/command_spec.rb +66 -0
- data/spec/extensions_spec.rb +36 -0
- data/spec/github_spec.rb +65 -0
- data/spec/helper_spec.rb +212 -0
- data/spec/spec_helper.rb +138 -0
- data/spec/ui_spec.rb +506 -0
- data/spec/windoze_spec.rb +36 -0
- metadata +79 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
# this is an extremely hacky spec
|
2
|
+
# intended purely to test the Windoze-specific code
|
3
|
+
|
4
|
+
require 'rubygems'
|
5
|
+
require 'spec'
|
6
|
+
|
7
|
+
describe "github/command.rb" do
|
8
|
+
before(:all) do
|
9
|
+
@orig_platform = RUBY_PLATFORM
|
10
|
+
Object.send :remove_const, :RUBY_PLATFORM
|
11
|
+
Object.const_set :RUBY_PLATFORM, "mswin"
|
12
|
+
end
|
13
|
+
|
14
|
+
after(:all) do
|
15
|
+
Object.send :remove_const, :RUBY_PLATFORM
|
16
|
+
Object.const_set :RUBY_PLATFORM, @orig_platform
|
17
|
+
end
|
18
|
+
|
19
|
+
before(:each) do
|
20
|
+
@filename = File.dirname(__FILE__) + "/../lib/github/command.rb"
|
21
|
+
@data = File.read(@filename)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "should require win32/open3 under Windows" do
|
25
|
+
mod = Module.new
|
26
|
+
mod.should_receive(:require).with("win32/open3")
|
27
|
+
mod.class_eval @data, @filename
|
28
|
+
end
|
29
|
+
|
30
|
+
it "should blow up if win32/open3 isn't present under Windows" do
|
31
|
+
mod = Module.new
|
32
|
+
mod.should_receive(:require).with("win32/open3").and_return { raise LoadError }
|
33
|
+
mod.should_receive(:warn).with("You must 'gem install win32-open3' to use the github command on Windows")
|
34
|
+
lambda { mod.class_eval @data, @filename }.should raise_error(SystemExit)
|
35
|
+
end
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: topfunky-github
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.3
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Wanstrath
|
8
|
+
- Kevin Ballard
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2008-09-14 00:00:00 -07:00
|
14
|
+
default_executable: github
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: hoe
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.7.0
|
24
|
+
version:
|
25
|
+
description: The official `github` command line helper for simplifying your GitHub experience.
|
26
|
+
email: chris@ozmm.org
|
27
|
+
executables:
|
28
|
+
- github
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files: []
|
32
|
+
|
33
|
+
files:
|
34
|
+
- bin/github
|
35
|
+
- commands/commands.rb
|
36
|
+
- commands/helpers.rb
|
37
|
+
- lib/github/extensions.rb
|
38
|
+
- lib/github/command.rb
|
39
|
+
- lib/github/helper.rb
|
40
|
+
- lib/github.rb
|
41
|
+
- LICENSE
|
42
|
+
- Manifest
|
43
|
+
- README
|
44
|
+
- spec/command_spec.rb
|
45
|
+
- spec/extensions_spec.rb
|
46
|
+
- spec/github_spec.rb
|
47
|
+
- spec/helper_spec.rb
|
48
|
+
- spec/spec_helper.rb
|
49
|
+
- spec/ui_spec.rb
|
50
|
+
- spec/windoze_spec.rb
|
51
|
+
has_rdoc: true
|
52
|
+
homepage: http://github.com/
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options:
|
55
|
+
- --main
|
56
|
+
- README.txt
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: "0"
|
64
|
+
version:
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: "0"
|
70
|
+
version:
|
71
|
+
requirements: []
|
72
|
+
|
73
|
+
rubyforge_project: github
|
74
|
+
rubygems_version: 1.2.0
|
75
|
+
signing_key:
|
76
|
+
specification_version: 2
|
77
|
+
summary: The official `github` command line helper for simplifying your GitHub experience.
|
78
|
+
test_files: []
|
79
|
+
|