ehahn-github 0.1.3

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.
@@ -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,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ehahn-github
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
5
+ platform: ruby
6
+ authors:
7
+ - Chris Wanstrath, Kevin Ballard
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-05-18 00:00:00 -07:00
13
+ default_executable: github
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rake
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
+ extensions: []
29
+
30
+ extra_rdoc_files:
31
+ - bin/github
32
+ - lib/github/extensions.rb
33
+ - lib/github/command.rb
34
+ - lib/github/helper.rb
35
+ - lib/github.rb
36
+ - LICENSE
37
+ - README
38
+ files:
39
+ - bin/github
40
+ - commands/commands.rb
41
+ - commands/helpers.rb
42
+ - lib/github/extensions.rb
43
+ - lib/github/command.rb
44
+ - lib/github/helper.rb
45
+ - lib/github.rb
46
+ - LICENSE
47
+ - Manifest
48
+ - README
49
+ - spec/command_spec.rb
50
+ - spec/extensions_spec.rb
51
+ - spec/github_spec.rb
52
+ - spec/helper_spec.rb
53
+ - spec/spec_helper.rb
54
+ - spec/ui_spec.rb
55
+ - spec/windoze_spec.rb
56
+ - github-gem.gemspec
57
+ has_rdoc: true
58
+ homepage: http://github.com/
59
+ post_install_message:
60
+ rdoc_options:
61
+ - --line-numbers
62
+ - --inline-source
63
+ - --title
64
+ - Github
65
+ - --main
66
+ - README
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: "0"
74
+ version:
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
80
+ version:
81
+ requirements: []
82
+
83
+ rubyforge_project: github
84
+ rubygems_version: 1.2.0
85
+ signing_key:
86
+ specification_version: 2
87
+ summary: The official `github` command line helper for simplifying your GitHub experience.
88
+ test_files: []
89
+