gitswitch 0.1.5 → 0.2.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/.bundle/config +2 -0
- data/.rspec +1 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +31 -0
- data/Rakefile +9 -9
- data/VERSION +1 -1
- data/gitswitch.gemspec +14 -4
- data/lib/gitswitch.rb +1 -7
- data/spec/gitswitch_spec.rb +16 -0
- data/spec/spec_helper.rb +10 -0
- metadata +14 -7
data/.bundle/config
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
diff-lcs (1.1.2)
|
5
|
+
gemcutter (0.6.1)
|
6
|
+
git (1.2.5)
|
7
|
+
jeweler (1.4.0)
|
8
|
+
gemcutter (>= 0.1.0)
|
9
|
+
git (>= 1.2.5)
|
10
|
+
rubyforge (>= 2.0.0)
|
11
|
+
json_pure (1.4.6)
|
12
|
+
rspec (2.0.0.beta.22)
|
13
|
+
rspec-core (= 2.0.0.beta.22)
|
14
|
+
rspec-expectations (= 2.0.0.beta.22)
|
15
|
+
rspec-mocks (= 2.0.0.beta.22)
|
16
|
+
rspec-core (2.0.0.beta.22)
|
17
|
+
rspec-expectations (2.0.0.beta.22)
|
18
|
+
diff-lcs (>= 1.1.2)
|
19
|
+
rspec-mocks (2.0.0.beta.22)
|
20
|
+
rspec-core (= 2.0.0.beta.22)
|
21
|
+
rspec-expectations (= 2.0.0.beta.22)
|
22
|
+
rubyforge (2.0.4)
|
23
|
+
json_pure (>= 1.1.7)
|
24
|
+
|
25
|
+
PLATFORMS
|
26
|
+
ruby
|
27
|
+
|
28
|
+
DEPENDENCIES
|
29
|
+
bundler (~> 1.0.0)
|
30
|
+
jeweler (~> 1.4.0)
|
31
|
+
rspec (~> 2.0.0.beta.22)
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
|
-
|
4
|
-
|
3
|
+
require 'rspec/core'
|
4
|
+
require 'rspec/core/rake_task'
|
5
5
|
|
6
6
|
|
7
7
|
begin
|
@@ -34,12 +34,12 @@ Rake::RDocTask.new do |rdoc|
|
|
34
34
|
end
|
35
35
|
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
37
|
+
desc 'Default: Run specs'
|
38
|
+
task :default => :spec
|
39
|
+
|
40
|
+
desc 'Run specs'
|
41
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
42
|
+
t.pattern = FileList["spec/**/*_spec.rb"]
|
43
|
+
end
|
44
44
|
|
45
45
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/gitswitch.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{gitswitch}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Joe Alba"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-15}
|
13
13
|
s.default_executable = %q{gitswitch}
|
14
14
|
s.description = %q{Easily switch your git name/e-mail user info -- Handy for work vs. personal and for pair programming}
|
15
15
|
s.email = %q{joe@joealba.com}
|
@@ -19,21 +19,31 @@ Gem::Specification.new do |s|
|
|
19
19
|
"README.rdoc"
|
20
20
|
]
|
21
21
|
s.files = [
|
22
|
-
".
|
22
|
+
".bundle/config",
|
23
|
+
".document",
|
23
24
|
".gitignore",
|
25
|
+
".rspec",
|
26
|
+
"Gemfile",
|
27
|
+
"Gemfile.lock",
|
24
28
|
"LICENSE",
|
25
29
|
"README.rdoc",
|
26
30
|
"Rakefile",
|
27
31
|
"VERSION",
|
28
32
|
"bin/gitswitch",
|
29
33
|
"gitswitch.gemspec",
|
30
|
-
"lib/gitswitch.rb"
|
34
|
+
"lib/gitswitch.rb",
|
35
|
+
"spec/gitswitch_spec.rb",
|
36
|
+
"spec/spec_helper.rb"
|
31
37
|
]
|
32
38
|
s.homepage = %q{http://github.com/joealba/gitswitch}
|
33
39
|
s.rdoc_options = ["--charset=UTF-8"]
|
34
40
|
s.require_paths = ["lib"]
|
35
41
|
s.rubygems_version = %q{1.3.7}
|
36
42
|
s.summary = %q{Easy git user switching}
|
43
|
+
s.test_files = [
|
44
|
+
"spec/gitswitch_spec.rb",
|
45
|
+
"spec/spec_helper.rb"
|
46
|
+
]
|
37
47
|
|
38
48
|
if s.respond_to? :specification_version then
|
39
49
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
data/lib/gitswitch.rb
CHANGED
@@ -4,7 +4,6 @@ require 'shellwords' if !String.new.methods.include?('shellescape')
|
|
4
4
|
|
5
5
|
|
6
6
|
class GitSwitch
|
7
|
-
VERSION_FILE = File.join File.dirname(__FILE__), "..", "VERSION"
|
8
7
|
GITSWITCH_CONFIG_FILE = File.join ENV["HOME"], ".gitswitch"
|
9
8
|
GIT_BIN = '/usr/bin/env git'
|
10
9
|
|
@@ -213,12 +212,7 @@ class GitSwitch
|
|
213
212
|
|
214
213
|
# Print version information.
|
215
214
|
def print_version
|
216
|
-
|
217
|
-
puts "GitSwitch " + fh.gets
|
218
|
-
fh.close
|
219
|
-
else
|
220
|
-
puts "Version information not found"
|
221
|
-
end
|
215
|
+
puts "GitSwitch " + VERSION.to_s
|
222
216
|
end
|
223
217
|
|
224
218
|
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe GitSwitch do
|
4
|
+
|
5
|
+
describe "basics" do
|
6
|
+
it "should have a VERSION" do
|
7
|
+
VERSION.should_not == ''
|
8
|
+
end
|
9
|
+
|
10
|
+
it "should find the git executable" do
|
11
|
+
result = %x[#{GitSwitch::GIT_BIN} --version]
|
12
|
+
$?.exitstatus.should == 0
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitswitch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joe Alba
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-15 00:00:00 -04:00
|
19
19
|
default_executable: gitswitch
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -29,8 +29,12 @@ extra_rdoc_files:
|
|
29
29
|
- LICENSE
|
30
30
|
- README.rdoc
|
31
31
|
files:
|
32
|
+
- .bundle/config
|
32
33
|
- .document
|
33
34
|
- .gitignore
|
35
|
+
- .rspec
|
36
|
+
- Gemfile
|
37
|
+
- Gemfile.lock
|
34
38
|
- LICENSE
|
35
39
|
- README.rdoc
|
36
40
|
- Rakefile
|
@@ -38,6 +42,8 @@ files:
|
|
38
42
|
- bin/gitswitch
|
39
43
|
- gitswitch.gemspec
|
40
44
|
- lib/gitswitch.rb
|
45
|
+
- spec/gitswitch_spec.rb
|
46
|
+
- spec/spec_helper.rb
|
41
47
|
has_rdoc: true
|
42
48
|
homepage: http://github.com/joealba/gitswitch
|
43
49
|
licenses: []
|
@@ -72,5 +78,6 @@ rubygems_version: 1.3.7
|
|
72
78
|
signing_key:
|
73
79
|
specification_version: 3
|
74
80
|
summary: Easy git user switching
|
75
|
-
test_files:
|
76
|
-
|
81
|
+
test_files:
|
82
|
+
- spec/gitswitch_spec.rb
|
83
|
+
- spec/spec_helper.rb
|