lino 1.8.0.pre.1 → 1.8.0.pre.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
  SHA256:
3
- metadata.gz: e9451d4d5a1cac65706c718503cc44813da8e4d3aa2397c0469c7d6474c96336
4
- data.tar.gz: 39aacdb97179f720a9bb440a3e79a9114ef3678428e2b3a7b4611bcf2cd999bf
3
+ metadata.gz: d080aeff7401e2706a8d09877bb45f3b4f607289f9a422fe6e7cb8ae56f64a0c
4
+ data.tar.gz: 9b2b787947844e9af983a1e6f5eda10beb5dc9e13068dde2eb889dca429c89aa
5
5
  SHA512:
6
- metadata.gz: a588ae04311413b5d1aeecc166977927f8c1761949b0ede6674b0ffad10b4fc61455c0cbedfe66d35ef126e507594138276da8c14154dde1c8e67c571855059e
7
- data.tar.gz: 172aa6befaf57bbecf308a02e0ea01bdf3f43421badbbd34337ca098d7975939d981ecfb6199127297a894107ef120a2556dd4f1c91988cf5957658f100a54f6
6
+ metadata.gz: '04596746b3bcee1f1d18ace01c68953cdac43070492f28bb262aee74b2ad21e8a8fdeb0ebb628ff7ebe1d61ac66ed4afa1e7aeb830556bd4175ac6206fd4f88b'
7
+ data.tar.gz: 496bf9bf680bb92c192670fb3a251fc2adeb80194baa558e3b4d76da6b9b366fa363111c0bfbe9137f851d638a85728f6b2f7bdfed05c5b27a926ee883b0e581
data/CODE_OF_CONDUCT.md CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
55
55
  ## Enforcement
56
56
 
57
57
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at tobyclemson@gmail.com. All
58
+ reported by contacting the project team at maintainers@infrablocks.io. All
59
59
  complaints will be reviewed and investigated and will result in a response that
60
60
  is deemed necessary and appropriate to the circumstances. The project team is
61
61
  obligated to maintain confidentiality with regard to the reporter of an incident.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lino (1.8.0.pre.1)
4
+ lino (1.8.0.pre.2)
5
5
  hamster (~> 3.0)
6
6
  open4 (~> 1.3)
7
7
 
data/README.md CHANGED
@@ -40,7 +40,8 @@ command_line.execute
40
40
 
41
41
  ### `Lino::CommandLineBuilder`
42
42
 
43
- The `CommandLineBuilder` allows a number of different styles of commands to be built:
43
+ The `CommandLineBuilder` allows a number of different styles of commands to be
44
+ built:
44
45
 
45
46
  ```ruby
46
47
  # commands with flags
@@ -61,7 +62,7 @@ Lino::CommandLineBuilder.for_command('gpg')
61
62
 
62
63
  # => gpg --recipient tobyclemson@gmail.com --sign ./doc.txt
63
64
 
64
- # commands with an option repeated multiple times (nil and empty option values are ignored)
65
+ # commands with an option repeated multiple times
65
66
  Lino::CommandLineBuilder.for_command('example.sh')
66
67
  .with_repeated_option('--opt', ['file1.txt', nil, '', 'file2.txt'])
67
68
  .build
@@ -78,7 +79,7 @@ Lino::CommandLineBuilder.for_command('diff')
78
79
 
79
80
  # => diff ./file1.txt ./file2.txt
80
81
 
81
- # commands with an array of arguments (nil and empty arguments are ignored)
82
+ # commands with an array of arguments
82
83
  Lino::CommandLineBuilder.for_command('diff')
83
84
  .with_arguments(['./file1.txt', nil, '', './file2.txt'])
84
85
  .build
@@ -147,7 +148,8 @@ command_line.execute
147
148
  # => <contents of / directory>
148
149
  ```
149
150
 
150
- By default, the standard input stream is empty and the process writes to the standard output and error streams.
151
+ By default, the standard input stream is empty and the process writes to the
152
+ standard output and error streams.
151
153
 
152
154
  To populate standard input:
153
155
 
@@ -155,7 +157,8 @@ To populate standard input:
155
157
  command_line.execute(stdin: 'something to be passed to standard input')
