whenauser 0.2.0 → 0.2.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/README.md +21 -2
- data/lib/whenauser/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -7,9 +7,28 @@ Usage
|
|
7
7
|
-----
|
8
8
|
|
9
9
|
config.middleware.use 'WhenAUser::Rack',
|
10
|
-
:token =>
|
10
|
+
:token => CHANNEL_TOKEN
|
11
11
|
config.middleware.use 'WhenAUser::Exceptions',
|
12
|
-
:token =>
|
12
|
+
:token => ERROR_CHANNEL_TOKEN
|
13
13
|
config.middleware.use 'WhenAUser::Pageviews',
|
14
14
|
:ignore_if => lambda { |env| env['action_controller.instance'].is_a? SillyController }
|
15
15
|
|
16
|
+
WhenAUser::Rack accepts these options:
|
17
|
+
|
18
|
+
* `token` -- the token for a WhenAUser channel
|
19
|
+
* `webhook_url` -- defaults to 'http://whenauser.com/events'
|
20
|
+
|
21
|
+
WhenAUser::Exceptions accepts these options:
|
22
|
+
|
23
|
+
* `ignore_exceptions` -- an array of exception class names, defaults to ['ActiveRecord::RecordNotFound', 'AbstractController::ActionNotFound', 'ActionController::RoutingError']
|
24
|
+
* `ignore_crawlers` -- an array of strings to match against the user agent, includes a number of webcrawlers by default
|
25
|
+
* `ignore_if` -- this proc is passed env and an exception; if it returns true, the exception is not reported to WhenAUser
|
26
|
+
* `token` -- the token for a WhenAUser channel
|
27
|
+
* `custom_data` -- this proc is passed env, and should return a hash to be merged into the event
|
28
|
+
|
29
|
+
WhenAUser::Pageviews accepts these options:
|
30
|
+
|
31
|
+
* `ignore_crawlers` -- an array of strings to match against the user agent, includes a number of webcrawlers by default
|
32
|
+
* `ignore_if` -- this proc is passed env; if it returns true, the pageview is not reported to WhenAUser
|
33
|
+
* `custom_data` -- this proc is passed env, and should return a hash to be merged into the event
|
34
|
+
|
data/lib/whenauser/version.rb
CHANGED