hoptoad_notifier 2.3.5 → 2.3.6

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,16 @@
1
+ Version 2.3.6 - 2010-08-30
2
+ ===============================================================================
3
+
4
+ Daniel Barron (1):
5
+ Initializer configuration overrides Railtie configuration if set
6
+
7
+ Joshua Clayton (1):
8
+ Remove rack.request.form_vars
9
+
10
+ Tristan Dunn (1):
11
+ Move Rails JS scenarios into separate feature and correctly support HTTPS when secure is enabled on the notifier.
12
+
13
+
1
14
  Version 2.3.5 - 2010-08-13
2
15
  ===============================================================================
3
16
 
@@ -202,3 +215,4 @@ Nick Quaranto (3):
202
215
 
203
216
 
204
217
 
218
+
data/Rakefile CHANGED
@@ -198,7 +198,7 @@ def define_rails_cucumber_tasks(additional_cucumber_args = '')
198
198
  task version => [:gemspec, :vendor_test_gems] do
199
199
  puts "Testing Rails #{version}"
200
200
  ENV['RAILS_VERSION'] = version
201
- system("cucumber --format #{ENV['CUCUMBER_FORMAT'] || 'progress'} #{additional_cucumber_args} features/rails.feature")
201
+ system("cucumber --format #{ENV['CUCUMBER_FORMAT'] || 'progress'} #{additional_cucumber_args} features/rails.feature features/rails_with_js_notifier.feature")
202
202
  end
203
203
  end
204
204
 
@@ -98,6 +98,7 @@ module HoptoadNotifier
98
98
  also_use_rack_params_filters
99
99
  find_session_data
100
100
  clean_params
101
+ clean_rack_request_data
101
102
  end
102
103
 
103
104
  # Converts the given notice to XML
@@ -254,6 +255,12 @@ module HoptoadNotifier
254
255
  end
255
256
  end
256
257
 
258
+ def clean_rack_request_data
259
+ if cgi_data
260
+ cgi_data.delete("rack.request.form_vars")
261
+ end
262
+ end
263
+
257
264
  def filter(hash)
258
265
  if params_filters
259
266
  hash.each do |key, value|
@@ -14,7 +14,7 @@ module HoptoadNotifier
14
14
  path = File.join(File.dirname(__FILE__), '..', '..', 'templates', 'javascript_notifier.erb')
15
15
  host = HoptoadNotifier.configuration.host.dup
16
16
  port = HoptoadNotifier.configuration.port
17
- host << ":#{port}" unless port == 80
17
+ host << ":#{port}" unless [80, 443].include?(port)
18
18
 
19
19
  options = {
20
20
  :file => path,
@@ -22,6 +22,7 @@ module HoptoadNotifier
22
22
  :use_full_path => false,
23
23
  :locals => {
24
24
  :host => host,
25
+ :secure => HoptoadNotifier.configuration.secure,
25
26
  :api_key => HoptoadNotifier.configuration.api_key,
26
27
  :environment => HoptoadNotifier.configuration.environment_name
27
28
  }
@@ -13,9 +13,9 @@ module HoptoadNotifier
13
13
 
14
14
  config.after_initialize do
15
15
  HoptoadNotifier.configure(true) do |config|
16
- config.logger = Rails.logger
17
- config.environment_name = Rails.env
18
- config.project_root = Rails.root
16
+ config.logger ||= Rails.logger
17
+ config.environment_name ||= Rails.env
18
+ config.project_root ||= Rails.root
19
19
  config.framework = "Rails: #{::Rails::VERSION::STRING}"
20
20
  end
21
21
 
@@ -1,3 +1,3 @@
1
1
  module HoptoadNotifier
2
- VERSION = "2.3.5".freeze
2
+ VERSION = "2.3.6".freeze
3
3
  end
@@ -1,4 +1,4 @@
1
- <script type="text/javascript" src="http://<%= host %>/javascripts/notifier.js"></script>
1
+ <script type="text/javascript" src="http<%= 's' if secure %>://<%= host %>/javascripts/notifier.js"></script>
2
2
  <script type="text/javascript">
3
3
  Hoptoad.setKey('<%= api_key %>');
4
4
  Hoptoad.setHost('<%= host %>');
@@ -168,6 +168,16 @@ class NoticeTest < Test::Unit::TestCase
168
168
  assert_filters_hash(:session_data)
169
169
  end
170
170
 
171
+ should "remove rack.request.form_vars" do
172
+ original = {
173
+ "rack.request.form_vars" => "story%5Btitle%5D=The+TODO+label",
174
+ "abc" => "123"
175
+ }
176
+
177
+ notice = build_notice(:cgi_data => original)
178
+ assert_equal({"abc" => "123"}, notice.cgi_data)
179
+ end
180
+
171
181
  context "a Notice turned into XML" do
172
182
  setup do
173
183
  HoptoadNotifier.configure do |config|
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoptoad_notifier
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 3
9
- - 5
10
- version: 2.3.5
9
+ - 6
10
+ version: 2.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot, inc
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-13 00:00:00 -04:00
18
+ date: 2010-08-30 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency