rack-env 0.0.1 → 0.0.2
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 +39 -2
- data/lib/rack/env/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
# rack-env
|
2
|
+
[](http://travis-ci.org/banyan/rack-env)
|
3
|
+
[<img src="https://gemnasium.com/banyan/rack-env.png" />](https://gemnasium.com/banyan/rack-env)
|
4
|
+
|
5
|
+
Sets .env variables (`ENV['KEY']` pattern).
|
6
|
+
|
7
|
+
Some of the PaaS (such as [Heroku](http://www.heroku.com/) and [Sqale](http://sqale.jp)) are using configuration with .env.
|
8
|
+
|
9
|
+
This gem helps you while you are in development mode.
|
2
10
|
|
3
|
-
Sets .env variables
|
4
11
|
|
5
12
|
## Installation
|
6
13
|
|
@@ -18,7 +25,37 @@ Or install it yourself as:
|
|
18
25
|
|
19
26
|
## Usage
|
20
27
|
|
21
|
-
|
28
|
+
```
|
29
|
+
require 'rack/env'
|
30
|
+
```
|
31
|
+
|
32
|
+
### Rails
|
33
|
+
|
34
|
+
```
|
35
|
+
group :development, :test do
|
36
|
+
gem 'rack-env'
|
37
|
+
end
|
38
|
+
```
|
39
|
+
|
40
|
+
### Rack
|
41
|
+
|
42
|
+
```
|
43
|
+
# config.ru
|
44
|
+
Rack::Builder.new
|
45
|
+
use Rack::Env if ENV['RACK_ENV'] == 'development'
|
46
|
+
run MyApplication.new
|
47
|
+
end
|
48
|
+
```
|
49
|
+
|
50
|
+
* Enable to change .env path like as below.
|
51
|
+
|
52
|
+
```
|
53
|
+
# config.ru
|
54
|
+
Rack::Builder.new
|
55
|
+
use Rack::Env, envfile: 'config/.env' if ENV['RACK_ENV'] == 'development'
|
56
|
+
run MyApplication.new
|
57
|
+
end
|
58
|
+
```
|
22
59
|
|
23
60
|
## Contributing
|
24
61
|
|
data/lib/rack/env/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-env
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
segments:
|
112
112
|
- 0
|
113
|
-
hash:
|
113
|
+
hash: 3300818071817166995
|
114
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
115
|
none: false
|
116
116
|
requirements:
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
version: '0'
|
120
120
|
segments:
|
121
121
|
- 0
|
122
|
-
hash:
|
122
|
+
hash: 3300818071817166995
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
125
|
rubygems_version: 1.8.23
|