shell_explain 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 789021ab7ef1c9774f14cd4086d8717203c928f5
4
- data.tar.gz: dcfa98c2c4041a27f848f6e6a2507d28061815bb
3
+ metadata.gz: b8e8d3c9ae3d9607d72f9b2e64baa52a903d9e3c
4
+ data.tar.gz: 51be4927f7c36a90da016d1a9fc0ea053192ffa8
5
5
  SHA512:
6
- metadata.gz: 06143aef944b496f2e64d680c810492c2dfd0e5d1ee9fafb9e8d196e342529318d386f08a175d072cd4cd33cb5c18d387aa7be14fa586de0c4bd074cceecb0f8
7
- data.tar.gz: a848e24f79783397b1f4152820de93601dc7b34ef7f1994c751b0bb927eecc6294d9a2d37d722ad161086a379605506a87f9981e0930dfa8b2d611d3e8234ec4
6
+ metadata.gz: 8c4ceaf31c50b143994cf4b86424c23fe6b9e8b964353131b24ba992db6eb7a8c68ab2b37226cae58e3ed37f6c3d3d2c9a24e3a982f527c440db692cb6912002
7
+ data.tar.gz: 01e23d45ba538d953ac22fdfc6d62f478fc6a7df49008919f0243cef8816db77584db058f10d04c6803a86c67031427052d50db384e4c0ec79e6291e9028cb6e
data/.gitignore CHANGED
@@ -1,4 +1,9 @@
1
1
  *.gem
2
+ .DS_Store
3
+ bin/.DS_Store
4
+ lib/.DS_Store
5
+ public/.DS_Store
6
+ public/img/.DS_Store
2
7
  *.rbc
3
8
  .bundle
4
9
  .config
data/README.md CHANGED
@@ -29,11 +29,18 @@ $ explain "mysql -u root -p -h 192.168.1.2"
29
29
  $ explain "iptables -A INPUT -i eth0 -s ip-to-block -j DROP"
30
30
  $ explain "git log --graph --abbrev-commit --pretty=oneline origin..mybranch"
31
31
  ```
32
+ **change explain text color:**
33
+ color depend on 'ansi'
34
+
35
+ ```sh
36
+ $ explain "true && { echo success; } || { echo failed; }" "green"
37
+ ```
38
+
32
39
 
33
40
  ## Screenshots
41
+ ![explain_shell1](https://raw.github.com/ZhangHanDong/shell_explain/master/img/explain_shell1.png)
34
42
 
35
- ![alt tag](https://github.com/ZhangHanDong/shell_explain/public/img/explain_shell1.png)
36
- ![alt tag](https://github.com/ZhangHanDong/shell_explain/public/img/explain_shell2.png)
43
+ ![explain_shell2](https://raw.github.com/ZhangHanDong/shell_explain/master/img/explain_shell2.png)
37
44
 
38
45
 
39
46
  ## Contributing
data/bin/explain CHANGED
@@ -8,6 +8,7 @@ require 'ansi/progressbar'
8
8
 
9
9
  # get cmd
10
10
  @cmd = ARGV[0]
11
+ @explain_color = ARGV[1].nil? ? :yellow : ARGV[1]
11
12
 
12
13
  #progress bar
13
14
  pbar = ANSI::Progressbar.new("Test Bar", 100)
@@ -39,13 +40,12 @@ puts ("+"*20)+"Explain Shell"+("+"*20)
39
40
 
40
41
  puts "invalid command".ansi(:red) if @results.empty?
41
42
  @results.each do |re|
42
-
43
- cmd_name = @commands.each_pair do|pair|
43
+ cmd_name = @commands.each_pair do|pair|
44
44
  puts pair[0].ansi(:red) if pair.include?(re[0])
45
- end
45
+ end
46
46
 
47
- puts re[1].ansi(:yellow)
48
- puts ("+"*50).ansi(:green)
47
+ puts re[1].ansi(@explain_color.to_sym)
48
+ puts ("+"*50).ansi(:green)
49
49
  end
50
50
 
51
51
 
data/changelog.md ADDED
@@ -0,0 +1,8 @@
1
+ ##version 0.0.3
2
+
3
+ **just modify Readme**
4
+
5
+ ##version 0.0.2
6
+
7
+ **change explain text color**
8
+
File without changes
File without changes
@@ -1,3 +1,3 @@
1
1
  module ShellExplain
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shell_explain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - blackanger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-23 00:00:00.000000000 Z
11
+ date: 2013-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ansi
@@ -74,19 +74,17 @@ executables:
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - .DS_Store
78
77
  - .gitignore
79
78
  - Gemfile
80
79
  - LICENSE.txt
81
80
  - README.md
82
81
  - Rakefile
83
82
  - bin/explain
83
+ - changelog.md
84
+ - img/explain_shell1.png
85
+ - img/explain_shell2.png
84
86
  - lib/shell_explain.rb
85
87
  - lib/shell_explain/version.rb
86
- - public/.DS_Store
87
- - public/img/.DS_Store
88
- - public/img/explain_shell1.png
89
- - public/img/explain_shell2.png
90
88
  - shell_explain.gemspec
91
89
  homepage: ''
92
90
  licenses:
data/.DS_Store DELETED
Binary file
data/public/.DS_Store DELETED
Binary file
data/public/img/.DS_Store DELETED
Binary file