sawyer 0.8.2 → 0.9.2

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: 23f3bc01fedbd455c77a935f6f4de0a6adb6e743d9b6403c92e8d756bd737527
4
- data.tar.gz: fd376d24589522cdc89fcedf39e1d8ad122625ad81565eb99386280eb7c6d925
3
+ metadata.gz: 93fd70e92dbde52d2fca8638b8ac073fa959bee9d55164458acc8d8ffda40efb
4
+ data.tar.gz: 36a3e20d2d434fb0fd76be43f42b9a732d27a9bb21e80a9eeb8e4b51f003e2e9
5
5
  SHA512:
6
- metadata.gz: 1d4fa7381c4264398dc288cff790cba84fee46e473cf5062b72804662c1a17641dffc83c453110abfd4ca4d8b1427b49d9eadf5dcb9e747b8aaa1a4e3519392b
7
- data.tar.gz: 8b2dd59f0110e5e1c93ff5a0d4fd7455da7470875351df1757d585cf70b3287164e882e39041af6020ec2bef23f7a69d57764e1227101618e05a52c4fa18c922
6
+ metadata.gz: 3a8d00e32c35c4ef4ff5eddc828f055f2ccca4d3fa93077ae0998d7a26f562c49d543d2a3c6cb1690a50f0ec2ee14bb9037c08d013b044b3b3be38f2f8aa1b95
7
+ data.tar.gz: 3398b297bdc14fcf605b09cc2ad8de49b590c055019586c3f9d02bed8fbb0124c09e908fdd718325a53c0d6fee9a84a4b283ba527d9b0f1813315447e891de00
data/Gemfile CHANGED
@@ -1,8 +1,13 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
- gem 'rake'
4
+
5
+ gem "rake"
5
6
 
6
7
  group :test do
7
8
  gem "minitest"
8
9
  end
10
+
11
+ install_if -> { ENV["FARADAY_VERSION"] } do
12
+ gem "faraday", ENV["FARADAY_VERSION"]
13
+ end
data/lib/sawyer/agent.rb CHANGED
@@ -48,6 +48,11 @@ module Sawyer
48
48
  yield @conn if block_given?
49
49
  end
50
50
 
51
+ # Public: Close the underlying connection.
52
+ def close
53
+ @conn.close if @conn.respond_to?(:close)
54
+ end
55
+
51
56
  # Public: Retains a reference to the root relations of the API.
52
57
  #
53
58
  # Returns a Sawyer::Relation::Map.
@@ -1,9 +1,12 @@
1
+ require 'forwardable'
2
+
1
3
  module Sawyer
2
4
  class Resource
3
5
  SPECIAL_METHODS = Set.new(%w(agent rels fields))
4
6
  attr_reader :_agent, :_rels, :_fields
5
7
  attr_reader :attrs
6
8
  include Enumerable
9
+ extend Forwardable
7
10
 
8
11
  # Initializes a Resource with the given data.
9
12
  #
@@ -69,6 +72,8 @@ module Sawyer
69
72
  nil
70
73
  end
71
74
 
75
+ def_delegators :attrs, :dig, :fetch
76
+
72
77
  ATTR_SETTER = '='.freeze
73
78
  ATTR_PREDICATE = '?'.freeze
74
79
 
data/lib/sawyer.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Sawyer
2
- VERSION = "0.8.2"
2
+ VERSION = "0.9.2"
3
3
 
4
4
  class Error < StandardError; end
5
5
  end
data/sawyer.gemspec CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.homepage = 'https://github.com/lostisland/sawyer'
18
18
  spec.licenses = ['MIT']
19
19
 
20
- spec.add_dependency 'faraday', ['> 0.8', '< 2.0']
20
+ spec.add_dependency 'faraday', '>= 0.17.3', '< 3'
21
21
  spec.add_dependency 'addressable', ['>= 2.3.5']
22
22
 
23
23
  spec.files = %w(Gemfile LICENSE.md README.md Rakefile)
metadata CHANGED
@@ -1,36 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sawyer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Olson
8
8
  - Wynn Netherland
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-05-01 00:00:00.000000000 Z
12
+ date: 2022-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '0.8'
20
+ version: 0.17.3
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '2.0'
23
+ version: '3'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
- - - ">"
28
+ - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: '0.8'
30
+ version: 0.17.3
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '3'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: addressable
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -45,7 +45,7 @@ dependencies:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.3.5
48
- description:
48
+ description:
49
49
  email: technoweenie@gmail.com
50
50
  executables: []
51
51
  extensions: []
@@ -73,7 +73,7 @@ homepage: https://github.com/lostisland/sawyer
73
73
  licenses:
74
74
  - MIT
75
75
  metadata: {}
76
- post_install_message:
76
+ post_install_message:
77
77
  rdoc_options: []
78
78
  require_paths:
79
79
  - lib
@@ -88,9 +88,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  - !ruby/object:Gem::Version
89
89
  version: 1.3.5
90
90
  requirements: []
91
- rubyforge_project:
92
- rubygems_version: 2.7.6
93
- signing_key:
91
+ rubygems_version: 3.0.9
92
+ signing_key:
94
93
  specification_version: 2
95
94
  summary: Secret User Agent of HTTP
96
95
  test_files: []