command-genie 0.3.0 → 0.3.1

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/CHANGELOG.md +28 -0
  3. data/bin/genie +12 -13
  4. data/lib/genie/version.rb +1 -1
  5. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 681b37592c3b1cb07922cac13494386a19c9a00f
4
- data.tar.gz: 3817bf8649f305a0e3ebb94e14b2eaa8e5670b8d
3
+ metadata.gz: 887abe84b73683ded814fa9fdcc69da78a2565b8
4
+ data.tar.gz: 64fe9e554016bd5725986cfdf842da7e5f96b322
5
5
  SHA512:
6
- metadata.gz: 39e4beba0eb48b4185d112eb2648b5108a4c233a342ebaa5d6fd27e224bb48ab0e89d390d5b45c229fc6c87232b1b957d45eff89ee6f7474ff47c1cd5ef8b3f1
7
- data.tar.gz: 9524f5e9e081b39c4b4f25199730949cd44bf61c6db4fff00855b8c74da58a6461b43bf41a9edf74b8a4d0378335ee2af9edfca2dacad8142633369958cd4ba3
6
+ metadata.gz: 1b3bccc48d6f7003547e6bbaed06943b1c3bfddec2d53c5a4e132c4b4ca99e3d2e657fc54414f618db6aaa9263394c8cf443e6afe9ed7cbd3ff2b9a7ecbca385
7
+ data.tar.gz: 513a2bf152d5cac7b33cb80df9927e636b2b306e902167f8c6ac2b6579a64d6634e906c55fe9c751ed6477740dbd37117aa686df52b4e5192c55bddd34713b01
data/CHANGELOG.md ADDED
@@ -0,0 +1,28 @@
1
+ genie Changelog
2
+ ===
3
+
4
+ v0.3.0
5
+ ---
6
+ * Match softlinks correctly
7
+ * Add license badge and fix gem version badge link
8
+ * Add gem version badge to README
9
+ * Improve instructions when only `genie` is typed
10
+ * Add author name
11
+
12
+ v0.2.1, v0.2.0
13
+ ---
14
+ * Sample YAML should start with ---
15
+ * Add command `edit` to edit the configuration file
16
+ * Fix: error when command not found for current directory
17
+
18
+ v0.1.1, v0.1.0
19
+ ---
20
+ * Fix: error when command not found for current directory
21
+ * Refactor
22
+ * Add command `show` that previews the command to run
23
+ * Fix: don't repeat version number
24
+
25
+ v0.0.2, v0.0.1
26
+ ---
27
+ * Fix: command/softlink doesn't work when genie is installed with `gem install`
28
+ * Initial release
data/bin/genie CHANGED
@@ -61,6 +61,9 @@ subdirectories):
61
61
  Either way, update the configuration file at
62
62
  `~/.config/#{APP_NAME}/<command>.yml` with the commands for each
63
63
  directory.
64
+
65
+ You can run `<command> edit` (e.g. `push edit`) to edit the command's configuration file in the default editor.
66
+ ---
64
67
  "
65
68
  TICK_CHAR = "\u2713"
66
69
 
@@ -83,15 +86,11 @@ end
83
86
  if script_name != APP_NAME
84
87
  cmd_config_path = config_path(script_name)
85
88
  command :run do |c|
86
- c.syntax = "#{script_name}"
89
+ c.syntax = "#{script_name} [run]"
87
90
  c.summary = "Run a command from #{cmd_config_path} that matches the current directory"
88
91
  c.description = "Run a command from #{cmd_config_path} that matches the current directory"
89
- c.example 'Run command', "$ #{script_name}"
92
+ c.example 'Run command', c.syntax
90
93
  c.action do |args, options|
91
- say_error "Specify the name of the new command you want to create:
92
-
93
- #{APP_NAME} create <command>
94
- " and abort if script_name == APP_NAME
95
94
  with_command(script_name) do |cmd|
96
95
  if cmd && !cmd.empty?
97
96
  say "Running: #{cmd}"
@@ -103,10 +102,10 @@ if script_name != APP_NAME
103
102
  end
104
103
  end
105
104
  command :show do |c|
106
- c.syntax = "#{script_name}"
105
+ c.syntax = "#{script_name} show"
107
106
  c.summary = "Show the command to run, from #{cmd_config_path} that matches the current directory"
108
107
  c.description = c.summary
109
- c.example 'Show command', "$ #{script_name}"
108
+ c.example 'Show command', c.syntax
110
109
  c.action do |args, options|
111
110
  with_command(script_name) do |cmd|
112
111
  if cmd && !cmd.empty?
@@ -118,10 +117,10 @@ if script_name != APP_NAME
118
117
  end
119
118
  end
120
119
  command :edit do |c|
121
- c.syntax = "#{script_name}"
120
+ c.syntax = "#{script_name} edit"
122
121
  c.summary = "Edit the command's configuration file #{cmd_config_path}"
123
122
  c.description = c.summary
124
- c.example 'Edit command configuration file for ', "$ #{script_name}"
123
+ c.example 'Edit command configuration file for ', c.syntax
125
124
  c.action do |args, options|
126
125
  if File.file? cmd_config_path
127
126
  `open #{cmd_config_path}`
@@ -134,14 +133,14 @@ end
134
133
 
135
134
  if script_name == APP_NAME
136
135
  command :create do |c|
137
- c.syntax = "#{script_name}"
136
+ c.syntax = "#{APP_NAME} create <command>"
138
137
  c.summary = "Create a command"
139
138
  c.description = "Create a command"
140
- c.example 'Create command', "$ #{APP_NAME} create <command>"
139
+ c.example 'Create command', c.syntax
141
140
  c.action do |args, options|
142
141
  say_error "Specify the name of the new command you want to create:
143
142
 
144
- #{APP_NAME} create <command>
143
+ #{c.syntax}
145
144
 
146
145
  or for help:
147
146
 
data/lib/genie/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CommandGenie
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
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.3.0
4
+ version: 0.3.1
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-28 00:00:00.000000000 Z
11
+ date: 2016-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -32,6 +32,7 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - ".gitignore"
35
+ - CHANGELOG.md
35
36
  - LICENSE
36
37
  - README.md
37
38
  - bin/genie