redis_vars 0.7.0 → 0.7.1
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.
- data/README.md +7 -3
- data/lib/redis_vars/cli.rb +3 -3
- data/lib/redis_vars/store.rb +1 -1
- data/lib/redis_vars/version.rb +1 -1
- data/man/redis_vars.1 +3 -3
- metadata +2 -2
data/README.md
CHANGED
@@ -46,13 +46,13 @@ Pow:
|
|
46
46
|
|
47
47
|
### On Execution
|
48
48
|
|
49
|
-
As of version 0.7.
|
49
|
+
As of version 0.7.x there is an exec command to run a command with the environment variables you have in the store.
|
50
50
|
|
51
51
|
Here is an example:
|
52
52
|
|
53
|
-
redis_vars
|
53
|
+
redis_vars exec unicorn_rails
|
54
54
|
|
55
|
-
If you had a single variable store of DEFAULT_USER with a value of daniel then it
|
55
|
+
If you had a single variable store of DEFAULT_USER with a value of daniel then it will execute the following:
|
56
56
|
|
57
57
|
DEFAULT_USER=daniel unicorn_rails
|
58
58
|
|
@@ -74,6 +74,10 @@ config/environments/development.rb:
|
|
74
74
|
|
75
75
|
Note that if you env vars are already set it will not overwrite them. This allows you to do this method in combination with using the non-invasive method to override what is stored in redis.
|
76
76
|
|
77
|
+
## Inspiration
|
78
|
+
|
79
|
+
I took a lot of inspiration from [redis-env](https://github.com/brynary/redis-env), but wanted something in a language I knew and that would hit my different use cases(export, load in code, etc).
|
80
|
+
|
77
81
|
## Authors
|
78
82
|
|
79
83
|
#### Created and maintained by
|
data/lib/redis_vars/cli.rb
CHANGED
@@ -25,9 +25,9 @@ module RedisVars
|
|
25
25
|
puts store.export
|
26
26
|
end
|
27
27
|
|
28
|
-
desc "
|
29
|
-
def
|
30
|
-
exec "/bin/sh -c '#{store.
|
28
|
+
desc "exec", "Runs a command with the stored env vars"
|
29
|
+
def exec(*commands)
|
30
|
+
Kernel.exec "/bin/sh -c '#{store.exec} #{commands.join(' ')}'"
|
31
31
|
end
|
32
32
|
|
33
33
|
desc "version", "Displays gem version"
|
data/lib/redis_vars/store.rb
CHANGED
data/lib/redis_vars/version.rb
CHANGED
data/man/redis_vars.1
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
\fBredis_vars export\fR
|
20
20
|
.
|
21
21
|
.br
|
22
|
-
\fBredis_vars
|
22
|
+
\fBredis_vars exec <command>\fR
|
23
23
|
.
|
24
24
|
.SH "DESCRIPTION"
|
25
25
|
RedisVars is a way to manage environment variables for a development team\.
|
@@ -43,7 +43,7 @@ It requires passing in a key\.
|
|
43
43
|
\fBredis_vars export\fR gives you a list of the variables in a format that will work for a shell or a Pow \.powenv file\.
|
44
44
|
.
|
45
45
|
.SH "EXECUTING"
|
46
|
-
\fBredis_vars
|
46
|
+
\fBredis_vars exec\fR is used to execute a command with the environment variables in the store\.
|
47
47
|
.
|
48
48
|
.SH "COPYRIGHT"
|
49
|
-
RedisVars is Copyright (C) 2012 Daniel
|
49
|
+
RedisVars is Copyright (C) 2012 Daniel Farrell \fIhttp://danielfarrell\.com\fR
|
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.
|
4
|
+
version: 0.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|