envious 0.2.0 → 0.3.0
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 +13 -0
- data/envious.gemspec +1 -1
- data/lib/envious.rb +6 -1
- data/lib/envious/railtie.rb +1 -0
- data/lib/tasks/cloud66.rake +10 -0
- metadata +9 -2
data/README.md
CHANGED
|
@@ -51,6 +51,19 @@ The environment used is dependant on Heroku's `RAILS_ENV` configuration setting.
|
|
|
51
51
|
|
|
52
52
|
$ heroku config:add RAILS_ENV=development
|
|
53
53
|
|
|
54
|
+
## Using with Cloud66
|
|
55
|
+
Envious makes it easy to export environment variables to a file for used on Cloud66 using a rake task. To copy local settings to a file formatted for used in the Cloud66 stack environment variable window use:
|
|
56
|
+
|
|
57
|
+
$ rake envious:cloud66:export > vars.txt
|
|
58
|
+
|
|
59
|
+
This will export your settings in `config/environment_vars.yml` to a file called `vars.txt` in your current directory. This is formatted and ready to be uploaded to Cloud66. By default, this will export your production environment variables.
|
|
60
|
+
|
|
61
|
+
To export environment variables for other environments, you can use an optional argument to the rake task:
|
|
62
|
+
|
|
63
|
+
$ rake envious:cloud66:export[development] > vars.txt
|
|
64
|
+
|
|
65
|
+
The command above will export all your development environment variables in `config/environment_vars.yml` to a file called `vars.txt`. `development` can be replaced with any other environments to export those values.
|
|
66
|
+
|
|
54
67
|
|
|
55
68
|
## Questions or Problems?
|
|
56
69
|
|
data/envious.gemspec
CHANGED
data/lib/envious.rb
CHANGED
|
@@ -3,11 +3,16 @@ require "pp"
|
|
|
3
3
|
module Envious
|
|
4
4
|
extend self
|
|
5
5
|
|
|
6
|
-
def vars_for_heroku
|
|
6
|
+
def vars_for_heroku
|
|
7
7
|
env_vars = default_vars.merge(environment_vars)
|
|
8
8
|
env_vars = env_vars.map { |k, v| "#{k}=#{v}"}.join(' ')
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
def vars_for_cloud66
|
|
12
|
+
env_vars = default_vars.merge(environment_vars)
|
|
13
|
+
env_vars = env_vars.map { |k, v| "#{k}=#{v}"}.join("\n")
|
|
14
|
+
end
|
|
15
|
+
|
|
11
16
|
def load_env()
|
|
12
17
|
add_to_environment(default_vars.merge(environment_vars))
|
|
13
18
|
end
|
data/lib/envious/railtie.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: envious
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
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: 2013-
|
|
12
|
+
date: 2013-03-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
@@ -61,6 +61,7 @@ files:
|
|
|
61
61
|
- lib/envious/railtie.rb
|
|
62
62
|
- lib/generators/envious/setup_generator.rb
|
|
63
63
|
- lib/generators/envious/templates/environment_vars.yml
|
|
64
|
+
- lib/tasks/cloud66.rake
|
|
64
65
|
- lib/tasks/heroku.rake
|
|
65
66
|
- spec/spec_helper.rb
|
|
66
67
|
homepage: http://github.com/ryannielson/envious
|
|
@@ -75,12 +76,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
75
76
|
- - ! '>='
|
|
76
77
|
- !ruby/object:Gem::Version
|
|
77
78
|
version: '0'
|
|
79
|
+
segments:
|
|
80
|
+
- 0
|
|
81
|
+
hash: -910274445455390227
|
|
78
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
83
|
none: false
|
|
80
84
|
requirements:
|
|
81
85
|
- - ! '>='
|
|
82
86
|
- !ruby/object:Gem::Version
|
|
83
87
|
version: '0'
|
|
88
|
+
segments:
|
|
89
|
+
- 0
|
|
90
|
+
hash: -910274445455390227
|
|
84
91
|
requirements: []
|
|
85
92
|
rubyforge_project:
|
|
86
93
|
rubygems_version: 1.8.24
|