git-plan 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +56 -17
- data/lib/git/plan/cli.rb +3 -3
- data/lib/git/plan/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 569a7a125983e06c8c0fc81437625868686a8869
|
4
|
+
data.tar.gz: 72e22b2f3330e41c3a8e353949886fe45cf4f229
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cdc72739ae230e9490ce049597cf976afb4b338783a7102042fd598cccb3c9df71abc0859cd4332887c4a685ad199fef5ec6d15493473405a6a8a1143a96ef1
|
7
|
+
data.tar.gz: d163129dc22b3b91296aac7f897335b83551d71cbb6c5be84d200cc68de600b6589498e189d4a26917c300a7f2f560544a0d92659b95a90943527a9247df0640
|
data/README.md
CHANGED
@@ -1,38 +1,77 @@
|
|
1
|
-
# Git
|
1
|
+
# Git-Plan
|
2
|
+
[![Gem Version](https://img.shields.io/gem/v/git-plan.svg)][gem]
|
2
3
|
|
3
|
-
|
4
|
+
[gem]: https://rubygems.org/gems/git-plan
|
4
5
|
|
5
|
-
|
6
|
+
`git-plan` is a Ruby gem to execute set of git commands at once. If you have set of git commands that you everyday run while developing, you can set an alias for the set & execute from only one command.
|
6
7
|
|
7
|
-
##
|
8
|
+
## Dependencies
|
9
|
+
First, make sure you have Ruby installed.
|
10
|
+
|
11
|
+
**On a Mac**, open `/Applications/Utilities/Terminal.app` and type:
|
12
|
+
|
13
|
+
ruby -v
|
14
|
+
|
15
|
+
If the output looks something like this, you're in good shape:
|
16
|
+
|
17
|
+
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
|
18
|
+
|
19
|
+
If the output looks more like this, you need to [install Ruby][ruby]:
|
20
|
+
[ruby]: https://www.ruby-lang.org/en/downloads/
|
8
21
|
|
9
|
-
|
22
|
+
ruby: command not found
|
10
23
|
|
11
|
-
|
12
|
-
gem 'git-plan'
|
13
|
-
```
|
24
|
+
**On Linux**, for Debian-based systems, open a terminal and type:
|
14
25
|
|
15
|
-
|
26
|
+
sudo apt-get install ruby-dev
|
16
27
|
|
17
|
-
|
28
|
+
or for Red Hat-based distros like Fedora and CentOS, type:
|
18
29
|
|
19
|
-
|
30
|
+
sudo yum install ruby-devel
|
20
31
|
|
21
|
-
|
32
|
+
(if necessary, adapt for your package manager)
|
33
|
+
|
34
|
+
**On Windows**, you can install Ruby with [RubyInstaller][].
|
35
|
+
[rubyinstaller]: http://rubyinstaller.org/downloads/
|
36
|
+
|
37
|
+
## Installation
|
38
|
+
Once you've verified that Ruby is installed:
|
39
|
+
|
40
|
+
gem install git-plan
|
22
41
|
|
23
42
|
## Usage
|
24
43
|
|
25
|
-
|
44
|
+
###Before execute set of git commands from a single command, configure the commands with an alias by,
|
45
|
+
|
46
|
+
plan add ALIASNAME "GIT COMMAND, GIT COMMAND2, GIT COMMAND3, GIT COMMAND4 #"
|
47
|
+
|
48
|
+
Eg:
|
49
|
+
|
50
|
+
plan add eg1 "git status, git log"
|
51
|
+
|
52
|
+
plan add eg2 "git status, git commit -m "#", git push origin #"
|
53
|
+
|
54
|
+
Use # symbol if you want to use a dynamic word inside the command(Eg: branch name)
|
55
|
+
|
56
|
+
|
57
|
+
###To run configured set of commands,
|
58
|
+
|
59
|
+
plan r ALIASNAME "VARIABLE1, VARIABLE2"
|
60
|
+
|
61
|
+
Eg:
|
62
|
+
|
63
|
+
plan r eg1
|
64
|
+
|
65
|
+
plan r eg2 "HERE IS THE COMMIT MESSAGE, master"
|
26
66
|
|
27
|
-
|
67
|
+
###Help
|
28
68
|
|
29
|
-
|
69
|
+
plan help
|
30
70
|
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
71
|
|
33
72
|
## Contributing
|
34
73
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
74
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/dilumn/git-plan. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
75
|
|
37
76
|
|
38
77
|
## License
|
data/lib/git/plan/cli.rb
CHANGED
@@ -11,13 +11,13 @@ module Git
|
|
11
11
|
super
|
12
12
|
end
|
13
13
|
|
14
|
-
desc 'add', 'add commands to use later
|
14
|
+
desc 'add', 'add set of git commands with an alias to use later. Eg: plan add stat "git status, git log"'
|
15
15
|
def add(command, group)
|
16
16
|
hash = {command => group}
|
17
17
|
@cfile.add_command(hash)
|
18
18
|
end
|
19
19
|
|
20
|
-
desc 'r', 'run set of git commands configured
|
20
|
+
desc 'r', 'run set of git commands configured from adding. Eg: plan r stat'
|
21
21
|
def r(command, variables)
|
22
22
|
variable_count = 0
|
23
23
|
group = @cfile.run(command).split(',')
|
@@ -26,8 +26,8 @@ module Git
|
|
26
26
|
if value.include? "#"
|
27
27
|
value.gsub! '#', variables[variable_count]
|
28
28
|
variable_count += 1
|
29
|
-
binding.pry
|
30
29
|
end
|
30
|
+
say "########################EXECUTING #{value}##############################"
|
31
31
|
system "bash", "-c", value
|
32
32
|
}
|
33
33
|
end
|
data/lib/git/plan/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-plan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DilumN
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|