watson-ruby 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +26 -11
- data/lib/watson/command.rb +4 -1
- data/lib/watson/formatters.rb +1 -0
- data/lib/watson/formatters/base_formatter.rb +0 -0
- data/lib/watson/formatters/default_formatter.rb +0 -0
- data/lib/watson/formatters/json_formatter.rb +0 -0
- data/lib/watson/formatters/silent_formatter.rb +10 -0
- data/lib/watson/formatters/unite_formatter.rb +0 -0
- data/lib/watson/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b11a43edd74df47a900897873268d38b056c10f4
|
4
|
+
data.tar.gz: 95bccd69492466cbf64102bc946d957520781c5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ca841a102298b44102bc684d6e161df044c42233f28d8c7f1a39378a8e0850aa7a926b40d4f125f76ea1525c0897c2cc439f607ab5f2c9f169d14d516170b2a
|
7
|
+
data.tar.gz: e978dac203b6b8f4c9e7bb75011f5cc0ac824efcf9b1a34613b6f90815b6bc40a278129ab154cf260bbd0761a58c5fee895633477bd94b99556186cbfb888d13
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -56,17 +56,17 @@ Usage: watson [OPTION]...
|
|
56
56
|
Running watson with no arguments will parse with settings in RC file
|
57
57
|
If no RC file exists, default RC file will be created
|
58
58
|
|
59
|
-
-c, --context-
|
60
|
-
-d, --dirs
|
61
|
-
-f, --files
|
62
|
-
|
63
|
-
-
|
64
|
-
-
|
65
|
-
-
|
66
|
-
-
|
67
|
-
-t, --tags
|
68
|
-
-u, --update
|
69
|
-
-v, --version
|
59
|
+
-c, --context-depth number of lines of context to provide with posted issue
|
60
|
+
-d, --dirs list of directories to search in
|
61
|
+
-f, --files list of files to search in
|
62
|
+
--format set output format for watson [print, json, unite, silent]
|
63
|
+
-h, --help print help
|
64
|
+
-i, --ignore list of files, directories, or types to ignore
|
65
|
+
-p, --parse-depth depth to recursively parse directories
|
66
|
+
-r, --remote list / create tokens for Bitbucket/GitHub
|
67
|
+
-t, --tags list of tags to search for
|
68
|
+
-u, --update update remote repos with current issues
|
69
|
+
-v, --version print watson version and info
|
70
70
|
|
71
71
|
Any number of files, tags, dirs, and ignores can be listed after flag
|
72
72
|
Ignored files should be space separated
|
@@ -96,6 +96,21 @@ This parameter specifies which files watson should parse through.
|
|
96
96
|
It should be followed by a space separated list of files that should be parsed.
|
97
97
|
|
98
98
|
|
99
|
+
### --format [PRINT, JSON, UNITE, SILENT]
|
100
|
+
This parameter specifies how watson should output the issues that it finds.
|
101
|
+
If passed with `print`, the regular printing will occur, either to Unix less or STDOUT (depending on system).
|
102
|
+
If passed with `json`, the output will be in the form of JSON, and will be stored in `.watsonresults`.
|
103
|
+
|
104
|
+
- This particular option is useful if attempting to intergrate watson into other tools / platforms.
|
105
|
+
|
106
|
+
If passed with `unite`, the output will be compatible with the vim unite plugin (more details soon)
|
107
|
+
|
108
|
+
If passed with `silent`, watson will have no output.
|
109
|
+
|
110
|
+
- This particular option is useful if remote posting to GitHub or Bitbucket is desired without the visual component of watson.
|
111
|
+
- For example, you could set up a **git commit hook** to post issues to GitHub/Bitbucket, but avoid the giant print out every time.
|
112
|
+
|
113
|
+
|
99
114
|
### -h, --help
|
100
115
|
This parameter displays the list of avaliable options for watson.
|
101
116
|
|
data/lib/watson/command.rb
CHANGED
@@ -180,13 +180,14 @@ module Watson
|
|
180
180
|
-c, --context-depth number of lines of context to provide with posted issue
|
181
181
|
-d, --dirs list of directories to search in
|
182
182
|
-f, --files list of files to search in
|
183
|
+
--format set output format for watson [print, json, unite, silent]
|
183
184
|
-h, --help print help
|
184
185
|
-i, --ignore list of files, directories, or types to ignore
|
185
186
|
-p, --parse-depth depth to recursively parse directories
|
186
187
|
-r, --remote list / create tokens for Bitbucket/GitHub
|
187
188
|
-t, --tags list of tags to search for
|
188
189
|
-u, --update update remote repos with current issues
|
189
|
-
-v, --version
|
190
|
+
-v, --version print watson version and info
|
190
191
|
|
191
192
|
Any number of files, tags, dirs, and ignores can be listed after flag
|
192
193
|
Ignored files should be space separated
|
@@ -495,6 +496,8 @@ module Watson
|
|
495
496
|
Watson::Formatters::JsonFormatter
|
496
497
|
when 'unite'
|
497
498
|
Watson::Formatters::UniteFormatter
|
499
|
+
when 'silent'
|
500
|
+
Watson::Formatters::SilentFormatter
|
498
501
|
else
|
499
502
|
Watson::Formatters::DefaultFormatter
|
500
503
|
end
|
data/lib/watson/formatters.rb
CHANGED
@@ -3,4 +3,5 @@ module Watson::Formatters
|
|
3
3
|
autoload :DefaultFormatter, 'watson/formatters/default_formatter'
|
4
4
|
autoload :JsonFormatter, 'watson/formatters/json_formatter'
|
5
5
|
autoload :UniteFormatter, 'watson/formatters/unite_formatter'
|
6
|
+
autoload :SilentFormatter, 'watson/formatters/silent_formatter'
|
6
7
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module Watson::Formatters
|
2
|
+
# [review] - All other formatters inherit from BaseFormatter
|
3
|
+
# but since the only thing silent does differently is not print
|
4
|
+
# the results, inheriting from DefaultFormatter simplifies things
|
5
|
+
# We don't have to worry about cprint/print_status/ect
|
6
|
+
class SilentFormatter < DefaultFormatter
|
7
|
+
def run(structure)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
File without changes
|
data/lib/watson/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watson-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nhmood
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- lib/watson/formatters/base_formatter.rb
|
78
78
|
- lib/watson/formatters/default_formatter.rb
|
79
79
|
- lib/watson/formatters/json_formatter.rb
|
80
|
+
- lib/watson/formatters/silent_formatter.rb
|
80
81
|
- lib/watson/formatters/unite_formatter.rb
|
81
82
|
- lib/watson/fs.rb
|
82
83
|
- lib/watson/github.rb
|