cuba 3.9.3 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gems +3 -2
- data/cuba.gemspec +2 -2
- data/lib/cuba/safe/csrf.rb +1 -1
- data/lib/cuba.rb +1 -0
- data/test/accept.rb +1 -1
- data/test/cookie.rb +3 -3
- data/test/csrf.rb +2 -1
- data/test/integration.rb +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d1132f58ee467460030f12c618ab68ec947bb83d8b20df22588475d37e95994
|
4
|
+
data.tar.gz: 7e73fb3214fa781d9a5564d780d3a0a4e6e32ba1833ce55e286ab62b75002b04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 046baecf8b875441123af6279840efa324757e9579324e5accc5f39b5d5f1df01be38c07af2e08c164f2a55e611c7653282239bbc3fd558feb6290a658c46eb1
|
7
|
+
data.tar.gz: b2812bc154953daa7e84972d1380aaaf68612e3f7162389315932404614e625a0a002ab21ba13c76c77727694a6b4696810206927a7798c600cce0aff70fa3c2
|
data/.gems
CHANGED
data/cuba.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cuba"
|
3
|
-
s.version = "
|
3
|
+
s.version = "4.0.0"
|
4
4
|
s.summary = "Microframework for web applications."
|
5
5
|
s.description = "Cuba is a microframework for web applications."
|
6
6
|
s.authors = ["Michel Martens"]
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
|
11
11
|
s.files = `git ls-files`.split("\n")
|
12
12
|
|
13
|
-
s.add_dependency "rack", ">=
|
13
|
+
s.add_dependency "rack", ">= 3.0.0"
|
14
14
|
s.add_development_dependency "cutest"
|
15
15
|
s.add_development_dependency "rack-test"
|
16
16
|
s.add_development_dependency "tilt"
|
data/lib/cuba/safe/csrf.rb
CHANGED
data/lib/cuba.rb
CHANGED
data/test/accept.rb
CHANGED
data/test/cookie.rb
CHANGED
@@ -13,7 +13,7 @@ test "set cookie" do
|
|
13
13
|
|
14
14
|
_, headers, body = Cuba.call(env)
|
15
15
|
|
16
|
-
assert_equal "foo=bar
|
16
|
+
assert_equal ["foo=bar", "bar=baz"], headers["set-cookie"]
|
17
17
|
end
|
18
18
|
|
19
19
|
test "delete cookie" do
|
@@ -29,6 +29,6 @@ test "delete cookie" do
|
|
29
29
|
|
30
30
|
_, headers, body = Cuba.call(env)
|
31
31
|
|
32
|
-
assert_equal "foo=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT",
|
33
|
-
headers["
|
32
|
+
assert_equal ["foo=bar", "foo=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"],
|
33
|
+
headers["set-cookie"]
|
34
34
|
end
|
data/test/csrf.rb
CHANGED
@@ -13,7 +13,8 @@ scope do
|
|
13
13
|
setup do
|
14
14
|
Cuba.reset!
|
15
15
|
|
16
|
-
Cuba.use(Rack::Session::Cookie,
|
16
|
+
Cuba.use(Rack::Session::Cookie,
|
17
|
+
secret: "R6zSBQWz0VGVSwvT8THurhJwaVqzpnsH27J5FoI58pxoIciDQYvE4opVvDTLMyfjj7c5inIc6PDNaQWvArMvK3")
|
17
18
|
Cuba.plugin(Cuba::Safe::CSRF)
|
18
19
|
end
|
19
20
|
|
data/test/integration.rb
CHANGED
@@ -78,7 +78,7 @@ test "reset and use" do
|
|
78
78
|
status, headers, resp = Cuba.call(env)
|
79
79
|
|
80
80
|
assert_equal 200, status
|
81
|
-
assert "text/html; charset=utf-8" == headers["
|
81
|
+
assert "text/html; charset=utf-8" == headers["content-type"]
|
82
82
|
assert_response resp, ["2nd Default"]
|
83
83
|
|
84
84
|
assert "1" == env["m.first"]
|
@@ -109,6 +109,6 @@ test "custom response" do
|
|
109
109
|
status, headers, resp = Cuba.call(env)
|
110
110
|
|
111
111
|
assert 200 == status
|
112
|
-
assert "text/html; charset=utf-8" == headers["
|
112
|
+
assert "text/html; charset=utf-8" == headers["content-type"]
|
113
113
|
assert_response resp, ["Default"]
|
114
114
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michel Martens
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cutest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,7 +137,7 @@ homepage: https://github.com/soveran/cuba
|
|
137
137
|
licenses:
|
138
138
|
- MIT
|
139
139
|
metadata: {}
|
140
|
-
post_install_message:
|
140
|
+
post_install_message:
|
141
141
|
rdoc_options: []
|
142
142
|
require_paths:
|
143
143
|
- lib
|
@@ -152,8 +152,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0'
|
154
154
|
requirements: []
|
155
|
-
rubygems_version: 3.1
|
156
|
-
signing_key:
|
155
|
+
rubygems_version: 3.0.3.1
|
156
|
+
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: Microframework for web applications.
|
159
159
|
test_files: []
|