156
158
  ```
157
159
 
158
- The `stdin` option supports any object that responds to `each`, `read` or `to_s`.
160
+ The `stdin` option supports any object that responds to `each`, `read` or
161
+ `to_s`.
159
162
 
160
163
  To provide custom streams for standard output or standard error:
161
164
 
@@ -174,16 +177,29 @@ The `stdout` and `stderr` options support any object that responds to `<<`.
174
177
 
175
178
  ## Development
176
179
 
177
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
180
+ To install dependencies and run the build, run the pre-commit build:
178
181
 
179
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
182
+ ```shell script
183
+ ./go
184
+ ```
180
185
 
181
- ## Contributing
186
+ Tou can also run only the specs:
182
187
 
183
- Bug reports and pull requests are welcome on GitHub at https://github.com/tobyclemson/lino. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
188
+ ```shell script
189
+ ./go spec
190
+ ```
184
191
 
192
+ You can also run `bin/console` for an interactive prompt that will allow you to
193
+ experiment.
185
194
 
186
- ## License
195
+ ## Contributing
196
+
197
+ Bug reports and pull requests are welcome on GitHub at
198
+ https://github.com/infrablocks/lino. This project is intended to be a safe,
199
+ welcoming space for collaboration, and contributors are expected to adhere to
200
+ the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
187
201
 
188
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
202
+ ## License
189
203
 
204
+ The gem is available as open source under the terms of the
205
+ [MIT License](http://opensource.org/licenses/MIT).
@@ -2,12 +2,12 @@ require 'hamster'
2
2
  require_relative 'utilities'
3
3
  require_relative 'command_line'
4
4
  require_relative 'subcommand_builder'
5
- require_relative 'option_flag_mixin'
5
+ require_relative 'switches'
6
6
 
7
7
  module Lino
8
8
  class CommandLineBuilder
9
9
  include Lino::Utilities
10
- include Lino::OptionFlagMixin
10
+ include Lino::Switches
11
11
 
12
12
  class <<self
13
13
  def for_command(command)
@@ -1,11 +1,11 @@
1
1
  require 'hamster'
2
2
  require_relative 'utilities'
3
- require_relative 'option_flag_mixin'
3
+ require_relative 'switches'
4
4
 
5
5
  module Lino
6
6
  class SubcommandBuilder
7
7
  include Lino::Utilities
8
- include Lino::OptionFlagMixin
8
+ include Lino::Switches
9
9
 
10
10
  class <<self
11
11
  def for_subcommand(subcommand)
@@ -1,5 +1,5 @@
1
1
  module Lino
2
- module OptionFlagMixin
2
+ module Switches
3
3
  def with_option(switch, value, separator: nil, quoting: nil)
4
4
  with(switches: add_option(switch, value, separator, quoting))
5
5
  end
@@ -28,9 +28,5 @@ module Lino
28
28
  }
29
29
  )
30
30
  end
31
-
32
- def missing?(value)
33
- value.nil? || (value.respond_to?(:empty?) && value.empty?)
34
- end
35
31
  end
36
32
  end
@@ -25,5 +25,9 @@ module Lino
25
25
  components)
26
26
  end
27
27
  end
28
+
29
+ def missing?(value)
30
+ value.nil? || (value.respond_to?(:empty?) && value.empty?)
31
+ end
28
32
  end
29
33
  end
data/lib/lino/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lino
2
- VERSION = '1.8.0.pre.1'
2
+ VERSION = '1.8.0.pre.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lino
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0.pre.1
4
+ version: 1.8.0.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-27 00:00:00.000000000 Z
11
+ date: 2021-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hamster
@@ -182,8 +182,8 @@ files:
182
182
  - lib/lino.rb
183
183
  - lib/lino/command_line.rb
184
184
  - lib/lino/command_line_builder.rb
185
- - lib/lino/option_flag_mixin.rb
186
185
  - lib/lino/subcommand_builder.rb
186
+ - lib/lino/switches.rb
187
187
  - lib/lino/utilities.rb
188
188
  - lib/lino/version.rb
189
189
  homepage: https://github.com/infrablocks/lino