koala 3.3.0 → 3.4.0
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 +4 -4
- data/changelog.md +8 -0
- data/lib/koala/http_service/request.rb +1 -3
- data/lib/koala/version.rb +1 -1
- data/spec/cases/http_service/request_spec.rb +14 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd1ef11b53dbfd2dc45d096a2b3f26d86aab74927758638b95670be82d5a81b3
|
4
|
+
data.tar.gz: 4f8694539f46568a268740064fa16f5f9084198f90ccdb2bf66b532d0fd280ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa13fcdb702dacaf5ea61d905f1d4d09e067b8181c9bbe9f1e210d80718eb8015953b770fc79332658bf9a0c5b11e0923a31c85049fde4a5dc566367f5ed63a1
|
7
|
+
data.tar.gz: cda4d98559e43ce1cb2cfd4c308431020c32443282cf2161230f6cae81bfc7608494181f55cc15e8dfc4386b248a81ec7d2306125487a41b6d4c7c6f4bc84c09
|
data/changelog.md
CHANGED
@@ -15,6 +15,14 @@ Testing improvements:
|
|
15
15
|
|
16
16
|
Others:
|
17
17
|
|
18
|
+
v3.4.0 (2023-01-05)
|
19
|
+
======
|
20
|
+
|
21
|
+
Updated features:
|
22
|
+
|
23
|
+
* Force use by default of HTTPS (instead of HTTP) when there is no access token.
|
24
|
+
HTTP can still be used by passing :use_ssl => false in the options hash for an api call ([#678](https://github.com/arsduo/koala/pull/678/files))
|
25
|
+
|
18
26
|
v3.3.0 (2022-09-27)
|
19
27
|
======
|
20
28
|
|
@@ -106,9 +106,7 @@ module Koala
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def add_ssl_options(opts)
|
109
|
-
# require https
|
110
|
-
return opts unless raw_args["access_token"]
|
111
|
-
|
109
|
+
# require https by default (can be overriden by explicitly setting other SSL options)
|
112
110
|
{
|
113
111
|
use_ssl: true,
|
114
112
|
ssl: {verify: true}.merge(opts[:ssl] || {})
|
data/lib/koala/version.rb
CHANGED
@@ -176,9 +176,9 @@ module Koala
|
|
176
176
|
end
|
177
177
|
|
178
178
|
describe "ssl options" do
|
179
|
-
it "
|
179
|
+
it "includes the default SSL options even if there's no access token" do
|
180
180
|
request_options = Request.new(path: path, args: args.delete_if {|k, _v| k == "access_token"}, verb: verb, options: options).options
|
181
|
-
expect(request_options).
|
181
|
+
expect(request_options).to include(use_ssl: true, ssl: {verify: true})
|
182
182
|
end
|
183
183
|
|
184
184
|
context "if there is an access_token" do
|
@@ -193,9 +193,9 @@ module Koala
|
|
193
193
|
end
|
194
194
|
|
195
195
|
it "overrides default SSL options with what's provided" do
|
196
|
-
new_ssl_options = {verify: :dunno}
|
197
|
-
request_options = Request.new(path: path, args: args, verb: verb, options: options.merge(
|
198
|
-
expect(request_options
|
196
|
+
new_ssl_options = {use_ssl: false, ssl:{verify: :dunno}}
|
197
|
+
request_options = Request.new(path: path, args: args, verb: verb, options: options.merge(new_ssl_options)).options
|
198
|
+
expect(request_options).to include(new_ssl_options)
|
199
199
|
end
|
200
200
|
end
|
201
201
|
end
|
@@ -211,9 +211,17 @@ module Koala
|
|
211
211
|
expect(request.server).to eq("https://foo")
|
212
212
|
end
|
213
213
|
|
214
|
-
context "if
|
214
|
+
context "if there is no access token" do
|
215
215
|
let(:args) { {"a" => "b"} }
|
216
216
|
|
217
|
+
it "uses https" do
|
218
|
+
expect(request.server).to eq("https://graph.facebook.com")
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
context "if options[:use_ssl] is false" do
|
223
|
+
let(:options) { {use_ssl: false} }
|
224
|
+
|
217
225
|
it "uses http" do
|
218
226
|
expect(request.server).to eq("http://graph.facebook.com")
|
219
227
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: koala
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Koppel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -177,7 +177,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
|
-
rubygems_version: 3.
|
180
|
+
rubygems_version: 3.2.32
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: A lightweight, flexible library for Facebook with support for the Graph API,
|