wrest 4.0.0 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +9 -1
- data/README.md +14 -4
- data/lib/wrest/components/translators/content_types.rb +2 -1
- data/lib/wrest/components/translators/html.rb +35 -0
- data/lib/wrest/components/translators.rb +1 -0
- data/lib/wrest/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37ebb90b0b3d7349da71ad4dc3cd2c1b815a98f2b72a1b6c7ff126a96763f0bd
|
4
|
+
data.tar.gz: b32f0bc7590fc0fe352036f40d9577a5ba354b525bcc2c4baa4c9377c0e4721c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 125c2eea436d4b626c53a0022ce67227537994903298924630c7ad81d185434cdefc59a0830c8665c7980254fcd9735d30f6dc04ea3e27758535be96b70c1ded
|
7
|
+
data.tar.gz: e79029a35f8d24cc4fb00c80fa1b61ae7c4e7c07210c77e04d40f89827f3854e82bfb4aa5ca757b85c756ef687cade6359d1b243bfbdb6bbd56f40047d4200e5
|
data/CHANGELOG
CHANGED
@@ -1,9 +1,17 @@
|
|
1
1
|
Features under the section marked 'Current' are completed but pending release as a gem. If you need any of these, you'll need to use the latest source from the git repository.
|
2
2
|
|
3
3
|
== Current
|
4
|
-
*
|
4
|
+
* WiP
|
5
5
|
|
6
6
|
Features under a numbered section are complete and available in the Wrest gem.
|
7
|
+
== 4.0.1
|
8
|
+
* Handle attempt to deserialize of text/html with a passthrough
|
9
|
+
|
10
|
+
== 4.0.0
|
11
|
+
* Remove runtime dependency on ActiveSupport
|
12
|
+
* Drop support for multiple xml and json backends
|
13
|
+
* Introduce Rubocop and bring codebase into compliance
|
14
|
+
* Upgrade all gem dependencies
|
7
15
|
|
8
16
|
== 2.2.0
|
9
17
|
* Add support for HTTP PATCH [Aditi Raveesh]
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Wrest 4.0.
|
1
|
+
# Wrest 4.0.1
|
2
2
|
|
3
3
|
<p align="center"><img src="docs/wrest-logo-320x320.png" width="320"></p>
|
4
4
|
<p align="center">
|
@@ -16,9 +16,21 @@
|
|
16
16
|
</a>
|
17
17
|
</p>
|
18
18
|
|
19
|
-
|
20
19
|
Wrest is a ruby REST/HTTP client library. It is currently in use at 10x🦄 scale across all Ruby/JRuby systems at [Gojek](https://twitter.com/GojekTech).
|
21
20
|
|
21
|
+
```ruby
|
22
|
+
$ gem install wrest
|
23
|
+
$ wrest # interactive shell
|
24
|
+
Ruby 3.1.2, 2022-04-12, arm64-darwin21
|
25
|
+
Loading Wrest 4.0.0
|
26
|
+
>> 'https://api2.binance.com/api/v3/ticker/24hr'.to_uri.get.deserialize
|
27
|
+
```
|
28
|
+
|
29
|
+
In your project Gemfile:
|
30
|
+
```ruby
|
31
|
+
gem 'wrest', '~> 4.0.0'
|
32
|
+
```
|
33
|
+
|
22
34
|
* Quick tool to wrangle APIs to powerful library to build complex production grade systems, Wrest does it all
|
23
35
|
* Clean, object-oriented API with URLs as first class entities
|
24
36
|
* Supports RFC 2616 based [caching](https://github.com/kaiwren/wrest/blob/caching/Caching.markdown)
|
@@ -26,8 +38,6 @@ Wrest is a ruby REST/HTTP client library. It is currently in use at 10x🦄 scal
|
|
26
38
|
* Is spec driven, strongly favours immutable objects and avoids class methods and setters making it better suited for use as a library, especially in multi-threaded environments
|
27
39
|
* Provides convenient HTTP wrappers, redirect handling, serialisation, deserialisation and xpath based lookup
|
28
40
|
|
29
|
-
Wrest is currently undergoing a substantial clean-up of syntax and dendencies to bring it up to speed on Ruby 3.x and JRuby 9.3.x. This will be released shortly as version 4.0.0.
|
30
|
-
|
31
41
|
## Examples
|
32
42
|
|
33
43
|
For Facebook, Twitter, Delicious, GitHub and other API examples, see http://github.com/kaiwren/wrest/tree/master/examples
|
@@ -18,7 +18,8 @@ module Wrest
|
|
18
18
|
'text/xml' => Wrest::Components::Translators::Xml,
|
19
19
|
'application/json' => Wrest::Components::Translators::Json,
|
20
20
|
'text/javascript' => Wrest::Components::Translators::Json,
|
21
|
-
'text/plain' => Wrest::Components::Translators::Txt
|
21
|
+
'text/plain' => Wrest::Components::Translators::Txt,
|
22
|
+
'text/html' => Wrest::Components::Translators::Html
|
22
23
|
}.freeze
|
23
24
|
end
|
24
25
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2009 Sidu Ponnappa
|
4
|
+
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
# Unless required by applicable law or agreed to in writing, software distributed under the License
|
9
|
+
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
10
|
+
# See the License for the specific language governing permissions and limitations under the License.
|
11
|
+
module Wrest
|
12
|
+
module Components
|
13
|
+
module Translators
|
14
|
+
module Html
|
15
|
+
module_function
|
16
|
+
|
17
|
+
def deserialise(response, _options = {})
|
18
|
+
response.body
|
19
|
+
end
|
20
|
+
|
21
|
+
def deserialize(response, options = {})
|
22
|
+
deserialise(response, options)
|
23
|
+
end
|
24
|
+
|
25
|
+
def serialise(hash, _options = {})
|
26
|
+
hash.inspect
|
27
|
+
end
|
28
|
+
|
29
|
+
def serialize(hash, options = {})
|
30
|
+
serialise(hash, options)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/wrest/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wrest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sidu Ponnappa
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-03-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -201,6 +201,7 @@ files:
|
|
201
201
|
- lib/wrest/components/mutators/xml_type_caster.rb
|
202
202
|
- lib/wrest/components/translators.rb
|
203
203
|
- lib/wrest/components/translators/content_types.rb
|
204
|
+
- lib/wrest/components/translators/html.rb
|
204
205
|
- lib/wrest/components/translators/json.rb
|
205
206
|
- lib/wrest/components/translators/txt.rb
|
206
207
|
- lib/wrest/components/translators/xml.rb
|
@@ -264,7 +265,7 @@ requirements:
|
|
264
265
|
- To use Redis as caching back-end, install the 'redis' gem.
|
265
266
|
- To use multipart post, install the 'multipart-post' gem.
|
266
267
|
- To use eventmachine as a parallel backend, install the 'eventmachine' gem.
|
267
|
-
rubygems_version: 3.
|
268
|
+
rubygems_version: 3.5.4
|
268
269
|
signing_key:
|
269
270
|
specification_version: 4
|
270
271
|
summary: Wrest is a fluent, object oriented HTTP client library for CRuby 2.6.x, 3.x.x
|