rehearsal 0.9.1 → 0.9.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 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:
@@ -1,3 +1,3 @@
1
1
  module Rehearsal
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
@@ -1,6 +1,8 @@
1
1
  module Rehearsal
2
2
  module ViewHelpers
3
3
  def staging_banner(options = {})
4
+ return unless staging?
5
+
4
6
  content_tag :div, :id => 'rehearsal-staging-banner' do
5
7
  options[:message] || default_message
6
8
  end
@@ -7,4 +7,6 @@
7
7
  text-transform: uppercase;
8
8
  font: bold 13px 'Helvetica Neue', Helvetica, sans-serif;
9
9
  border-bottom: 2px solid #333;
10
+ position: relative;
11
+ z-index: 9999;
10
12
  }
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.1
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-20 00:00:00.000000000 Z
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: