omnihooks 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e366cffb1233828df52cb6c849fe97d29301d439
4
- data.tar.gz: 95fa526fec779398eff993f2a2f0b00d6aff953d
3
+ metadata.gz: a903371f84e0b5f5115f1d1045e341c4de849a64
4
+ data.tar.gz: 42b89a3fe407b4e47cb814e5bf48ef2ef4255587
5
5
  SHA512:
6
- metadata.gz: 2498312b7e43a1519a8d47ced0c1d07473f3a4655408eb7a0b3e5666fbe6cb5e33d9c738c0e301ccda50de514b2ea19efcc7dcac2edb6c2d233ebf86768a2084
7
- data.tar.gz: 21afa30163e9630b4885c70dc5f41057e90e3e5f265c688888dff8024aa21510bae5076127518c053adbfbe300d559a0519ba2b762e8da6243a3944601905d1f
6
+ metadata.gz: 107bf07dcd06cec7f7c9e2fba4745dcc16eed9f866dd54bb2d99970918217528e96d2df19826039cb31c0c8c92df13c05e3c9bd1bcfd57d5755c76b9f27c1f01
7
+ data.tar.gz: d555956919f628e9b81c3ec2bf04cc63a4adc51d573d2110caa71fac663010dfd56e9e6efa31f0222416381661b812f0d930230246553fa959bab2d8bfe6f4d6
data/.gitignore CHANGED
@@ -13,3 +13,4 @@
13
13
  *.a
14
14
  mkmf.log
15
15
  /spec/examples.txt
16
+ *.sublime-*
data/Rakefile CHANGED
@@ -1,2 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
2
3
 
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -254,7 +254,7 @@ module OmniHooks
254
254
  evt_type = get_event_type
255
255
 
256
256
  self.class.instrument(evt_type, evt) if evt
257
- rescue => e
257
+ rescue Exception => e
258
258
  log(:error, e.message)
259
259
  log(:error, e.backtrace.join("\n"))
260
260
  [500, {}, [EMPTY_STRING]]
@@ -1,3 +1,3 @@
1
1
  module OmniHooks
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -203,7 +203,7 @@ RSpec.describe OmniHooks::Strategy do
203
203
 
204
204
  expect(ActiveSupport::Notifications).to receive(:instrument).with('class.bar', 'Foo')
205
205
 
206
- expect(instance.call(make_env('/hooks/class'))).to eq([200, {}, [nil]])
206
+ expect(instance.call(make_env('/hooks/class'))).to eq([200, {}, ['']])
207
207
  end
208
208
 
209
209
  context 'with exception in event callback' do
@@ -222,7 +222,7 @@ RSpec.describe OmniHooks::Strategy do
222
222
 
223
223
  it 'should return a non 200 response' do
224
224
  instance = klass.new(app)
225
- expect(instance.call(make_env('/hooks/class'))).to eq([500, {}, [nil]])
225
+ expect(instance.call(make_env('/hooks/class'))).to eq([500, {}, ['']])
226
226
  end
227
227
  end
228
228
  end
@@ -242,7 +242,7 @@ RSpec.describe OmniHooks::Strategy do
242
242
  it 'should return a success response' do
243
243
  expect(subscriber).to receive(:call).with('Foo')
244
244
 
245
- expect(strategy.call(make_env('/hooks/test', {'rack.input' => StringIO.new('type=foo.bar&payload=test')}))).to eq([200, {}, [nil]])
245
+ expect(strategy.call(make_env('/hooks/test', {'rack.input' => StringIO.new('type=foo.bar&payload=test')}))).to eq([200, {}, ['']])
246
246
  end
247
247
  end
248
248
 
@@ -250,7 +250,7 @@ RSpec.describe OmniHooks::Strategy do
250
250
  it 'should return a success response' do
251
251
  expect(subscriber).not_to receive(:call)
252
252
 
253
- expect(strategy.call(make_env('/hooks/test', {'rack.input' => StringIO.new('type=foo.sam&payload=test')}))).to eq([200, {}, [nil]])
253
+ expect(strategy.call(make_env('/hooks/test', {'rack.input' => StringIO.new('type=foo.sam&payload=test')}))).to eq([200, {}, ['']])
254
254
  end
255
255
  end
256
256
 
@@ -260,7 +260,7 @@ RSpec.describe OmniHooks::Strategy do
260
260
  end
261
261
 
262
262
  it 'should return an error response' do
263
- expect(strategy.call(make_env('/hooks/test', {'rack.input' => StringIO.new('type=foo.bar&payload=test')}))).to eq([500, {}, [nil]])
263
+ expect(strategy.call(make_env('/hooks/test', {'rack.input' => StringIO.new('type=foo.bar&payload=test')}))).to eq([500, {}, ['']])
264
264
  end
265
265
  end
266
266
 
@@ -285,7 +285,7 @@ RSpec.describe OmniHooks::Strategy do
285
285
  end
286
286
 
287
287
  it 'allows a request method of the correct type' do
288
- expect(strategy.call(make_env('/hooks/test', 'REQUEST_METHOD' => 'PUT'))).to eq([200, {}, [nil]])
288
+ expect(strategy.call(make_env('/hooks/test', 'REQUEST_METHOD' => 'PUT'))).to eq([200, {}, ['']])
289
289
  end
290
290
 
291
291
  after do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnihooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Falconer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-04 00:00:00.000000000 Z
11
+ date: 2017-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport