rehearsal 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +25 -0
- data/lib/rehearsal/version.rb +1 -1
- data/lib/rehearsal/view_helpers.rb +2 -0
- data/vendor/assets/stylesheets/rehearsal.css.scss +2 -0
- metadata +2 -2
data/README.md
CHANGED
@@ -20,6 +20,17 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
+
**You must have a staging environment**
|
24
|
+
|
25
|
+
$ cp config/environments/production.rb config/environments/staging.rb
|
26
|
+
|
27
|
+
**Add a `staging` section to your database.yml**
|
28
|
+
|
29
|
+
**Run your app in staging mode**
|
30
|
+
|
31
|
+
$ RAILS_ENV=staging
|
32
|
+
$ heroku config:add RAILS_ENV=staging
|
33
|
+
|
23
34
|
In the controller you want to protect, or in application_controller to protect the entire app:
|
24
35
|
|
25
36
|
class ApplicationController < ActionController::Base
|
@@ -27,6 +38,20 @@ In the controller you want to protect, or in application_controller to protect t
|
|
27
38
|
:password => 'password'
|
28
39
|
end
|
29
40
|
|
41
|
+
Add the CSS to your application.css:
|
42
|
+
|
43
|
+
@import "rehearsal";
|
44
|
+
|
45
|
+
-or-
|
46
|
+
|
47
|
+
//= require rehearsal
|
48
|
+
|
49
|
+
**or** define your own style:
|
50
|
+
|
51
|
+
#rehearsal-staging-banner {
|
52
|
+
/* styles */
|
53
|
+
}
|
54
|
+
|
30
55
|
## Staging Banner View Helper
|
31
56
|
|
32
57
|
In your view templates (for example, in your layout), you can insert the banner:
|
data/lib/rehearsal/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rehearsal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
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-21 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Quickly add Staging Env. HTTP basic auth to your project
|
15
15
|
email:
|