squash_rails 1.1.3 → 1.1.4

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.
@@ -91,13 +91,10 @@ module Squash::Ruby::ControllerMethods
91
91
  # {#notify_squash} gives to `Squash::Ruby.notify`.
92
92
 
93
93
  def squash_rails_data
94
- flash_hash = flash.to_hash.stringify_keys
94
+ flash_hash = flash.to_hash.stringify_keys
95
95
  filtered_params = request.respond_to?(:filtered_parameters) ? request.filtered_parameters : filter_parameters(params)
96
- headers = if defined?(Rails) && Rails.version >= '4.0.0'
97
- request.headers
98
- else
99
- request.headers.to_hash
100
- end
96
+ headers = Hash.new
97
+ request.headers.each { |key, value| headers[key] = value }
101
98
 
102
99
  {
103
100
  :environment => Rails.env.to_s,
@@ -168,7 +165,7 @@ module Squash::Ruby::ControllerMethods
168
165
  def _filter_for_squash(data, kind)
169
166
  case kind
170
167
  when :headers
171
- data.reject { |key, _| key !~ /^[A-Z0-9_]+$/ || FILTERED_HEADERS.include?(key) }
168
+ data.reject { |key, _| key !~ /^[A-Z0-9_]+$/ || FILTERED_HEADERS.include?(key) }
172
169
  else
173
170
  data
174
171
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squash_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 3
10
- version: 1.1.3
9
+ - 4
10
+ version: 1.1.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tim Morgan