interapp 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: 625c2e242aa5ab891c0cd25c17fc8a91d3db77fe
4
- data.tar.gz: 68ed5e8017688e81ffdeec41a37b6e10d1ca361e
3
+ metadata.gz: e2bb56699c39d2e3019847b3b96379e03f9844b9
4
+ data.tar.gz: ca3fc7b3fba6f2aacb690e3d1ac821906353d0ff
5
5
  SHA512:
6
- metadata.gz: 75889fee36ae80e1e1d5ee8ba3266407a02466185d5a7d16ca552541e4e28c165f6564f6692724c9df6824f796d184e15d62bb4fca3bf45716a54487714d9579
7
- data.tar.gz: 50094f8c78d3f1b9c41760a88e6f25ac98ab29d070dbb2adb5a7088024ca98cbd3248e1e1b93f1fbddbf08cbb25e3e8b451a28efc719baa302d29b309bd6dc63
6
+ metadata.gz: 0133fbdde193556a6404673aa0d487eefc4b04839aaec62007e49e645338cdc56e7ca5b5e6342a71393148cd169411bfeee205b26739e948811219a7ed6845d9
7
+ data.tar.gz: 26df7c310f8a90975ce27f78f2373c3d7a4985e337e024bf4597dba0ef6fb9203203f8a42f3e29cdf3d39a6522ab4588d550fa826b6109b9755906a749248f46
@@ -1,5 +1,7 @@
1
1
  module Interapp
2
2
  class ApplicationController < ActionController::Base
3
+ protect_from_forgery with: :null_session
4
+
3
5
  rescue_from Interapp::SignatureInvalidError do
4
6
  render json: { error: "SIGNATURE_INVALID" }, status: 403
5
7
  end
@@ -1,5 +1,5 @@
1
1
  module Interapp
2
- class MessagesController < ApplicationController
2
+ class MessagesController < Interapp::ApplicationController
3
3
  def create
4
4
  Interapp::ReceiveMessageService.new(
5
5
  payload: request.body.read,
@@ -1,3 +1,3 @@
1
1
  module Interapp
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -262,3 +262,47 @@ Completed 403 Forbidden in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
262
262
   (0.1ms) rollback transaction
263
263
   (0.0ms) begin transaction
264
264
   (0.1ms) rollback transaction
265
+  (0.2ms) begin transaction
266
+  (0.1ms) rollback transaction
267
+  (0.0ms) begin transaction
268
+  (0.0ms) rollback transaction
269
+  (0.0ms) begin transaction
270
+  (0.1ms) rollback transaction
271
+  (0.1ms) begin transaction
272
+  (0.1ms) rollback transaction
273
+  (4.1ms) begin transaction
274
+ Started POST "/interapp" for 127.0.0.1 at 2014-09-10 21:38:06 +1000
275
+ Processing by Interapp::MessagesController#create as HTML
276
+ Parameters: {"test"=>["message", "payload"], "message"=>{"test"=>["message", "payload"]}}
277
+ Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
278
+  (0.0ms) rollback transaction
279
+  (0.0ms) begin transaction
280
+ Started POST "/interapp" for 127.0.0.1 at 2014-09-10 21:38:06 +1000
281
+ Processing by Interapp::MessagesController#create as HTML
282
+ Parameters: {"test"=>["message", "payload"], "message"=>{"test"=>["message", "payload"]}}
283
+ Completed 403 Forbidden in 0ms (Views: 0.1ms | ActiveRecord: 0.0ms)
284
+  (0.0ms) rollback transaction
285
+  (0.0ms) begin transaction
286
+ Started POST "/interapp" for 127.0.0.1 at 2014-09-10 21:38:06 +1000
287
+ Processing by Interapp::MessagesController#create as HTML
288
+ Parameters: {"test"=>["message", "payload"], "message"=>{"test"=>["message", "payload"]}}
289
+ Completed 200 OK in 220ms (Views: 0.1ms | ActiveRecord: 0.0ms)
290
+  (0.1ms) rollback transaction
291
+  (0.1ms) begin transaction
292
+  (0.1ms) rollback transaction
293
+  (0.1ms) begin transaction
294
+  (0.1ms) rollback transaction
295
+  (0.0ms) begin transaction
296
+  (0.1ms) rollback transaction
297
+  (0.0ms) begin transaction
298
+  (0.1ms) rollback transaction
299
+  (0.0ms) begin transaction
300
+  (0.1ms) rollback transaction
301
+  (0.0ms) begin transaction
302
+  (0.1ms) rollback transaction
303
+  (0.0ms) begin transaction
304
+  (0.1ms) rollback transaction
305
+  (0.1ms) begin transaction
306
+  (0.1ms) rollback transaction
307
+  (0.0ms) begin transaction
308
+  (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: interapp
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
  - Ryan Zhou