Permalink
Browse files

Fixing boolean configs

  • Loading branch information...
1 parent 0e698d2 commit 8df02714b697a0c529b0f396d66d740897134eae @brandur committed Jul 18, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/facts/config.rb
  2. +1 −1 lib/facts/main.rb
View
@@ -15,11 +15,11 @@ def consumer_secret
end
def core_hours_only?
- @core_hours_only ||= env("CORE_HOURS_ONLY") == true
+ @core_hours_only ||= env("CORE_HOURS_ONLY") == "true"
end
def dry_run?
- @dry_run ||= env("DRY_RUN") || false
+ @dry_run ||= env("DRY_RUN") == "true"
end
def oauth_token
View
@@ -2,7 +2,7 @@ module Facts
class Main
def run
Slides.log :run, core_hours_only: Config.core_hours_only?,
- outside_core_hours: outside_core_hours? do
+ outside_core_hours: outside_core_hours?, dry_run: Config.dry_run? do
# Only Tweet during core hours. Assumes UTC.
run_without_logging if !Config.core_hours_only? || !outside_core_hours?
end

0 comments on commit 8df0271

Please sign in to comment.