rehearsal 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,7 @@
1
1
  Rehearsal.configure do |config|
2
2
  # Set the environment you want to rehearse in
3
- # config.env = :staging
3
+ # config.env = :staging
4
+ #
5
+ # Enable/disable the rehearsal
6
+ # config.enabled = true
4
7
  end
@@ -1,9 +1,10 @@
1
1
  module Rehearsal
2
2
  class Configuration
3
- attr_accessor :env
3
+ attr_accessor :env, :enabled
4
4
 
5
5
  def initialize
6
- @env ||= :staging
6
+ @env ||= :staging
7
+ @enabled = true if @enabled.nil?
7
8
  end
8
9
  end
9
10
  end
@@ -1,3 +1,3 @@
1
1
  module Rehearsal
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/lib/rehearsal.rb CHANGED
@@ -44,6 +44,7 @@ module Rehearsal
44
44
  end
45
45
 
46
46
  def rehearsing?
47
+ return unless Rehearsal.config.enabled
47
48
  Rails.env.to_sym == Rehearsal.config.env
48
49
  end
49
50
  end
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: 1.0.0
4
+ version: 1.0.1
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-22 00:00:00.000000000 Z
12
+ date: 2012-12-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails