schacon-github 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +18 -0
- data/Manifest +19 -0
- data/README +164 -0
- data/bin/gh +5 -0
- data/bin/github +5 -0
- data/commands/commands.rb +242 -0
- data/commands/helpers.rb +370 -0
- data/github-gem.gemspec +26 -0
- data/lib/github.rb +146 -0
- data/lib/github/command.rb +99 -0
- data/lib/github/extensions.rb +28 -0
- data/lib/github/helper.rb +4 -0
- data/spec/command_spec.rb +82 -0
- data/spec/extensions_spec.rb +36 -0
- data/spec/github_spec.rb +65 -0
- data/spec/helper_spec.rb +280 -0
- data/spec/spec_helper.rb +138 -0
- data/spec/ui_spec.rb +604 -0
- data/spec/windoze_spec.rb +36 -0
- metadata +92 -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,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: schacon-github
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Wanstrath, Kevin Ballard, Scott Chacon
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-05-18 00:00:00 -07:00
|
13
|
+
default_executable: gh
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: json
|
17
|
+
version_requirement:
|
18
|
+
version_requirements: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0"
|
23
|
+
version:
|
24
|
+
description: The official `github` command line helper for simplifying your GitHub experience.
|
25
|
+
email: chris@ozmm.org
|
26
|
+
executables:
|
27
|
+
- github
|
28
|
+
- gh
|
29
|
+
extensions: []
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
32
|
+
- bin/github
|
33
|
+
- bin/gh
|
34
|
+
- lib/github/extensions.rb
|
35
|
+
- lib/github/command.rb
|
36
|
+
- lib/github/helper.rb
|
37
|
+
- lib/github.rb
|
38
|
+
- LICENSE
|
39
|
+
- README
|
40
|
+
files:
|
41
|
+
- bin/github
|
42
|
+
- commands/commands.rb
|
43
|
+
- commands/helpers.rb
|
44
|
+
- lib/github/extensions.rb
|
45
|
+
- lib/github/command.rb
|
46
|
+
- lib/github/helper.rb
|
47
|
+
- lib/github.rb
|
48
|
+
- LICENSE
|
49
|
+
- Manifest
|
50
|
+
- README
|
51
|
+
- spec/command_spec.rb
|
52
|
+
- spec/extensions_spec.rb
|
53
|
+
- spec/github_spec.rb
|
54
|
+
- spec/helper_spec.rb
|
55
|
+
- spec/spec_helper.rb
|
56
|
+
- spec/ui_spec.rb
|
57
|
+
- spec/windoze_spec.rb
|
58
|
+
- github-gem.gemspec
|
59
|
+
- bin/gh
|
60
|
+
has_rdoc: true
|
61
|
+
homepage: http://github.com/
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options:
|
64
|
+
- --line-numbers
|
65
|
+
- --inline-source
|
66
|
+
- --title
|
67
|
+
- Github
|
68
|
+
- --main
|
69
|
+
- README
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: "0"
|
77
|
+
version:
|
78
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: "0"
|
83
|
+
version:
|
84
|
+
requirements: []
|
85
|
+
|
86
|
+
rubyforge_project: github
|
87
|
+
rubygems_version: 1.2.0
|
88
|
+
signing_key:
|
89
|
+
specification_version: 2
|
90
|
+
summary: The official `github` command line helper for simplifying your GitHub experience.
|
91
|
+
test_files: []
|
92
|
+
|