whenauser 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +21 -2
  2. data/lib/whenauser/version.rb +1 -1
  3. 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 => 'miKTaOlW1xzvEDG-QF9ZrA'
10
+ :token => CHANNEL_TOKEN
11
11
  config.middleware.use 'WhenAUser::Exceptions',
12
- :token => 'T4Jk7141XQefcD35v1Wzwg'
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
+
@@ -1,3 +1,3 @@
1
1
  module WhenAUser
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whenauser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: