burninator 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/burninator.rb +4 -2
  2. metadata +1 -1
@@ -6,6 +6,8 @@ require "burninator/tasks"
6
6
  class Burninator
7
7
  DEFAULT_PERCENTAGE = 5
8
8
 
9
+ EnvironmentError = Class.new(ArgumentError)
10
+
9
11
  def initialize(options = {})
10
12
  @redis = options[:redis]
11
13
  @percentage = options.fetch(:percentage, DEFAULT_PERCENTAGE)
@@ -47,14 +49,14 @@ class Burninator
47
49
  def warm_target_url
48
50
  ENV.fetch("WARM_TARGET_URL")
49
51
  rescue KeyError
50
- raise ArgumentError,
52
+ raise EnvironmentError,
51
53
  "To use burninator, set WARM_TARGET_URL in your environment. See https://github.com/jpignata/burninator for more details."
52
54
  end
53
55
 
54
56
  def redis_url
55
57
  ENV.fetch("REDIS_URL")
56
58
  rescue KeyError
57
- raise ArgumentError,
59
+ raise EnvironmentError,
58
60
  "To use burninator, set REDIS_URL in your environment. See https://github.com/jpignata/burninator for more details."
59
61
  end
60
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: burninator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: