rulesio 0.9.6 → 0.9.7

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.
@@ -78,7 +78,7 @@ module RulesIO
78
78
  RulesIO::RailsConfigurator.new.instance_eval do
79
79
  eval IO.read(filename), binding, filename.to_s, 1
80
80
  if defined?(::Rails.configuration) && ::Rails.configuration.respond_to?(:middleware)
81
- ::Rails.configuration.middleware.insert_after 'ActionDispatch::Static', 'RulesIO::Rack',
81
+ ::Rails.configuration.middleware.insert 0, 'RulesIO::Rack',
82
82
  :webhook_url => @webhook_url,
83
83
  :disable_sending_events => @disable,
84
84
  :token => @token,
@@ -1,3 +1,3 @@
1
1
  module RulesIO
2
- VERSION = '0.9.6'
2
+ VERSION = '0.9.7'
3
3
  end
data/lib/rulesio.rb CHANGED
@@ -14,7 +14,7 @@ module RulesIO
14
14
  mattr_accessor :filter_parameters, :buffer, :token, :webhook_url, :queue, :queue_options, :controller_data, :logger, :disable_sending_events
15
15
 
16
16
  def self.default_ignored_crawlers
17
- %w(Baidu Gigabot Googlebot libwww-perl lwp-trivial msnbot SiteUptime Slurp WordPress ZIBB ZyBorg Yandex Jyxobot Huaweisymantecspider ApptusBot NewRelicPinger)
17
+ %w(Baidu Gigabot Googlebot libwww-perl lwp-trivial msnbot SiteUptime Slurp WordPress ZIBB ZyBorg Yandex Jyxobot Huaweisymantecspider ApptusBot NewRelicPinger CopperEgg Pingdom UptimeRobot)
18
18
  end
19
19
 
20
20
  def self.send_event(event)
@@ -58,9 +58,12 @@ module RulesIO
58
58
  rescue
59
59
  end
60
60
 
61
- user = controller.instance_variable_get('@current_user') || controller.instance_eval('current_user')
62
- [:to_param, :id].each do |method|
63
- return user.send(method) if user && user.respond_to?(method)
61
+ begin
62
+ user = controller.instance_variable_get('@current_user') || controller.instance_eval('current_user')
63
+ [:to_param, :id].each do |method|
64
+ return user.send(method) if user && user.respond_to?(method)
65
+ end
66
+ rescue
64
67
  end
65
68
  end
66
69
  nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rulesio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-04 00:00:00.000000000 Z
13
+ date: 2012-09-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport