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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 569a7a125983e06c8c0fc81437625868686a8869
4
- data.tar.gz: 72e22b2f3330e41c3a8e353949886fe45cf4f229
3
+ metadata.gz: 0a47f99daa40efc5443536e48561985abf0af032
4
+ data.tar.gz: 4652745a0482056fcb20347bc8e93a2705f1c88e
5
5
  SHA512:
6
- metadata.gz: 5cdc72739ae230e9490ce049597cf976afb4b338783a7102042fd598cccb3c9df71abc0859cd4332887c4a685ad199fef5ec6d15493473405a6a8a1143a96ef1
7
- data.tar.gz: d163129dc22b3b91296aac7f897335b83551d71cbb6c5be84d200cc68de600b6589498e189d4a26917c300a7f2f560544a0d92659b95a90943527a9247df0640
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
@@ -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
- say "########################EXECUTING #{value}##############################"
31
- system "bash", "-c", value
49
+ command_list << value
32
50
  }
51
+ command_list
33
52
  end
34
53
 
35
54
  end
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Plan
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
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.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-19 00:00:00.000000000 Z
11
+ date: 2016-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler