git-plan 0.1.1 → 0.1.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 +11 -0
- data/lib/git/plan/cli.rb +21 -2
- 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: 0a47f99daa40efc5443536e48561985abf0af032
|
4
|
+
data.tar.gz: 4652745a0482056fcb20347bc8e93a2705f1c88e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64a084aeaaff07883b7ea6cf06019112a0e512189b9f648d539ed7d751bf873d2415419211a7478bf9c9cc052457a4c49c2b9fc231895b0fafd720a695d40aa4
|
7
|
+
data.tar.gz: 151bd296cb5414b2206afef09e1ab3996440d72b03c193ca571c7b5f594120e80020bc316ce6abc8dec4e8569ce3fd82faa585a0019b4abe3e89102a5d832e67
|
data/README.md
CHANGED
@@ -64,6 +64,17 @@ Eg:
|
|
64
64
|
|
65
65
|
plan r eg2 "HERE IS THE COMMIT MESSAGE, master"
|
66
66
|
|
67
|
+
|
68
|
+
###To see the command set before executing,
|
69
|
+
|
70
|
+
plan inspect ALIASNAME "VARIABLE1, VARIABLE2"
|
71
|
+
|
72
|
+
Eg:
|
73
|
+
|
74
|
+
plan inspect eg1
|
75
|
+
|
76
|
+
plan inspect eg2 "HERE IS THE COMMIT MESSAGE, master"
|
77
|
+
|
67
78
|
###Help
|
68
79
|
|
69
80
|
plan help
|
data/lib/git/plan/cli.rb
CHANGED
@@ -19,7 +19,26 @@ module Git
|
|
19
19
|
|
20
20
|
desc 'r', 'run set of git commands configured from adding. Eg: plan r stat'
|
21
21
|
def r(command, variables)
|
22
|
+
get_command_list(command, variables).each { |value|
|
23
|
+
say "########################EXECUTING #{value}##############################"
|
24
|
+
system "bash", "-c", value
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
desc 'inspect', 'see the command list for an alias before executing'
|
29
|
+
def inspect(command, variables)
|
30
|
+
get_command_list(command, variables).each { |value|
|
31
|
+
say "#{value}"
|
32
|
+
}
|
33
|
+
say ""
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def get_command_list(command, variables)
|
22
40
|
variable_count = 0
|
41
|
+
command_list = []
|
23
42
|
group = @cfile.run(command).split(',')
|
24
43
|
variables = variables.split(',')
|
25
44
|
group.each { |value|
|
@@ -27,9 +46,9 @@ module Git
|
|
27
46
|
value.gsub! '#', variables[variable_count]
|
28
47
|
variable_count += 1
|
29
48
|
end
|
30
|
-
|
31
|
-
system "bash", "-c", value
|
49
|
+
command_list << value
|
32
50
|
}
|
51
|
+
command_list
|
33
52
|
end
|
34
53
|
|
35
54
|
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.2
|
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-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|