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 +5 -0
- data/lib/preact/configuration.rb +1 -1
- data/lib/preact/version.rb +1 -1
- data/readme.md +3 -1
- metadata +1 -1
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 = {})
|
data/lib/preact/configuration.rb
CHANGED
data/lib/preact/version.rb
CHANGED
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 =
|
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.
|