toys 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,32 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2018 Daniel Azuma
3
+ # Copyright 2019 Daniel Azuma
4
4
  #
5
- # All rights reserved.
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
6
11
  #
7
- # Redistribution and use in source and binary forms, with or without
8
- # modification, are permitted provided that the following conditions are met:
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
9
14
  #
10
- # * Redistributions of source code must retain the above copyright notice,
11
- # this list of conditions and the following disclaimer.
12
- # * Redistributions in binary form must reproduce the above copyright notice,
13
- # this list of conditions and the following disclaimer in the documentation
14
- # and/or other materials provided with the distribution.
15
- # * Neither the name of the copyright holder, nor the names of any other
16
- # contributors to this software, may be used to endorse or promote products
17
- # derived from this software without specific prior written permission.
18
- #
19
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
- # POSSIBILITY OF SUCH DAMAGE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21
+ # IN THE SOFTWARE.
30
22
  ;
31
23
 
32
24
  module Toys
@@ -52,13 +44,13 @@ module Toys
52
44
  ##
53
45
  # Create the template settings for the Rubocop template.
54
46
  #
55
- # @param [String] name Name of the tool to create. Defaults to
47
+ # @param name [String] Name of the tool to create. Defaults to
56
48
  # {DEFAULT_TOOL_NAME}.
57
- # @param [String,Array<String>] gem_version Version requirements for
49
+ # @param gem_version [String,Array<String>] Version requirements for
58
50
  # the rubocop gem. Defaults to {DEFAULT_GEM_VERSION_REQUIREMENTS}.
59
- # @param [Boolean] fail_on_error If true, exits with a nonzero code if
51
+ # @param fail_on_error [Boolean] If true, exits with a nonzero code if
60
52
  # Rubocop fails. Defaults to true.
61
- # @param [Array<String>] options Additional options passed to the Rubocop
53
+ # @param options [Array<String>] Additional options passed to the Rubocop
62
54
  # CLI.
63
55
  #
64
56
  def initialize(name: DEFAULT_TOOL_NAME,
@@ -76,7 +68,7 @@ module Toys
76
68
  attr_accessor :fail_on_error
77
69
  attr_accessor :options
78
70
 
79
- to_expand do |template|
71
+ on_expand do |template|
80
72
  tool(template.name) do
81
73
  desc "Run rubocop on the current project."
82
74
 
@@ -1,32 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2018 Daniel Azuma
3
+ # Copyright 2019 Daniel Azuma
4
4
  #
5
- # All rights reserved.
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
6
11
  #
7
- # Redistribution and use in source and binary forms, with or without
8
- # modification, are permitted provided that the following conditions are met:
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
9
14
  #
10
- # * Redistributions of source code must retain the above copyright notice,
11
- # this list of conditions and the following disclaimer.
12
- # * Redistributions in binary form must reproduce the above copyright notice,
13
- # this list of conditions and the following disclaimer in the documentation
14
- # and/or other materials provided with the distribution.
15
- # * Neither the name of the copyright holder, nor the names of any other
16
- # contributors to this software, may be used to endorse or promote products
17
- # derived from this software without specific prior written permission.
18
- #
19
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
- # POSSIBILITY OF SUCH DAMAGE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21
+ # IN THE SOFTWARE.
30
22
  ;
31
23
 
32
24
  module Toys
@@ -52,41 +44,41 @@ module Toys
52
44
  ##
53
45
  # Create the template settings for the Yardoc template.
54
46
  #
55
- # @param [String] name Name of the tool to create. Defaults to
47
+ # @param name [String] Name of the tool to create. Defaults to
56
48
  # {DEFAULT_TOOL_NAME}.
57
- # @param [String,Array<String>] gem_version Version requirements for
49
+ # @param gem_version [String,Array<String>] Version requirements for
58
50
  # the yard gem. Defaults to {DEFAULT_GEM_VERSION_REQUIREMENTS}.
59
- # @param [Array<String>] files An array of globs indicating the files
51
+ # @param files [Array<String>] An array of globs indicating the files
60
52
  # to document.
61
- # @param [Boolean] generate_output Whether to generate output. Setting to
53
+ # @param generate_output [Boolean] Whether to generate output. Setting to
62
54
  # false causes yardoc to emit warnings/errors but not generate html.
63
55
  # Defaults to true.
64
- # @param [Boolean] generate_output_flag Whether to create a flag
56
+ # @param generate_output_flag [Boolean] Whether to create a flag
65
57
  # `--[no-]output` that can control whether output is generated.
66
58
  # Defaults to false.
67
- # @param [String,nil] output_dir Output directory. Defaults to "doc".
68
- # @param [Boolean] fail_on_warning Whether the tool should return a
59
+ # @param output_dir [String,nil] Output directory. Defaults to "doc".
60
+ # @param fail_on_warning [Boolean] Whether the tool should return a
69
61
  # nonzero error code if any warnings happen. Defaults to false.
70
- # @param [Boolean] fail_on_undocumented_objects Whether the tool should
62
+ # @param fail_on_undocumented_objects [Boolean] Whether the tool should
71
63
  # return a nonzero error code if any objects remain undocumented.
72
64
  # Defaults to false.
73
- # @param [Boolean] show_public Show public methods. Defaults to true.
74
- # @param [Boolean] show_protected Show protected methods. Defaults to
65
+ # @param show_public [Boolean] Show public methods. Defaults to true.
66
+ # @param show_protected [Boolean] Show protected methods. Defaults to
75
67
  # false.
76
- # @param [Boolean] show_private Show private methods. Defaults to false.
77
- # @param [Boolean] hide_private_tag Hide methods with the `@private` tag.
68
+ # @param show_private [Boolean] Show private methods. Defaults to false.
69
+ # @param hide_private_tag [Boolean] Hide methods with the `@private` tag.
78
70
  # Defaults to false.
79
- # @param [String,nil] readme Name of the readme file used as the title
71
+ # @param readme [String,nil] Name of the readme file used as the title
80
72
  # page, or `nil` to use the default.
81
- # @param [String,nil] markup Markup style used in documentation. Defaults
73
+ # @param markup [String,nil] Markup style used in documentation. Defaults
82
74
  # to "rdoc".
83
- # @param [String,nil] template Template to use. Defaults to "default".
84
- # @param [String,nil] template_path The optional template path to look
75
+ # @param template [String,nil] Template to use. Defaults to "default".
76
+ # @param template_path [String,nil] The optional template path to look
85
77
  # for templates in.
86
- # @param [String,nil] format The output format for the template. Defaults
78
+ # @param format [String,nil] The output format for the template. Defaults
87
79
  # to "html".
88
- # @param [Array<String>] options Additional options passed to YARD
89
- # @param [Array<String>] stats_options Additional options passed to YARD
80
+ # @param options [Array<String>] Additional options passed to YARD
81
+ # @param stats_options [Array<String>] Additional options passed to YARD
90
82
  # stats
91
83
  #
92
84
  def initialize(name: nil,
@@ -149,7 +141,7 @@ module Toys
149
141
  attr_accessor :options
150
142
  attr_accessor :stats_options
151
143
 
152
- to_expand do |template|
144
+ on_expand do |template|
153
145
  tool(template.name) do
154
146
  desc "Run yardoc on the current project."
155
147
 
@@ -1,38 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright 2018 Daniel Azuma
3
+ # Copyright 2019 Daniel Azuma
4
4
  #
5
- # All rights reserved.
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
6
11
  #
7
- # Redistribution and use in source and binary forms, with or without
8
- # modification, are permitted provided that the following conditions are met:
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
9
14
  #
10
- # * Redistributions of source code must retain the above copyright notice,
11
- # this list of conditions and the following disclaimer.
12
- # * Redistributions in binary form must reproduce the above copyright notice,
13
- # this list of conditions and the following disclaimer in the documentation
14
- # and/or other materials provided with the distribution.
15
- # * Neither the name of the copyright holder, nor the names of any other
16
- # contributors to this software, may be used to endorse or promote products
17
- # derived from this software without specific prior written permission.
18
- #
19
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
- # POSSIBILITY OF SUCH DAMAGE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21
+ # IN THE SOFTWARE.
30
22
  ;
31
23
 
32
24
  module Toys
33
25
  ##
34
- # Current version of the Toys command line binary
26
+ # Current version of the Toys command line executable.
35
27
  # @return [String]
36
28
  #
37
- VERSION = "0.7.0"
29
+ VERSION = "0.8.0"
38
30
  end
@@ -0,0 +1,26 @@
1
+ # Copyright 2019 Daniel Azuma
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
+ # IN THE SOFTWARE.
20
+
21
+ if [[ $# -eq 0 ]]; then
22
+ set -- "toys"
23
+ fi
24
+ for arg in "$@"; do
25
+ complete -r "$arg"
26
+ done
@@ -0,0 +1,26 @@
1
+ # Copyright 2019 Daniel Azuma
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
+ # IN THE SOFTWARE.
20
+
21
+ if [[ $# -eq 0 ]]; then
22
+ set -- "toys"
23
+ fi
24
+ for arg in "$@"; do
25
+ complete -C "toys system bash-completion eval" -o nospace "$arg"
26
+ done
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toys
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Azuma
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-24 00:00:00.000000000 Z
11
+ date: 2019-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toys-core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.0
19
+ version: 0.8.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.7.0
26
+ version: 0.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: highline
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -128,34 +128,34 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.62.0
131
+ version: 0.71.0
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 0.62.0
138
+ version: 0.71.0
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: yard
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 0.9.16
145
+ version: 0.9.19
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 0.9.16
152
+ version: 0.9.19
153
153
  description: Toys is a configurable command line tool. Write commands in config files
154
- using a simple DSL, and Toys will provide the command line binary and take care
154
+ using a simple DSL, and Toys will provide the command line executable and take care
155
155
  of all the details such as argument parsing, online help, and error reporting. Toys
156
156
  is designed for software developers, IT professionals, and other power users who
157
157
  want to write and organize scripts to automate their workflows. It can also be used
158
- as a Rake replacement, providing a more natural command line interface for your
158
+ as a replacement for Rake, providing a more natural command line interface for your
159
159
  project's build tasks.
160
160
  email:
161
161
  - dazuma@gmail.com
@@ -183,9 +183,11 @@ files:
183
183
  - lib/toys/templates/rubocop.rb
184
184
  - lib/toys/templates/yardoc.rb
185
185
  - lib/toys/version.rb
186
+ - share/bash-completion-remove.sh
187
+ - share/bash-completion.sh
186
188
  homepage: https://github.com/dazuma/toys
187
189
  licenses:
188
- - BSD-3-Clause
190
+ - MIT
189
191
  metadata:
190
192
  changelog_uri: https://github.com/dazuma/toys/blob/master/toys/CHANGELOG.md
191
193
  source_code_uri: https://github.com/dazuma/toys
@@ -206,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
208
  - !ruby/object:Gem::Version
207
209
  version: '0'
208
210
  requirements: []
209
- rubygems_version: 3.0.2
211
+ rubygems_version: 3.0.3
210
212
  signing_key:
211
213
  specification_version: 4
212
214
  summary: A configurable command line tool