gas 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +105 -0
- data/lib/gas.rb +1 -1
- data/lib/gas/version.rb +1 -1
- data/spec/integration/gas_spec.rb +1 -1
- metadata +5 -5
- data/README.textile +0 -53
data/README.md
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
<ul>
|
2
|
+
<li style="display: block; float: left; width: 25%; font-size: 28px;">
|
3
|
+
<a href="#get_it">Get it</a>
|
4
|
+
</li>
|
5
|
+
<li style="display: block; float: left; width: 25%; font-size: 28px;">
|
6
|
+
<a href="#use_it">Use it</a>
|
7
|
+
</li>
|
8
|
+
<li style="display: block; float: left; width: 25%; font-size: 28px;">
|
9
|
+
<a href="#extend_it">Extend it</a>
|
10
|
+
</li>
|
11
|
+
<li style="display: block; float: left; width: 25%; font-size: 28px;">
|
12
|
+
<a href="#plugins">Plugins</a>
|
13
|
+
</li>
|
14
|
+
</ul>
|
15
|
+
|
16
|
+
<br />
|
17
|
+
|
18
|
+
<a name="get_it"></a>
|
19
|
+
## Get it
|
20
|
+
|
21
|
+
The best way to install gas is with RubyGems:
|
22
|
+
|
23
|
+
$ [sudo] gem install gas
|
24
|
+
|
25
|
+
You can install from source:
|
26
|
+
|
27
|
+
$ cd gas/
|
28
|
+
$ bundle
|
29
|
+
$ rake install
|
30
|
+
|
31
|
+
<a name="use_it"></a>
|
32
|
+
## Use it
|
33
|
+
|
34
|
+
### Built-in commands
|
35
|
+
|
36
|
+
* add NICKNAME NAME EMAIL - adds a new user to gas
|
37
|
+
* delete NICKNAME - deletes a user from gas
|
38
|
+
* import NICKNAME - imports the user from .gitconfig into NICKNAME
|
39
|
+
* list - lists all users
|
40
|
+
* plugins - lists all installed plugins
|
41
|
+
* show - shows the current user
|
42
|
+
* use NICKNAME - sets the user with NICKNAME as the current user
|
43
|
+
|
44
|
+
The default task is to list authors
|
45
|
+
|
46
|
+
$ gas
|
47
|
+
|
48
|
+
$ gas list
|
49
|
+
|
50
|
+
This lists the authors that are set up in the ~/.gas/gas.users file.
|
51
|
+
|
52
|
+
You can import your current user by giving it a nickname
|
53
|
+
|
54
|
+
$ gas import current_user
|
55
|
+
|
56
|
+
To add an author use, add
|
57
|
+
|
58
|
+
$ gas add walle "Fredrik Wallgren" fredrik.wallgren@gmail.com
|
59
|
+
|
60
|
+
And the main usage, use
|
61
|
+
|
62
|
+
$ gas use walle
|
63
|
+
|
64
|
+
To delete it again use, delete
|
65
|
+
|
66
|
+
$ gas delete walle
|
67
|
+
|
68
|
+
View the help using
|
69
|
+
|
70
|
+
$ gas -h
|
71
|
+
|
72
|
+
<a name="extend_it"></a>
|
73
|
+
## Extend it
|
74
|
+
|
75
|
+
Gas is built to be extendable, it uses the same way git does. Any executable in your PATH named gas_yourplugin is useable with gas.
|
76
|
+
This means you can write extensions for gas in any language you want, the only thing you need to do is make it accessable by putting it in PATH.
|
77
|
+
|
78
|
+
An example plugin exists at https://github.com/walle/gas_stats it's written in ruby, and distributed with rubygems. But this is not a requirement.
|
79
|
+
|
80
|
+
<a name="plugins"></a>
|
81
|
+
## Plugins
|
82
|
+
|
83
|
+
### Available plugins
|
84
|
+
|
85
|
+
#### gas_stats
|
86
|
+
|
87
|
+
Shows usage statistics for gas. Serves as a reference implementation of a plugin.
|
88
|
+
|
89
|
+
Code: https://github.com/walle/gas_stats
|
90
|
+
|
91
|
+
Installation: $ gem install gas_stats
|
92
|
+
|
93
|
+
Author: [Fredrik Wallgren](https://github.com/walle)
|
94
|
+
|
95
|
+
#### gas_ssh
|
96
|
+
|
97
|
+
Adds ssh support for gas.
|
98
|
+
|
99
|
+
Work in progress right now.
|
100
|
+
|
101
|
+
Code: https://github.com/TheNotary/gas_stats
|
102
|
+
|
103
|
+
Installation: $ gem install gas_ssh
|
104
|
+
|
105
|
+
Author: [TheNotary](https://github.com/TheNotary)
|
data/lib/gas.rb
CHANGED
@@ -18,7 +18,7 @@ module Gas
|
|
18
18
|
|
19
19
|
# Print usage information to stdout
|
20
20
|
def self.print_usage
|
21
|
-
puts "Usage: command [parameters]\n\nBuilt-in commands:\n add NICKNAME NAME EMAIL - adds a new user to gas\n delete NICKNAME - deletes a user from gas\n import NICKNAME - imports the user from .gitconfig into NICKNAME\n list - lists all users\n show - shows the current user\n use NICKNAME - sets the user with NICKNAME as the current user"
|
21
|
+
puts "Usage: command [parameters]\n\nBuilt-in commands:\n add NICKNAME NAME EMAIL - adds a new user to gas\n delete NICKNAME - deletes a user from gas\n import NICKNAME - imports the user from .gitconfig into NICKNAME\n list - lists all users\n plugins - lists all installed plugins\n show - shows the current user\n use NICKNAME - sets the user with NICKNAME as the current user"
|
22
22
|
end
|
23
23
|
|
24
24
|
# Checks the number of parameters and exits with a message if wrong number of parameters is supplied
|
data/lib/gas/version.rb
CHANGED
@@ -15,7 +15,7 @@ describe Gas do
|
|
15
15
|
|
16
16
|
it 'should show correct usage' do
|
17
17
|
output = capture_stdout { Gas.print_usage }
|
18
|
-
output.should == "Usage: command [parameters]\n\nBuilt-in commands:\n add NICKNAME NAME EMAIL - adds a new user to gas\n delete NICKNAME - deletes a user from gas\n import NICKNAME - imports the user from .gitconfig into NICKNAME\n list - lists all users\n show - shows the current user\n use NICKNAME - sets the user with NICKNAME as the current user\n"
|
18
|
+
output.should == "Usage: command [parameters]\n\nBuilt-in commands:\n add NICKNAME NAME EMAIL - adds a new user to gas\n delete NICKNAME - deletes a user from gas\n import NICKNAME - imports the user from .gitconfig into NICKNAME\n list - lists all users\n plugins - lists all installed plugins\n show - shows the current user\n use NICKNAME - sets the user with NICKNAME as the current user\n"
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'should return if correct number of params is supplied' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -89,7 +89,7 @@ executables:
|
|
89
89
|
- gas-use
|
90
90
|
extensions: []
|
91
91
|
extra_rdoc_files:
|
92
|
-
- README.
|
92
|
+
- README.md
|
93
93
|
- LICENSE
|
94
94
|
files:
|
95
95
|
- bin/gas
|
@@ -111,7 +111,7 @@ files:
|
|
111
111
|
- spec/unit/user_spec.rb
|
112
112
|
- spec/unit/users_spec.rb
|
113
113
|
- LICENSE
|
114
|
-
- README.
|
114
|
+
- README.md
|
115
115
|
homepage: https://github.com/walle/gas
|
116
116
|
licenses: []
|
117
117
|
post_install_message:
|
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
segments:
|
129
129
|
- 0
|
130
|
-
hash: -
|
130
|
+
hash: -3985602024100747462
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
132
|
none: false
|
133
133
|
requirements:
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash: -
|
139
|
+
hash: -3985602024100747462
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project: gas
|
142
142
|
rubygems_version: 1.8.24
|
data/README.textile
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
h1. gas - manage your git author accounts
|
2
|
-
|
3
|
-
"!http://travis-ci.org/walle/gas.png!":http://travis-ci.org/walle/gas
|
4
|
-
|
5
|
-
h2. Description
|
6
|
-
|
7
|
-
Gas is a mighty utility that helps you keep track of your multiple git authors. Add them to gas and switch between them instantly! Great if you use one author at work and one at home or if you are doing pair programming.
|
8
|
-
|
9
|
-
h2. Installation
|
10
|
-
|
11
|
-
The best way to install gas is with RubyGems:
|
12
|
-
|
13
|
-
bc. $ [sudo] gem install gas
|
14
|
-
|
15
|
-
You can install from source:
|
16
|
-
|
17
|
-
bc. $ cd gas/
|
18
|
-
$ bundle
|
19
|
-
$ rake install
|
20
|
-
|
21
|
-
h2. Running
|
22
|
-
|
23
|
-
The default task is to list authors
|
24
|
-
|
25
|
-
bc. $ gas
|
26
|
-
|
27
|
-
bc. $ gas list
|
28
|
-
|
29
|
-
This lists the authors that are set up in the ~/.gas/gas.authors file.
|
30
|
-
|
31
|
-
You can import your current user by giving it a nickname
|
32
|
-
|
33
|
-
bc. $ gas import current_user
|
34
|
-
|
35
|
-
To add an author use, add
|
36
|
-
|
37
|
-
bc. $ gas add walle "Fredrik Wallgren" fredrik.wallgren@gmail.com
|
38
|
-
|
39
|
-
And the main usage, use
|
40
|
-
|
41
|
-
bc. $ gas use walle
|
42
|
-
|
43
|
-
To delete it again use, delete
|
44
|
-
|
45
|
-
bc. $ gas delete walle
|
46
|
-
|
47
|
-
Gas can also juggle your id_rsa ssh keys, which is helpful for uploading to github between multiple accounts. Indespensible for teachers who need to instruct their students on how to use github!
|
48
|
-
|
49
|
-
bc. $ gas add Njax NotarySojac no@mail.com
|
50
|
-
Do you want gas to handle switching rsa keys for this user?
|
51
|
-
[y/n]
|
52
|
-
|
53
|
-
View @gas -h@ to see all options.
|