virtuatable 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2be2ea052bf3c8d1ffaf704173d88d0ac222f7b119a7c18cfe15a1fc32a41a1d
4
- data.tar.gz: a718f0c54cfe39930e107ed522f47ded83503bf92013918909ec896217c10226
3
+ metadata.gz: f9eb2ae4d9f7b82ca6e9bafdf86dfb811cdadab3f964b62dbcfa1f47eb9af952
4
+ data.tar.gz: 494f4a9ba4dcbe8f5f2d92f08edd3d48df23c7228f1191fa0db1d01caeb6f511
5
5
  SHA512:
6
- metadata.gz: 8b531a94345af25b219b56ff75770bce40272a4921ed8dfb1eed073622723d331236a492c36fec383588c13602b680156a3da5fc63de5d245ff3f6591e0f71dc
7
- data.tar.gz: dca399903d3d305560965a54fac342ac769e1c039e7eb0144c5b1ade7ab52ed5c6fcccbd515697f51d89acf0880651679f8a8121378e584e36d03dd7bd2641ee
6
+ metadata.gz: 2cd7755448f747c7a5e4f3b15dd094b59c71e991aab96d537940cdbd75e39e0f099f75ff35297c0053b67e70d2a16dcde7487642a5ae8775bd53310246412c6d
7
+ data.tar.gz: '00875e5e4f232859121c7114b3fb17fbdfc38eda4bcd37ab3c4c9fee308608d3734f0ff9c1fb1d89eecc68d2696233e7018614874efdb13773e2a34c86f96017'
@@ -26,6 +26,7 @@ module Virtuatable
26
26
  send(route.verb, route.path) do
27
27
  application!(premium: current_route.premium) && gateway!
28
28
  session! if current_route.authenticated
29
+ instance_eval(&block)
29
30
  end
30
31
  end
31
32
 
@@ -4,7 +4,9 @@ module Virtuatable
4
4
  def current_route
5
5
  splitted = request.env['sinatra.route'].split(' ')
6
6
  verb = splitted.first.downcase
7
- Arkaan::Monitoring::Route.find_by(verb: verb, path: splitted.last)
7
+ self.class.api_routes.find do |route|
8
+ route.verb == verb && route.path == splitted.last
9
+ end
8
10
  end
9
11
  end
10
12
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Virtuatable
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtuatable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois