redis_vars 0.7.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,6 @@ require "thor"
4
4
 
5
5
  module RedisVars
6
6
  class CLI < Thor
7
- default_task :list
8
7
 
9
8
  desc "add KEY VALUE", "Add a new env var"
10
9
  def add(key, value)
@@ -29,6 +28,12 @@ module RedisVars
29
28
  desc "exec", "Runs a command with the stored env vars"
30
29
  def exec(*args)
31
30
  Kernel.exec(store.hash, *args)
31
+ rescue Errno::EACCES
32
+ puts "Not executable: #{args.first}"
33
+ rescue Errno::ENOENT => error
34
+ puts error
35
+ rescue ArgumentError
36
+ puts "redis_vars exec needs a command to run"
32
37
  end
33
38
 
34
39
  desc "version", "Displays gem version"
@@ -42,5 +47,14 @@ module RedisVars
42
47
  @store ||= Store.new
43
48
  end
44
49
 
50
+ def method_missing(*args)
51
+ if args
52
+ args[0] = args[0].to_s
53
+ exec(*args)
54
+ else
55
+ help
56
+ end
57
+ end
58
+
45
59
  end
46
60
  end
@@ -1,3 +1,3 @@
1
1
  module RedisVars
2
- VERSION = "0.7.2"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_vars
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: