quince_sinatra 0.1.0 → 0.1.4

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: 83300afa45413ec5d43b491f3996b3f97f6563f1f3d3e39c22b304be3b7565d1
4
- data.tar.gz: 4ef116e48228ceb69554f6ba2a512b49d6c145c4d45f2c1eb1fe5b8e9b06c0b4
3
+ metadata.gz: cccf41010ff5edc541bb45bca47c65c9afaab0aac8f6e4ef5077d2708f2305a7
4
+ data.tar.gz: 9ddb2edf0d6a302b29073186e01b37226b5684f77d71f18cbd524484f03d4386
5
5
  SHA512:
6
- metadata.gz: 8676aadd4fec7243135b1adcb1d153a2d3b0bfbf4d54a5d5bed096e47a5b4c1c65693361ccfd8e0478637ce710bdc14f5f83ad7e43216a73d6de855db934ad58
7
- data.tar.gz: b8ee8de24e71e6411d276fa921a3a554ca10e3a615cd277de3c37f62ac5a26a777bf1d5572fcb226fc94160edee60080e393eafafccf4bab3485d8ead2727d9f
6
+ metadata.gz: 9e0079140a9d12f6d06cc978da2e7aa29cb37c979f33b8d7c719acf31dc37859d24437f1a0ee7f067bc6eb2efbef02a8b9b9b25575d75302562d4ac8213a4351
7
+ data.tar.gz: '091c50eabfafe6d0cc1ca10725205731d7c7c7d5438d2315b0e2ea4438e48a712b356ff2d3843c1a2e1605e433e8dabc4e35a0c9ff0a1be558fd3fc414c6870a'
data/Gemfile.lock CHANGED
@@ -1,21 +1,26 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- quince_sinatra (0.1.0)
4
+ quince_sinatra (0.1.4)
5
5
  quince (~> 0.1)
6
+ rack-contrib (~> 2.3)
6
7
  sinatra (~> 2.1)
8
+ sinatra-contrib (~> 2.1)
7
9
 
8
10
  GEM
9
11
  remote: https://rubygems.org/
10
12
  specs:
11
13
  diff-lcs (1.4.4)
14
+ multi_json (1.15.0)
12
15
  mustermann (1.1.1)
13
16
  ruby2_keywords (~> 0.0.1)
14
- oj (3.13.5)
15
- quince (0.1.0)
17
+ oj (3.13.7)
18
+ quince (0.4.2)
16
19
  oj (~> 3.13)
17
20
  typed_struct (>= 0.1.4)
18
21
  rack (2.2.3)
22
+ rack-contrib (2.3.0)
23
+ rack (~> 2.0)
19
24
  rack-protection (2.1.0)
20
25
  rack
21
26
  rake (13.0.6)
@@ -39,6 +44,12 @@ GEM
39
44
  rack (~> 2.2)
40
45
  rack-protection (= 2.1.0)
41
46
  tilt (~> 2.0)
47
+ sinatra-contrib (2.1.0)
48
+ multi_json
49
+ mustermann (~> 1.0)
50
+ rack-protection (= 2.1.0)
51
+ sinatra (= 2.1.0)
52
+ tilt (~> 2.0)
42
53
  tilt (2.0.10)
43
54
  typed_struct (0.1.4)
44
55
  rbs (~> 1.0)
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # QuinceSinatra
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/quince_sinatra`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ The sinatra adapter for https://github.com/johansenja/quince
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,7 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ See https://github.com/johansenja/quince, or https://github.com/johansenja/quince-demo for samples
26
24
 
27
25
  ## Development
28
26
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module QuinceSinatra
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.4"
5
5
  end
@@ -20,6 +20,7 @@ module Quince
20
20
  end
21
21
  end
22
22
  use Rack::JSONBodyParser
23
+ use Rack::Deflater
23
24
  set :public_folder, File.join(File.dirname(File.expand_path($0)), "public")
24
25
  end
25
26
  end
@@ -51,14 +52,16 @@ end
51
52
  Quince.middleware = Quince::SinatraMiddleware.new
52
53
 
53
54
  at_exit do
54
- if Object.const_defined? "Sinatra::Reloader"
55
- app_dir = Pathname(File.expand_path($0)).dirname.to_s
56
- $LOADED_FEATURES.each do |f|
57
- next unless f.start_with? app_dir
55
+ if $!.nil? || ($!.is_a?(SystemExit) && $!.success?)
56
+ if Object.const_defined? "Sinatra::Reloader"
57
+ app_dir = Pathname(File.expand_path($0)).dirname.to_s
58
+ $LOADED_FEATURES.each do |f|
59
+ next unless f.start_with? app_dir
58
60
 
59
- Quince.underlying_app.also_reload f
61
+ Quince.underlying_app.also_reload f
62
+ end
60
63
  end
61
- end
62
64
 
63
- Quince.underlying_app.run!
65
+ Quince.underlying_app.run!
66
+ end
64
67
  end
@@ -29,6 +29,8 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  # Uncomment to register a new dependency of your gem
31
31
  spec.add_dependency "sinatra", "~> 2.1"
32
+ spec.add_dependency "sinatra-contrib", "~> 2.1"
33
+ spec.add_dependency "rack-contrib", "~> 2.3"
32
34
  spec.add_dependency "quince", "~> 0.1"
33
35
 
34
36
  # For more information and examples about making a new gem, checkout our
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quince_sinatra
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Johansen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-09 00:00:00.000000000 Z
11
+ date: 2021-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -24,6 +24,34 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sinatra-contrib
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.1'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '2.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rack-contrib
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.3'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.3'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: quince
29
57
  requirement: !ruby/object:Gem::Requirement