preact 0.5.0 → 0.5.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/lib/preact.rb CHANGED
@@ -23,6 +23,11 @@ module Preact
23
23
  yield(configuration) if block_given?
24
24
 
25
25
  raise StandardError.new "Must specify project code and secret when configuring the Preact api client" unless configuration.valid?
26
+
27
+ if defined? Rails
28
+ # never log things if we're in Rails test environment
29
+ configuration.disabled = true if Rails.env.test?
30
+ end
26
31
  end
27
32
 
28
33
  def log_event(user, event_name, extras = {})
@@ -36,7 +36,7 @@ module Preact
36
36
  end
37
37
 
38
38
  def disabled?
39
- !!disabled
39
+ disabled == true
40
40
  end
41
41
 
42
42
  def user_agent
@@ -1,3 +1,3 @@
1
1
  module Preact
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
data/readme.md CHANGED
@@ -22,7 +22,7 @@ Preact.configure do |config|
22
22
  config.secret = '1234asdfasdf1234' # required
23
23
 
24
24
  # Disable in Rails development environments
25
- # config.disabled = (Rails.env != "development")
25
+ # config.disabled = Rails.env.development?
26
26
 
27
27
  # Uncomment this this line to customize the data sent with your Person objects.
28
28
  # Your procedure should return a Hash of attributes
@@ -109,3 +109,5 @@ end
109
109
 
110
110
 
111
111
  Copyright (c) 2011-2013 Christopher Gooley, Preact. See LICENSE.txt for further details.
112
+
113
+ Thanks to [Zach Millman](https://github.com/zmillman) for many contributions.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: preact
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: