ezbash 0.5.4 → 0.5.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/ezbash +19 -27
  3. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c66ee05e1782e50715f28c01b604031f672f56b0
4
- data.tar.gz: 30b92ba5ebd827a3a3f847783b51837e6d68da18
3
+ metadata.gz: 9098fd668f7d37a4621bc4cd46b549b4f184ba83
4
+ data.tar.gz: 51bdd9ddf9f86ab84b9505ed39f1f93165c55fa8
5
5
  SHA512:
6
- metadata.gz: c128d6d65c6e62ad0d244d3af33b5361f11c4e0e266cfc61c05da7d5c26029532ae226db74e1889461864d2ce7ef1c59fdb488e180f19fbea50c9ce9f2ccfab4
7
- data.tar.gz: 4accadf689f006285d6b41d4863adb22177ae194c3a6379ba946ecab2cd83f849d5b33d3e959e7a8f879106b924fe72f84cd9a9e445cc699c13a92cc5f076193
6
+ metadata.gz: 4752ef2f7ef6bf90f9b45318e053e7847285cf7c86c6436839270392e17f67304f7ab95da581a19167466191f610f7eb2385b5a1210770c731f98d8c55c79522
7
+ data.tar.gz: f1e81233ffb85191b18ac02e1aa7a82c2d833425ed858eef11ae8c420302dad165ccf9ae52ed38b74114af8c0772f27edda6e71ea4080bcdc7aca26a62014ef8
data/bin/ezbash CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ require "pretty_table"
2
3
 
3
4
  #Define methods
4
5
  def addbrew()
@@ -12,7 +13,7 @@ def addbrew()
12
13
  Kernel.system "ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'"
13
14
  userselect = true
14
15
  elsif userreply == 'no'
15
- puts 'That\'s fine! Just keep in mind, the install, uninstall, and search commands won\'t work for you.'
16
+ puts "That\'s fine! Just keep in mind, the install, uninstall, and search commands won\'t work for you."
16
17
  userselect = true
17
18
  else
18
19
  puts 'Please say yes or no.'
@@ -268,34 +269,25 @@ while exitis == 0 do
268
269
  program = gets.chomp
269
270
  Kernel.system "#{folder}./#{program}"
270
271
  when 'help'
271
- puts "\t install: install new programs or 'packages' on your system"
272
- puts "\r"
273
- puts "\t uninstall: remove programs or 'packages' from your system"
274
- puts "\r"
275
- puts "\t search: search for a program that can be installed with the aforementioned 'install' command"
276
- puts "\r"
277
- puts "\t copy: copies a file or folder to another place"
278
- puts "\r"
279
- puts "\t rename: renames a file on your computer"
280
- puts "\r"
281
- puts "\t delete file: deletes a file on your compter"
282
- puts "\r"
283
- puts "\t delete folder: deletes a folder on your computer (type yes at every promt)."
284
- puts "\r"
285
- puts "\t create file: creates an empty text file on your computer (.rb, .py, .java, etc. count as text files)"
286
- puts "\r"
287
- puts "\t change working folder: change the folder you\'ll be working in (e.g. Documents)"
288
- puts "\r"
289
- puts "\t list files: list all of the files in a given folder (e.g. Downloads)"
290
- puts "\r"
272
+ headers = [ 'Command', 'Action']
273
+ commands = [
274
+ ["install", "install new programs or 'packages' on your system"],
275
+ ["uninstall", "remove programs or 'packages' from your system"],
276
+ ["search", "search for a program that can be installed with the aforementioned 'install' command"],
277
+ ["copy", "copies a file or folder to another place"],
278
+ ["rename", "renames a file on your computer"],
279
+ ["delete file", "deletes a file on your compter"],
280
+ ["delete folder", "deletes a folder on your computer (type yes at every promt)."],
281
+ ["create file", "creates an empty text file on your computer (.rb, .py, .java, etc. count as text files)"],
282
+ ["change working folder", "change the folder you\'ll be working in (e.g. Documents)"],
283
+ ["list files", "list all of the files in a given folder (e.g. Downloads)"],
284
+ ["compile", "compiles a c++ file (e.g. foo.cpp)"],
285
+ ["run c++ program", "runs a c++ program compiled with the aforementioned command"],
286
+ ["exit", "exits ezbash"] ]
291
287
  # puts "\t edit file: edits a text file in a bare-bones, quick editor (.rb, .html, .java, etc. count as text files)"
292
288
  # puts "\r"
293
- puts "\t compile: compiles a c++ file (e.g. foo.cpp)"
294
- puts "\r"
295
- puts "\t run c++ program: runs a c++ program compiled with the aforementioned command"
296
- puts "\r"
297
- puts "\t exit: exits ezbash"
298
- puts "\r"
289
+ puts PrettyTable.new(commands, headers).to_s
290
+ puts "\r"
299
291
  when 'exit'
300
292
  abort
301
293
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ezbash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logan Saunders
@@ -9,7 +9,21 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2015-02-17 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pretty_table
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  description: Users are thrown into a simplified shell with only a 'help' command as
14
28
  a guide.
15
29
  email: timandmoby@gmail.com