git-pc 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/git-pc.rb +11 -10
- data/lib/git-pc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 913b0927cb57c098db23569584b0f526d1bb96ae
|
4
|
+
data.tar.gz: b4984342918ad256e106407de177b329baa79ef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf64e5afbdede9b37e6e65dcf7baf28591fc5246bde933e40129a7552113ecb8866bd492cfa459858a827866a55846a9f734bc510073916217b62858b6356d89
|
7
|
+
data.tar.gz: 6291b7ecfe1f4b0d0f49fa70329c4b11c0618246795bece757938c5bbd2b6f6f15eafe33631415966d1e50599b8e9d549c7d959f2dc37d2340280e8d9495b8e8
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
###Git shortcut to automate the commit and push commands
|
2
2
|
|
3
|
-
Sometimes
|
3
|
+
Sometimes executing basic git commands is very boring and repetitive so, this shortcut will help you a lot. It will run these commands in this sequence:
|
4
4
|
|
5
5
|
- `git status`
|
6
|
-
- `git commit -am"YOUR_MESSAGE_COMMIT"`
|
6
|
+
- `git commit -S -am"YOUR_MESSAGE_COMMIT"`
|
7
7
|
- `git push origin YOUR_CURRENT_BRANCH`
|
8
8
|
|
9
9
|
**The Script**
|
@@ -18,7 +18,7 @@ echo -e "$(tput setaf 2)** Executing Status command$(tput sgr0)"
|
|
18
18
|
git status
|
19
19
|
|
20
20
|
echo -e "$(tput setaf 2)\n** Executing commit command$(tput sgr0)\n"
|
21
|
-
git commit -am"$COMMIT_MESSAGE"
|
21
|
+
git commit -S -am"$COMMIT_MESSAGE"
|
22
22
|
|
23
23
|
echo -e "$(tput setaf 2)\n** Executing push command$(tput sgr0)\n\n"
|
24
24
|
git push origin $CURRENT_BRANCH
|
@@ -34,7 +34,7 @@ $ gem install git-pc
|
|
34
34
|
|
35
35
|
**Usage:**
|
36
36
|
|
37
|
-
|
37
|
+
Access some git repository and now you just run:
|
38
38
|
|
39
39
|
```bash
|
40
40
|
git pc 'Message Commit'
|
data/lib/git-pc.rb
CHANGED
@@ -23,27 +23,28 @@ class GitPc
|
|
23
23
|
%x(git status)
|
24
24
|
end
|
25
25
|
|
26
|
-
def
|
27
|
-
puts "Executing
|
28
|
-
puts "git
|
26
|
+
def add_command
|
27
|
+
puts "Executing add command".green
|
28
|
+
puts "git add .".yellow
|
29
29
|
puts
|
30
|
-
%x(git
|
30
|
+
%x(git add .)
|
31
31
|
end
|
32
32
|
|
33
33
|
def commit_command
|
34
34
|
puts "Executing commit command".green
|
35
|
-
puts "git commit -
|
35
|
+
puts "git commit -S -am #{ message }".yellow
|
36
36
|
puts
|
37
|
-
%x(git commit -
|
37
|
+
%x(git commit -S -am "#{ message }")
|
38
38
|
end
|
39
39
|
|
40
|
-
def
|
41
|
-
puts "Executing
|
42
|
-
puts "git
|
40
|
+
def push_command
|
41
|
+
puts "Executing push command".green
|
42
|
+
puts "git push origin #{ current_branch }".yellow
|
43
43
|
puts
|
44
|
-
%x(git
|
44
|
+
%x(git push origin #{ current_branch })
|
45
45
|
end
|
46
46
|
|
47
|
+
|
47
48
|
def current_branch
|
48
49
|
@current_branch ||= repo.head.name
|
49
50
|
end
|
data/lib/git-pc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-pc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adriano Tadao Sabadini Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -71,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
74
|
+
rubygems_version: 2.5.1
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: git shortcut to do push and commit
|