shutterbug 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MGQ2NGIzMmYwZTJjYTFkOGFmZTMyNTg3Y2E0NjA4YmE4MDMxNzEzYw==
4
+ OWMwOTJjZjgzYWYxMjNjMGUxYzNiMTQ2MWRjNzg4ZWQzNzdlMmVhOQ==
5
5
  data.tar.gz: !binary |-
6
- MmQwZTA4ZGIxMzlmYThkNDQ0OGI1ODM5MzhjZjhmYjIwZjJkYmNhOA==
6
+ NmM0ODJiMjY1NTExOTc5MTU0ZjE4NGY4NTBjODc1ODAyZDI5YzQ2Zg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODAyOTNlYjlmNGU1ZGZmZWVjNDJhZDc4YzFjM2UxM2FmMTYyNTY1ZGNkYzEw
10
- YmExNmY3ZTdiY2JhNTVkYzE1Y2RiNTc4ZWNkYzQ2ZmI0OWFmOGIzZmY3Nzdk
11
- Yzg1NWUyZDg1YWZhNjYyYjZlYTViYjA1MzZjZGM1Y2M0YTNjYzU=
9
+ MzlmZmRkMzc3YTFlMjc5YmQyNTQ1YTNmNjI3OGM3NDc3NTgzYTMyMzI2ZThk
10
+ MmY5MjRiN2NmZWY1NGQzYmRhY2JkZWE4MTJiODlmNjNhYjY3MDdkYWI4NDg4
11
+ NmIyYzNlZGMyZDlhYmFhMGFmOWMyYjUwMmYxYTUwY2U1NzEyMGU=
12
12
  data.tar.gz: !binary |-
13
- MTQyN2RhNjM5ZWZkZTQ1YTNmNTg5Yzg5MzI2NTk2Y2JjNjMzMWViZDRlYmZk
14
- OWY1ZDgxNDNhNjFlZjkzNmRhMTQ5MDgzN2I0MmMwNjgzNzFjNDBmNmQ1YzJk
15
- NzVlYzM3NDlhY2JkZWRkZTYyY2M0NjhlMTRlNmZhZWNjM2MwMjc=
13
+ ZDczMmM4NDU1YTgxMTljNjc5ODk1Y2YzMjc0N2FjMTAxZjg0ODQzMmZhYjA2
14
+ OWM1ZjNkNmFiMTE4NDQ0OTI4YmYxMTZkYmExOWZiOTliYjQwMjQzZDc5ODZi
15
+ ZjlmMGIwOTM5NWZiYjY0NWY4ODRhNTM4YmI5ZmM1YjE2ZGE5ZTE=
data/README.md CHANGED
@@ -91,6 +91,9 @@ And a Procfile which looks like this:
91
91
 
92
92
  ## Changes ##
93
93
 
94
+ * October 6, 2015 – v 0.5.7
95
+ * Add error_trigger handler, to verify exception reporting.
96
+
94
97
  * September 4, 2015 – v 0.5.6
95
98
  * Prevent some iFrame data-url decoding problems by inserting **magical "#"**.
96
99
  For reasons we don't yet understand, iframes with base hrefs without hash (#)
@@ -1,5 +1,5 @@
1
1
  module Shutterbug
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  autoload :Rackapp, "shutterbug/rackapp"
4
4
  autoload :Configuration, "shutterbug/configuration"
5
5
  autoload :Storage, "shutterbug/storage"
@@ -3,5 +3,6 @@ module Shutterbug
3
3
  autoload :ConvertHandler, "shutterbug/handlers/convert_handler"
4
4
  autoload :DirectUploadHandler, "shutterbug/handlers/direct_upload_handler"
5
5
  autoload :FileHandler, "shutterbug/handlers/file_handler"
6
+ autoload :ErrorTrigger, "shutterbug/handlers/error_trigger"
6
7
  end
7
8
  end
@@ -0,0 +1,15 @@
1
+ module Shutterbug
2
+ module Handlers
3
+ class ErrorTrigger
4
+
5
+ def self.regex
6
+ /#{Configuration.instance.path_prefix}\/error/
7
+ end
8
+
9
+ def handle(helper, req, env)
10
+ raise "Forced exception: #{req}, #{env}"
11
+ end
12
+ end
13
+
14
+ end
15
+ end
@@ -5,7 +5,8 @@ module Shutterbug
5
5
  DefaultHandlers = [
6
6
  Shutterbug::Handlers::ConvertHandler,
7
7
  Shutterbug::Handlers::DirectUploadHandler,
8
- Shutterbug::Handlers::FileHandler
8
+ Shutterbug::Handlers::FileHandler,
9
+ Shutterbug::Handlers::ErrorTrigger
9
10
  ]
10
11
 
11
12
  def add_handler(klass)
@@ -0,0 +1,15 @@
1
+ require 'shared_examples_for_handlers'
2
+
3
+ describe Shutterbug::Handlers::ErrorTrigger do
4
+ let(:handler) { described_class.new }
5
+ let(:rackapp) {}
6
+ let(:req) {}
7
+ let(:env) {}
8
+
9
+ it "thorws an excpetion" do
10
+ described_class.regex.should match "/shutterbug/error/foo"
11
+ handler.should respond_to :handle
12
+ expect { handler.handle(rackapp, req, env) }.to raise_error
13
+ end
14
+
15
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shutterbug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noah Paessel
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-09-04 00:00:00.000000000 Z
13
+ date: 2015-10-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -170,6 +170,7 @@ files:
170
170
  - lib/shutterbug/handlers.rb
171
171
  - lib/shutterbug/handlers/convert_handler.rb
172
172
  - lib/shutterbug/handlers/direct_upload_handler.rb
173
+ - lib/shutterbug/handlers/error_trigger.rb
173
174
  - lib/shutterbug/handlers/file_handler.rb
174
175
  - lib/shutterbug/phantom_job.rb
175
176
  - lib/shutterbug/rackapp.rb
@@ -183,6 +184,7 @@ files:
183
184
  - spec/shutterbug/configuration_spec.rb
184
185
  - spec/shutterbug/convert_handler_spec.rb
185
186
  - spec/shutterbug/direct_upload_handler_spec.rb
187
+ - spec/shutterbug/error_trigger_spec.rb
186
188
  - spec/shutterbug/file_handler_spec.rb
187
189
  - spec/shutterbug/file_storage_spec.rb
188
190
  - spec/shutterbug/rackapp_spec.rb
@@ -218,6 +220,7 @@ test_files:
218
220
  - spec/shutterbug/configuration_spec.rb
219
221
  - spec/shutterbug/convert_handler_spec.rb
220
222
  - spec/shutterbug/direct_upload_handler_spec.rb
223
+ - spec/shutterbug/error_trigger_spec.rb
221
224
  - spec/shutterbug/file_handler_spec.rb
222
225
  - spec/shutterbug/file_storage_spec.rb
223
226
  - spec/shutterbug/rackapp_spec.rb