jahuty 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88cfffd7646bfc5849b4f45076f7dba175a65b8a5a89734e00db137dc49ee6e4
4
- data.tar.gz: 85d9a607c72e94f041adc4fe22da7309f6228f6c07b50b49a1ad3f6c768be67c
3
+ metadata.gz: a2c235fb1ce67c99a9bf584d4e899802b3c63114b91331439a3d3832b721e28e
4
+ data.tar.gz: 1c3b9ed4d76d7b7bc9ae21dc975a4ff4bad728f7a1374f1e53a12c0b5307ae19
5
5
  SHA512:
6
- metadata.gz: d0292d5ee64c8d715a9506ef3586c0bcacddacf9c5b97a384b6bc608b119152220f3eda45f6a4b35792a7aab0bfa6895db0ed747b842ab4d45d561d0bdd7a271
7
- data.tar.gz: dba24f33415884a663f959c9a8ebf7b443773b88ade368d46a2c7026c8cc1ead6b60c481b4d5fb9f4e956ba6ef2d41dbdf12b20fb9a333a4e75544cdd9c00759
6
+ metadata.gz: 1eef3b6308a8ff3f6b967840d51de4ea2281e3e144f81bdbc91009c2a81068522e50ded68c0dd20c89e070672899d26d393d371718472bd2f837e65520483677
7
+ data.tar.gz: e9e72191ea7766ab12ca962176f838f01129903bc28b7677e453a346726c5197ac1f4f225bdb85309f68d755c32adbec61a921eb0039f4582a04d9b171f071c8
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 3.1.1 - 2020-02-26
9
+
10
+ - Add support for extra, unused attributes returned by the API to support evolution.
11
+ - Fix the `method redefined` warnings in `cache/manager_spec.rb` and `cache/facade_spec.rb`.
12
+ - Fix the `expect { }.not_to raise_error(SpecificErrorClass)` false positives warnings in `resource/render_spec.rb`.
13
+
8
14
  ## 3.1.0 - 2020-01-04
9
15
 
10
16
  - Add caching support for any cache implementation that supports `get/set` or `read/write` methods.
@@ -25,7 +25,7 @@ module Jahuty
25
25
 
26
26
  payload = parse(response)
27
27
 
28
- Object.const_get(resource_class).send(:new, **payload)
28
+ Object.const_get(resource_class).send(:from, **payload)
29
29
  end
30
30
 
31
31
  private
@@ -12,6 +12,14 @@ module Jahuty
12
12
  @type = type
13
13
  @detail = detail
14
14
  end
15
+
16
+ def self.from(data)
17
+ raise ArgumentError.new, 'Key :status missing' unless data.key?(:status)
18
+ raise ArgumentError.new, 'Key :type missing' unless data.key?(:type)
19
+ raise ArgumentError.new, 'Key :detail missing' unless data.key?(:detail)
20
+
21
+ Problem.new(data.slice(:status, :type, :detail))
22
+ end
15
23
  end
16
24
  end
17
25
  end
@@ -10,6 +10,12 @@ module Jahuty
10
10
  @content = content
11
11
  end
12
12
 
13
+ def self.from(data)
14
+ raise ArgumentError.new, 'Key :content missing' unless data.key?(:content)
15
+
16
+ Render.new(data.slice(:content))
17
+ end
18
+
13
19
  def to_s
14
20
  @content
15
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jahuty
4
- VERSION = '3.1.0'
4
+ VERSION = '3.1.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jahuty
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Clayton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-09 00:00:00.000000000 Z
11
+ date: 2021-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday