shaf 1.6.0 → 1.6.1

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
  SHA256:
3
- metadata.gz: bd5e02da6f878d5f9e0ef2e4d3adb641e9ea34362c943cff5a9e94d93ffaad26
4
- data.tar.gz: 565dd3872f4b46a48955b94ebbb6324472ec6293bf1f7ead551a55fdc5bd4d4a
3
+ metadata.gz: 66ee277e6ce8adc77313e5df1719e018db54392e9e46e0476d220df96767d3c5
4
+ data.tar.gz: 8e233c0d3f1d39bd9757a833c2baa4b50dde0c2b54bc96902b95271ccab8d47f
5
5
  SHA512:
6
- metadata.gz: 129bf19d6c7ff6ff0f1df840078fbba5df8e47045e69a5b3a3e40ebdc2680f46ad36dc3c4660f8dd8ba5187368fa3b0ecdb503b0575def9f1403ed0d6e743935
7
- data.tar.gz: c4fa82f52be8f910f40cebe13b0c5df52239a780788d7d083bc6f969cbfb02c9d72a4aa1fa1e2dce6cc23013be92e9d0eaacc849beaf9e05decacc34ccb9ed3d
6
+ metadata.gz: ddb8c2dbc1b0b00f0c9badca6fad5c6a9bc7a29684bc4070fa313945283fcb7d3272ad0e933601f524f03fb8a65fcfd81ab6337af1f30b2c33d2fdce4c47605c
7
+ data.tar.gz: ff383da9a2cc2936aa28e4647835bf6910b9d401346106a2b3890ed7dcb836b43517a96c2aebc6411cda0feda39da76f41d7a25d7ad9b1912f8ee3b437c17eff
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- �u�
2
- �� %5,2kc����S�Py�S��I�����
1
+ 4M���9c��:���FM�STlrT�ρ��e H��ɝ�LK��hd7�P��5%�~���yI�9 l��^�9���3����m�탻U�'������d��1o*��U���#Ȼ�S���G)�u_wS���LLSy�;�T$v������rK:�Xk6)�(�C�R� ��
@@ -3,16 +3,23 @@ require 'shaf/middleware'
3
3
  module Shaf
4
4
  class App
5
5
  class << self
6
+ # Either call `Shaf::App.run!`
6
7
  def run!
7
8
  app.run!
8
9
  end
9
10
 
11
+ # Or `run Shaf::App` (in config.ru)
12
+ def call(*args)
13
+ app.call(*args)
14
+ end
15
+
10
16
  def app
11
- Sinatra.new.tap do |app|
12
- app.set :port, Settings.port || 3000
13
- app.use Middleware::RequestId
14
- app.use Router
15
- end
17
+ @app ||=
18
+ Sinatra.new.tap do |app|
19
+ app.set :port, Settings.port || 3000
20
+ app.use Middleware::RequestId
21
+ app.use Router
22
+ end
16
23
  end
17
24
  end
18
25
  end
@@ -15,7 +15,7 @@ module Shaf
15
15
  end
16
16
 
17
17
  def read_input
18
- request.body.rewind unless request.body.pos.zero?
18
+ request.body.rewind
19
19
  request.body.read
20
20
  ensure
21
21
  request.body.rewind
@@ -1,3 +1,3 @@
1
1
  module Shaf
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1"
3
3
  end
@@ -1,4 +1,4 @@
1
1
  $:.unshift File.expand_path(__dir__)
2
2
  require 'config/bootstrap'
3
3
 
4
- Shaf::App.run!
4
+ run Shaf::App
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shaf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sammy Henningsson
@@ -30,7 +30,7 @@ cert_chain:
30
30
  ZMhjYR7sRczGJx+GxGU2EaR0bjRsPVlC4ywtFxoOfRG3WaJcpWGEoAoMJX6Z0bRv
31
31
  M40=
32
32
  -----END CERTIFICATE-----
33
- date: 2020-04-21 00:00:00.000000000 Z
33
+ date: 2020-04-22 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: minitest
@@ -347,6 +347,7 @@ files:
347
347
  - upgrades/1.4.0.tar.gz
348
348
  - upgrades/1.5.0.tar.gz
349
349
  - upgrades/1.6.0.tar.gz
350
+ - upgrades/1.6.1.tar.gz
350
351
  homepage:
351
352
  licenses:
352
353
  - MIT
metadata.gz.sig CHANGED
Binary file