rehearsal 0.9.0 → 0.9.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 +14 -9
- data/lib/rehearsal/version.rb +1 -1
- data/lib/rehearsal.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
#
|
1
|
+
# Rehearsal
|
2
2
|
|
3
3
|
This gem gives drop-in staging environment HTTP basic auth for rails apps, maybe any Ruby web app.
|
4
4
|
|
5
|
-
|
5
|
+
You also get a `staging_banner` view helper
|
6
6
|
|
7
|
-
|
7
|
+
## Installation
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
|
-
gem '
|
11
|
+
gem 'rehearsal'
|
12
12
|
|
13
13
|
And then execute:
|
14
14
|
|
@@ -16,17 +16,22 @@ And then execute:
|
|
16
16
|
|
17
17
|
Or install it yourself as:
|
18
18
|
|
19
|
-
$ gem install
|
19
|
+
$ gem install rehearsal
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
23
|
In the controller you want to protect, or in application_controller to protect the entire app:
|
24
24
|
|
25
25
|
class ApplicationController < ActionController::Base
|
26
|
-
|
26
|
+
rehearse_with :username => 'username',
|
27
|
+
:password => 'password'
|
27
28
|
end
|
28
29
|
|
29
|
-
|
30
|
+
## Staging Banner View Helper
|
31
|
+
|
32
|
+
In your view templates (for example, in your layout), you can insert the banner:
|
30
33
|
|
31
|
-
|
32
|
-
|
34
|
+
<body>
|
35
|
+
<%= staging_banner :message => "Put your message here" %>
|
36
|
+
<!-- ... -->
|
37
|
+
</body>
|
data/lib/rehearsal/version.rb
CHANGED
data/lib/rehearsal.rb
CHANGED