gitswitch 0.3.0 → 0.3.1
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/.gemtest +0 -0
- data/Rakefile +2 -0
- data/gitswitch.gemspec +1 -1
- data/lib/gitswitch/cli.rb +4 -4
- data/lib/gitswitch/version.rb +1 -1
- metadata +9 -8
data/.gemtest
ADDED
File without changes
|
data/Rakefile
CHANGED
data/gitswitch.gemspec
CHANGED
data/lib/gitswitch/cli.rb
CHANGED
@@ -54,15 +54,15 @@ class Gitswitch
|
|
54
54
|
method_option :global, :type => :boolean, :aliases => ["-s","--global"] ## To support the deprecated behavior
|
55
55
|
method_option :repository, :type => :boolean, :aliases => "-r"
|
56
56
|
def switch(tag = 'default')
|
57
|
-
options[:global] ?
|
57
|
+
options[:global] ? global(tag) : Gitswitch.new.switch_repo_user(tag)
|
58
58
|
puts Gitswitch.current_user_info
|
59
59
|
end
|
60
60
|
|
61
61
|
|
62
62
|
######################################################################
|
63
|
-
desc "global [TAG]", "Switch global git user"
|
64
|
-
map "-s" => :
|
65
|
-
def
|
63
|
+
desc "global [TAG]", "Switch global git user (your ~/.gitconfig file)"
|
64
|
+
map "-s" => :global
|
65
|
+
def global(tag = 'default')
|
66
66
|
Gitswitch.new.switch_global_user(tag)
|
67
67
|
puts Gitswitch.current_user_info
|
68
68
|
end
|
data/lib/gitswitch/version.rb
CHANGED
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:
|
5
|
-
prerelease:
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joe Alba
|
@@ -54,12 +54,12 @@ dependencies:
|
|
54
54
|
requirements:
|
55
55
|
- - ">="
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
hash:
|
57
|
+
hash: 27
|
58
58
|
segments:
|
59
59
|
- 2
|
60
|
-
-
|
60
|
+
- 5
|
61
61
|
- 0
|
62
|
-
version: 2.
|
62
|
+
version: 2.5.0
|
63
63
|
type: :development
|
64
64
|
version_requirements: *id003
|
65
65
|
description: Easily switch your git name/e-mail user info -- Handy for work vs. personal and for pair programming
|
@@ -74,6 +74,7 @@ extra_rdoc_files:
|
|
74
74
|
files:
|
75
75
|
- .bundle/config
|
76
76
|
- .document
|
77
|
+
- .gemtest
|
77
78
|
- .gitignore
|
78
79
|
- .rspec
|
79
80
|
- Gemfile
|
@@ -118,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
119
|
requirements: []
|
119
120
|
|
120
121
|
rubyforge_project:
|
121
|
-
rubygems_version: 1.
|
122
|
+
rubygems_version: 1.5.0
|
122
123
|
signing_key:
|
123
124
|
specification_version: 3
|
124
125
|
summary: Easy git user switching
|