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 CHANGED
@@ -1,14 +1,14 @@
1
- # Protection
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
- ## Installation
5
+ You also get a `staging_banner` view helper
6
6
 
7
- **Must be using Neoteric's GemFury source, as this is private**
7
+ ## Installation
8
8
 
9
9
  Add this line to your application's Gemfile:
10
10
 
11
- gem 'protection'
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 protection
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
- include Neoteric::Protection
26
+ rehearse_with :username => 'username',
27
+ :password => 'password'
27
28
  end
28
29
 
29
- And you must set these two ENV variables:
30
+ ## Staging Banner View Helper
31
+
32
+ In your view templates (for example, in your layout), you can insert the banner:
30
33
 
31
- export STAGING_USERNAME=*your_username*
32
- export STAGING_PASSWORD=*your_secret*
34
+ <body>
35
+ <%= staging_banner :message => "Put your message here" %>
36
+ <!-- ... -->
37
+ </body>
@@ -1,3 +1,3 @@
1
1
  module Rehearsal
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
data/lib/rehearsal.rb CHANGED
@@ -26,7 +26,7 @@ module Rehearsal
26
26
  def require_http_basic_auth
27
27
  authenticate_or_request_with_http_basic do |username, password|
28
28
  username == self.username && password == self.password
29
- end# if staging?
29
+ end if staging?
30
30
  end
31
31
 
32
32
  def staging?
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.0
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: