mister_bin 0.7.5 → 0.7.6

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: 913595208325759296ef5f3d504d5980d0c2f9083f5b25ef49eccdc4679231a4
4
- data.tar.gz: 147428144596b31f175e0e92495479c6eb0b49e73187e0de7b1daba2d477f2f5
3
+ metadata.gz: c0acb988ac9e4c15ffe3d81625b51b1e4a9bd6eefbeaa85ecb478b32e8be54c8
4
+ data.tar.gz: 8518da9a10b5ff5d9934d9045d4364ac5bfd0564be0f773a35830c985a444d40
5
5
  SHA512:
6
- metadata.gz: 5c39bd237a0930017599d9832bdaebd7396f2727500f486bfd56b8b743d89e89990f428cf258ddf8c7330ff190e6655b02d229cfe1da5ff003470431c7744b3d
7
- data.tar.gz: e1372df188c909c7e1a0d6e49513d63e64c4d07f98db07d0967eadca1c98b2f428726685d429739e1ab65ca5e3f7513bf99367e619151e395d7258967997eaed
6
+ metadata.gz: 7a49296fd401d5adaf920fdbac936ee5c9d59e1bea4fa7b06fec226c19ae64f9ca29bdd3fe460a2ef4eadc28666edbb3dd7f4f90f5348678e7b6911c59bddca2
7
+ data.tar.gz: 5079f114df50a5bd184f82255b3a2bfff8ab82701d5fb343cd91a8b597c65811d72930cf44edbd9954114248491ff2b88f87d67b0ac038131261ed84dbd5135b
data/README.md CHANGED
@@ -1,5 +1,4 @@
1
- Mister Bin
2
- ==================================================
1
+ # Mister Bin
3
2
 
4
3
  [![Gem Version](https://badge.fury.io/rb/mister_bin.svg)](https://badge.fury.io/rb/mister_bin)
5
4
  [![Build Status](https://github.com/DannyBen/mister_bin/workflows/Test/badge.svg)](https://github.com/DannyBen/mister_bin/actions?query=workflow%3ATest)
@@ -12,34 +11,11 @@ interfaces for your gem or other Ruby application.
12
11
 
13
12
  ---
14
13
 
15
- Contents
16
- --------------------------------------------------
17
-
18
- * [Installation](#installation)
19
- * [Feature Highlights](#feature-highlights)
20
- * [Examples](#examples)
21
- * [Usage](#usage)
22
- * [Creating the Main Executable](#creating-the-main-executable)
23
- * [Runner Options](#runner-options)
24
- * [Runner Routes](#runner-routes)
25
- * [Creating Commands](#creating-commands)
26
- * [Command DSL](#command-dsl)
27
- * [Interactive Terminal](#interactive-terminal)
28
- * [Terminal features](#terminal-features)
29
- * [Terminal options](#terminal-options)
30
- * [In the Wild](#in-the-wild)
31
-
32
-
33
-
34
- Installation
35
- --------------------------------------------------
14
+ ## Installation
36
15
 
37
16
  $ gem install mister_bin
38
17
 
39
-
40
-
41
- Feature Highlights
42
- --------------------------------------------------
18
+ ## Feature Highlights
43
19
 
44
20
  - Easy to use and minimalistic DSL for describing your command line actions.
45
21
  - Each command is defined with a separate class for maximum testability and
@@ -47,20 +23,17 @@ Feature Highlights
47
23
  - Commands can have subcommands.
48
24
  - Designed for gem developers.
49
25
 
26
+ ## Examples
50
27
 
28
+ This screencast shows the command line output of several Ruby gems that were
29
+ created with Mister Bin:
51
30
 
52
- Examples
53
- --------------------------------------------------
54
-
55
- ![Demo](https://raw.githubusercontent.com/DannyBen/mister_bin/master/demo/demo.gif)
31
+ ![Demo](support/demo/cast.gif)
56
32
 
57
33
  - See the [examples](/examples) folder for several example use cases.
58
34
  - For real world examples, see the [In the Wild](#in-the-wild) section.
59
35
 
60
-
61
-
62
- Usage
63
- --------------------------------------------------
36
+ ## Usage
64
37
 
65
38
  Creating a command line utility with Mister Bin involves at least two files:
66
39
 
@@ -75,10 +48,7 @@ input, and if it finds one and one only, it will execute it. For example,
75
48
  if you have a `server` command, you can execute it with `yourapp s` if it
76
49
  is the only command that starts with an `s`.
77
50
 
78
-
79
-
80
- Creating the Main Executable
81
- --------------------------------------------------
51
+ ## Creating the Main Executable
82
52
 
83
53
  The main executable is usually simple and only serves to initialize Mister
84
54
  Bin with options.
@@ -166,10 +136,7 @@ runner = MisterBin::Runner.new
166
136
  runner.route_all to: GlobalCommand
167
137
  ```
168
138
 
169
-
170
-
171
- Creating Commands
172
- --------------------------------------------------
139
+ ## Creating Commands
173
140
 
174
141
  Create command classes by inheriting from `MisterBin::Command`, for example:
175
142
 
@@ -240,14 +207,12 @@ example "app ls"
240
207
  example "app ls --all"
241
208
  ```
242
209
 
210
+ ## Interactive Terminal
243
211
 
244
-
245
- Interactive Terminal
246
- --------------------------------------------------
247
212
  Mister Bin comes with an interactive terminal that allows you to set up a
248
213
  console that sends all commands to your runner.
249
214
 
250
- ![Demo](https://raw.githubusercontent.com/DannyBen/mister_bin/master/demo/terminal.gif)
215
+ ![Demo](support/demo/terminal.gif)
251
216
 
252
217
  See the [terminal example](/examples/06-terminal) folder.
253
218
 
@@ -340,8 +305,7 @@ If true, commands that start with `/` will *not* be delegated to the stsrem.
340
305
  Default: `false`.
341
306
 
342
307
 
343
- In the Wild
344
- --------------------------------------------------
308
+ ## In the Wild
345
309
 
346
310
  Several examples of real world use of Mister Bin in the wild (well,
347
311
  "In the Back Yard" really...).
@@ -351,16 +315,18 @@ Several examples of real world use of Mister Bin in the wild (well,
351
315
  - [Jobly] - Compact job server with API, CLI and Web UI
352
316
  - [Kojo] - Command line utility for generating config files from templates and definition files
353
317
  - [Madman] - The Markdown Swiss Army Knife
318
+ - [Madness] - Instant Markdown Server
354
319
  - [Slacktail] - Command line utility for following your Slack chat from the terminal
355
320
  - [Site Link Analyzer] - Command line utility for finding broken links in a site
356
321
 
357
322
 
358
- [docopt]: http://docopt.org/
359
- [Kojo]: https://github.com/DannyBen/kojo
360
- [Madman]: https://github.com/DannyBen/madman
361
323
  [AudioAddict]: https://github.com/DannyBen/audio_addict
324
+ [Bashly]: https://github.com/DannyBen/bashly
362
325
  [Colsole]: https://github.com/dannyben/colsole
326
+ [docopt]: http://docopt.org/
363
327
  [Jobly]: https://github.com/dannyben/jobly
364
- [Slacktail]: https://github.com/dannyben/slacktail
328
+ [Kojo]: https://github.com/DannyBen/kojo
329
+ [Madman]: https://github.com/DannyBen/madman
330
+ [Madness]: https://github.com/DannyBen/madness
365
331
  [Site Link Analyzer]: https://github.com/dannyben/sla
366
- [Bashly]: https://github.com/DannyBen/bashly
332
+ [Slacktail]: https://github.com/dannyben/slacktail
@@ -18,7 +18,7 @@ module MisterBin
18
18
  exitcode.is_a?(Numeric) ? exitcode : 0
19
19
  rescue DocoptNG::Exit => e
20
20
  puts e.message
21
- 1
21
+ e.exit_code
22
22
  end
23
23
 
24
24
  class << self
@@ -30,8 +30,7 @@ module MisterBin
30
30
  elsif (argv == ['--help']) || (argv == ['-h'])
31
31
  show_help
32
32
  elsif version && ((argv == ['--version']) || (argv == ['-v']))
33
- puts version
34
- 1
33
+ show_version
35
34
  else
36
35
  execute argv
37
36
  end
@@ -60,6 +59,11 @@ module MisterBin
60
59
  argv
61
60
  end
62
61
 
62
+ def show_version
63
+ puts version
64
+ 0
65
+ end
66
+
63
67
  def show_subs
64
68
  if commands.empty?
65
69
  say 'No subcommands found'
@@ -89,11 +93,11 @@ module MisterBin
89
93
  def show_help
90
94
  if commands.empty?
91
95
  say 'No subcommands found'
96
+ 1
92
97
  else
93
98
  show_help!
99
+ 0
94
100
  end
95
-
96
- 1
97
101
  end
98
102
 
99
103
  def show_help!
@@ -1,3 +1,3 @@
1
1
  module MisterBin
2
- VERSION = '0.7.5'
2
+ VERSION = '0.7.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mister_bin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-10 00:00:00.000000000 Z
11
+ date: 2023-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole
@@ -37,6 +37,9 @@ dependencies:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0.7'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 0.7.1
40
43
  type: :runtime
41
44
  prerelease: false
42
45
  version_requirements: !ruby/object:Gem::Requirement
@@ -44,6 +47,9 @@ dependencies:
44
47
  - - "~>"
45
48
  - !ruby/object:Gem::Version
46
49
  version: '0.7'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 0.7.1
47
53
  description: Easily add command line interface to your gems
48
54
  email: db@dannyben.com
49
55
  executables: []
@@ -77,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
83
  - !ruby/object:Gem::Version
78
84
  version: '0'
79
85
  requirements: []
80
- rubygems_version: 3.4.6
86
+ rubygems_version: 3.4.7
81
87
  signing_key:
82
88
  specification_version: 4
83
89
  summary: Command line interface for your gems