command-genie 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/bin/genie +6 -1
  4. data/lib/genie/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0546ddff04d136028adca457a022276d4f0076ba
4
- data.tar.gz: fbf8c7e0a2780147a40cd578ed67bcc91843667c
3
+ metadata.gz: 681b37592c3b1cb07922cac13494386a19c9a00f
4
+ data.tar.gz: 3817bf8649f305a0e3ebb94e14b2eaa8e5670b8d
5
5
  SHA512:
6
- metadata.gz: bc8564626cbf7bb8eff91ccd8ee43f20efebd594a8173d736901846e8ba35b5617f34ecead7c5db966aa94417a91e400a66a48e9d44b04d6780b86dc9af79e40
7
- data.tar.gz: 22fd90d58254a9e02e3a551e696f8c097774cfb3f4b0d70639b836ea2faf4a3f3e3b131ed34394f6172bd7dce25048428dbe30e4b800a69675b4e6434e3f7491
6
+ metadata.gz: 39e4beba0eb48b4185d112eb2648b5108a4c233a342ebaa5d6fd27e224bb48ab0e89d390d5b45c229fc6c87232b1b957d45eff89ee6f7474ff47c1cd5ef8b3f1
7
+ data.tar.gz: 9524f5e9e081b39c4b4f25199730949cd44bf61c6db4fff00855b8c74da58a6461b43bf41a9edf74b8a4d0378335ee2af9edfca2dacad8142633369958cd4ba3
data/README.md CHANGED
@@ -6,6 +6,9 @@ A good example is when pushing code, we might run `git push origin master` for o
6
6
 
7
7
  `genie` lets you create commands that are bound to directories. In our example, we can create a `push` command that, depending on which directory we run it in, invoke the correct push command.
8
8
 
9
+ [![Gem Version](https://badge.fury.io/rb/command-genie.svg)](https://badge.fury.io/rb/command-genie)
10
+ ![License](https://img.shields.io/github/license/hboon/boom.svg)
11
+
9
12
  Usage
10
13
  ---
11
14
  Here's how to create a command with `genie`:
data/bin/genie CHANGED
@@ -66,6 +66,7 @@ TICK_CHAR = "\u2713"
66
66
 
67
67
  program :version, CommandGenie::VERSION
68
68
  program :description, HELP_STRING
69
+ program :help, 'Author', 'Hwee-Boon Yar <hboon@motionobj.com>'
69
70
 
70
71
  script_name = File.basename($PROGRAM_NAME)
71
72
 
@@ -141,6 +142,10 @@ if script_name == APP_NAME
141
142
  say_error "Specify the name of the new command you want to create:
142
143
 
143
144
  #{APP_NAME} create <command>
145
+
146
+ or for help:
147
+
148
+ #{APP_NAME} --help
144
149
  " and abort if args.nil? || args.empty?
145
150
  new_cmd = args[0]
146
151
  say_error "I don't think you want to do that." and abort if new_cmd == APP_NAME
@@ -155,7 +160,7 @@ if script_name == APP_NAME
155
160
  end
156
161
 
157
162
  def dir_matching(dirs, dir)
158
- found = dirs.find {|e|e == dir || File.expand_path(e) == dir}
163
+ found = dirs.find {|e| e == dir || File.realpath(File.expand_path(e)) == dir }
159
164
  if found
160
165
  found
161
166
  else
@@ -1,3 +1,3 @@
1
1
  module CommandGenie
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: command-genie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hwee-Boon Yar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-12 00:00:00.000000000 Z
11
+ date: 2016-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander