resterl 0.0.16 → 0.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
- SHA1:
3
- metadata.gz: 52b59fae88efaf01ddef720766197e661101b766
4
- data.tar.gz: 0c4fb0c9858c1b39068e293cf25e53a7eacb2427
2
+ SHA256:
3
+ metadata.gz: 34e6d5fb43fdcc446afac5ab06419e2632dac2bc2806a1528725d6165b492ab2
4
+ data.tar.gz: b6038c9b94e3db6134ec0de6cbc1763573c429f5c412186e59e6dd6af8de1dc2
5
5
  SHA512:
6
- metadata.gz: b2763c61b9b1ef3e9fe64e78648f1fc67748d16040e9c28163853ba6779f4e7bc03442c865c452106aba58a7b8510b0c44267aee0fbe7f6db40df928b9c2f671
7
- data.tar.gz: ac3bb5ab0e309aa16461b9c62e5fa42ff7ab8748b20203a0fae4b1e78241d831f313730fd0a1e20b4bc9dbb4f7facb4152e07b07d7a57f8589e45e5efcae2f6d
6
+ metadata.gz: c4371977339943f3a99831519bc1927724fa4b068902ccd86c2130e5566be7917d9693f0ac2fefd24ea70481f2854daaa1514d59bff59fd8464ece2fee0ea78e
7
+ data.tar.gz: 64f8c76852a4cd99e033910229f26fbb3be74e4c9162440cd5c47ccd11d7294247f19f15c414a52ff0f6289309827cf10048ade5557df08a58e67d29f450a098
data/.gitignore CHANGED
@@ -21,3 +21,8 @@ pkg
21
21
  ## PROJECT::SPECIFIC
22
22
  PRIVATE_TODO.rdoc
23
23
  nbproject
24
+
25
+ .bundle
26
+ Gemfile.lock
27
+ *.gem
28
+ pkg
data/.rubocop.yml ADDED
@@ -0,0 +1,40 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.0
3
+ Exclude:
4
+ - 'vendor/bundle/**/*'
5
+ DisplayCopNames: true
6
+ Rails:
7
+ Enabled: false
8
+ Style/Encoding:
9
+ EnforcedStyle: when_needed
10
+ Enabled: true
11
+ Style/AsciiComments:
12
+ Enabled: false
13
+ Style/Documentation:
14
+ Enabled: false
15
+ Metrics/MethodLength:
16
+ Enabled: false
17
+ Style/MethodDefParentheses:
18
+ Enabled: false
19
+ Style/MultilineOperationIndentation:
20
+ EnforcedStyle: aligned
21
+ Style/MultilineMethodCallIndentation:
22
+ EnforcedStyle: indented
23
+ Style/MultilineMethodDefinitionBraceLayout:
24
+ Enabled: true
25
+ Style/MultilineHashBraceLayout:
26
+ Enabled: true
27
+ Style/SignalException:
28
+ Enabled: false
29
+ Metrics/ClassLength:
30
+ Enabled: false
31
+ Lint/AssignmentInCondition:
32
+ Enabled: false
33
+ Metrics/ParameterLists:
34
+ Enabled: false
35
+ Style/MultilineBlockChain:
36
+ Enabled: false
37
+ Style/CommentAnnotation:
38
+ Enabled: false
39
+ Style/GuardClause:
40
+ Enabled: false
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.4
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
- source "http://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
  gemspec
@@ -1,98 +1,80 @@
1
1
  require 'hashie'
2
2
 
3
- # Idee: If-Match wäre bei .delete_object und .put_object ein interessantes
4
- # Feature.
3
+ module Resterl
4
+ class BaseObject
5
+ include ClassLevelInheritableAttributes
6
+ cattr_inheritable :resterl_client, :parser, :composer, :complete_mime_type,
7
+ :mapper
8
+ attr_reader :response
5
9
 
6
- class Resterl::BaseObject #< Hashie::Mash
10
+ def initialize data = {}, response = nil
11
+ @data = Hashie::Mash.new data
12
+ @response = response
13
+ end
7
14
 
8
- include ClassLevelInheritableAttributes
9
- cattr_inheritable :resterl_client, :parser, :composer, :complete_mime_type,
10
- :mapper
11
- attr_reader :response
15
+ def method_missing sym, *args, &block
16
+ @data.send sym, *args, &block
17
+ end
12
18
 
13
- #self.resterl_client = nil
14
- #self.complete_mime_type = 'text/plain'
19
+ def respond_to? sym, include_private = false
20
+ super || @data.respond_to?(sym, include_private)
21
+ end
15
22
 
16
- def initialize data = {}, response = nil
17
- @data = Hashie::Mash.new data
18
- @response = response
19
- end
23
+ class << self
24
+ def get_object url, params = {}
25
+ response = resterl_client.get(url, params, accept_header)
26
+ new_from_response(response)
27
+ end
20
28
 
21
- def method_missing sym, *args, &block
22
- # Vielleicht lassen sich auch feste Attribute delegieren, das wäre als
23
- # method_missing.
24
- @data.send sym, *args, &block
25
- end
29
+ def post_to_object url, params = {}, data = {}
30
+ post_put_object(:post, url, params, data)
31
+ end
26
32
 
27
- protected
33
+ def delete_object url
34
+ resterl_client.delete(url, {}, accept_header, {})
35
+ end
28
36
 
29
- def self.get_object url, params = {}
30
- headers = { 'Accept' => complete_mime_type }
31
- response = resterl_client.get(url, params, headers)
32
- doc = response.body
33
- doc = parser.call(doc)
34
- doc = mapper.map(doc) if @mapper
35
- new(doc, response)
36
- end
37
-
38
- def self.post_to_object url, params = {}, data = {}
39
- # TODO: Refactoring
37
+ def put_object url, params = {}, data = {}
38
+ post_put_object(:put, url, params, data)
39
+ end
40
40
 
41
- headers = {
42
- 'Accept' => complete_mime_type,
43
- 'Content-Type' => complete_mime_type
44
- }
45
- data = composer.call(data)
46
- response = resterl_client.post(url, params, data, headers)
47
-
48
- doc = response.body
49
- doc = parser.call(doc)
50
- doc = mapper.map(doc) if @mapper
51
- new(doc, response)
52
- end
53
-
54
- def self.delete_object url
55
- headers = {
56
- 'Accept' => complete_mime_type,
57
- }
58
- resterl_client.delete(url, {}, headers, {})
59
- # TODO: Antwort parsen?
60
- end
61
-
62
- def self.put_object url, params = {}, data
63
- # TODO: Refactoring
64
-
65
- headers = {
66
- 'Accept' => complete_mime_type,
67
- 'Content-Type' => complete_mime_type
68
- }
69
- data = composer.call(data)
70
- response = resterl_client.put(url, params, data, headers)
71
-
72
- doc = response.body
73
- doc = parser.call(doc)
74
- doc = mapper.map(doc) if @mapper
75
-
76
- # TODO: In Ordnung?
77
- new(doc, response)
78
- end
79
-
41
+ def mime_type= t
42
+ self.parser, self.composer, self.complete_mime_type =
43
+ case t
44
+ when :json
45
+ [proc { |str| JSON.parse(str) },
46
+ proc(&:to_json),
47
+ 'application/json'
48
+ ]
49
+ when :xml
50
+ [proc { |str| Hash.from_xml(str) },
51
+ proc(&:to_xml),
52
+ 'application/xml'
53
+ ]
54
+ end
55
+ end
56
+
57
+ private
80
58
 
81
- def self.mime_type= t
82
- self.parser, self.composer, self.complete_mime_type = case t
83
- when :json
84
- # TODO prio 2: Only works when Rails is loaded?
85
- [ proc {|str| JSON.parse(str)},
86
- proc(&:to_json),
87
- 'application/json'
88
- ]
89
- when :xml
90
- # TODO prio 2: Only works when Rails is loaded?
91
- [ proc {|str| Hash.from_xml(str)},
92
- proc(&:to_xml),
93
- 'application/xml'
94
- ]
59
+ def post_put_object method, url, params, data
60
+ headers = accept_header.merge(
61
+ 'Content-Type' => complete_mime_type
62
+ )
63
+ data = composer.call(data)
64
+ response = resterl_client.send(method, url, params, data, headers)
65
+ new_from_response response
66
+ end
67
+
68
+ def new_from_response response
69
+ doc = response.body
70
+ doc = parser.call(doc)
71
+ doc = mapper.map(doc) if @mapper
72
+ new(doc, response)
73
+ end
74
+
75
+ def accept_header
76
+ { 'Accept' => complete_mime_type }
77
+ end
95
78
  end
96
79
  end
97
-
98
80
  end
@@ -1,4 +1,4 @@
1
- # encoding: UTF-8
1
+ # encoding: utf-8
2
2
 
3
3
  module Resterl
4
4
  class Client
@@ -8,6 +8,8 @@ module Resterl
8
8
  cache: Resterl::Caches::SimpleCache.new,
9
9
  ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE,
10
10
  expiry_multiplier: 10,
11
+ open_timeout: 15,
12
+ read_timeout: 60,
11
13
  minimum_cache_lifetime: 5 * 60 # 5 Minuten
12
14
  }
13
15
 
@@ -70,39 +72,8 @@ module Resterl
70
72
 
71
73
  # Anfrage stellen, ggf. ETag mit übergeben
72
74
  request = Resterl::GetRequest.new(self, url, params, headers)
73
- new_response = request.perform.response
74
-
75
- response, max_age_seconds =
76
- case new_response
77
- when Net::HTTPClientError,
78
- Net::HTTPServerError
79
- # Aus dem Cache muss nichts entfernt werden,
80
- # weil ja auch kein Eintrag (mehr) drin ist.
81
- new_response.error!
82
- when Net::HTTPNotModified
83
- # Wenn "304 Not Modified", dann altes
84
- # Ergebnis als neues Ergebnis verwenden
85
- r_temp = Resterl::Response.new(new_response,
86
- options[:minimum_cache_lifetime])
87
- old_response.update_expires_at(
88
- r_temp.expires_at)
89
- [old_response, r_temp.expires_at - Time.now]
90
- when Net::HTTPSuccess
91
- r = Resterl::Response.new(new_response,
92
- options[:minimum_cache_lifetime])
93
- [r, r.expires_at - Time.now]
94
- else
95
- raise 'unknown response'
96
- end
97
-
98
- # Cachezeit berechnen
99
- expiry = [
100
- max_age_seconds.to_i * options[:expiry_multiplier],
101
- options[:minimum_cache_lifetime]
102
- ].max
103
-
104
- # Ergebnis im Cache speichern
105
- @cache.write cache_key, response, expiry
75
+ response, max_age_seconds = get_response(request, old_response)
76
+ cache_response(response, max_age_seconds, cache_key)
106
77
 
107
78
  response
108
79
  end
@@ -129,5 +100,46 @@ module Resterl
129
100
  def data_to_cache_key *args
130
101
  args.hash
131
102
  end
103
+
104
+ def get_response(request, old_response)
105
+ # Anfrage stellen, ggf. ETag mit übergeben
106
+ new_response = request.perform.response
107
+
108
+ case new_response
109
+ when Net::HTTPClientError,
110
+ Net::HTTPServerError
111
+ # Aus dem Cache muss nichts entfernt werden,
112
+ # weil ja auch kein Eintrag (mehr) drin ist.
113
+ new_response.error!
114
+ when Net::HTTPNotModified
115
+ reuse_old_response(new_response, old_response)
116
+ when Net::HTTPSuccess
117
+ r = Resterl::Response.new(new_response,
118
+ options[:minimum_cache_lifetime])
119
+ [r, r.expires_at - Time.now]
120
+ else
121
+ raise 'unknown response'
122
+ end
123
+ end
124
+
125
+ def cache_response(response, max_age_seconds, cache_key)
126
+ # Cachezeit berechnen
127
+ expiry = [
128
+ max_age_seconds.to_i * options[:expiry_multiplier],
129
+ options[:minimum_cache_lifetime]
130
+ ].max
131
+
132
+ # Ergebnis im Cache speichern
133
+ @cache.write cache_key, response, expiry
134
+ end
135
+
136
+ def reuse_old_response(new_response, old_response)
137
+ # Wenn "304 Not Modified", dann altes
138
+ # Ergebnis als neues Ergebnis verwenden
139
+ r_temp = Resterl::Response.new(new_response,
140
+ options[:minimum_cache_lifetime])
141
+ old_response.update_expires_at(r_temp.expires_at)
142
+ [old_response, r_temp.expires_at - Time.now]
143
+ end
132
144
  end
133
145
  end
@@ -1,4 +1,5 @@
1
1
  require 'active_support/core_ext/object/blank'
2
+ require 'active_support/core_ext/hash'
2
3
 
3
4
  module Resterl
4
5
  class GenericRequest
@@ -17,6 +18,7 @@ module Resterl
17
18
  def http_object_and_query_path
18
19
  uri = URI.parse(url)
19
20
  http = Net::HTTP.new(uri.host, uri.port)
21
+ apply_timeout_settings http
20
22
  apply_ssl http, uri
21
23
 
22
24
  path_with_query = uri.path
@@ -28,11 +30,7 @@ module Resterl
28
30
  end
29
31
 
30
32
  def query_param_string
31
- @query_param_string ||= begin
32
- @query_params.collect do |key, value|
33
- "#{URI.escape(key.to_s)}=#{URI.escape(value.to_s)}"
34
- end.join('&')
35
- end
33
+ @query_param_string ||= @query_params.to_query
36
34
  end
37
35
 
38
36
  def apply_basic_auth request
@@ -46,6 +44,11 @@ module Resterl
46
44
  http.verify_mode = rest_client.options[:ssl_verify_mode]
47
45
  end
48
46
 
47
+ def apply_timeout_settings http
48
+ http.open_timeout = rest_client.options[:open_timeout]
49
+ http.read_timeout = rest_client.options[:read_timeout]
50
+ end
51
+
49
52
  def redirect_url
50
53
  response['location'] || response.body.match(/<a href=\"([^>]+)\">/i)[1]
51
54
  end
@@ -1,3 +1,3 @@
1
1
  module Resterl
2
- VERSION = '0.0.16'
2
+ VERSION = '0.1.1'.freeze
3
3
  end
data/lib/resterl.rb CHANGED
@@ -2,8 +2,9 @@ require 'net/http'
2
2
  require 'net/https'
3
3
  require 'yajl/json_gem'
4
4
  ################################################################################
5
- module Resterl; end
6
- module Resterl::Caches; end
5
+ module Resterl
6
+ module Caches; end
7
+ end
7
8
  ################################################################################
8
9
  require 'resterl/class_level_inheritable_attributes'
9
10
 
@@ -23,7 +24,3 @@ require 'resterl/put_request'
23
24
  require 'resterl/delete_request'
24
25
  require 'resterl/response'
25
26
  require 'resterl/base_object'
26
-
27
- ################################################################################
28
- Net::HTTP.version_1_1 if RUBY_VERSION < '1.9.3'
29
- ################################################################################
data/resterl.gemspec CHANGED
@@ -1,25 +1,25 @@
1
1
  # encoding: utf-8
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "resterl/version"
4
-
2
+ require File.expand_path('../lib/resterl/version', __FILE__)
5
3
 
6
4
  Gem::Specification.new do |s|
7
5
  s.name = 'resterl'
8
6
  s.version = Resterl::VERSION
9
- s.authors = ["Florian Dütsch"]
10
- s.email = 'florian.duetsch@nix-wie-weg.de'
11
- s.homepage = 'http://github.com/Nix-wie-weg/resterl'
7
+ s.authors = ['Florian Dütsch', 'Stefan Hoffmann']
8
+ s.email = ['florian.duetsch@nix-wie-weg.de', 'stefan.hoffmann@nix-wie-weg.de']
9
+ s.homepage = 'https://github.com/Nix-wie-weg/resterl'
12
10
  s.summary = 'Rudimentary HTTP client with focus on caching'
13
11
  s.files = `git ls-files`.split("\n")
14
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
- s.executables = `git ls-files -- bin/*`.split("\n").map{|f|File.basename(f)}
16
- #s.require_paths = ["lib"]
12
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
13
+ s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
14
+ s.require_paths = ['lib']
15
+ s.required_ruby_version = '>= 2.0.0'
17
16
 
18
- s.add_runtime_dependency 'activesupport', '>= 2.3.18'
19
- s.add_runtime_dependency 'hashie', '~> 0.4.0'
17
+ s.add_runtime_dependency 'activesupport', '>= 3.2.0'
18
+ s.add_runtime_dependency 'hashie', '~> 3.5.7'
20
19
  s.add_runtime_dependency 'yajl-ruby', '~> 1.1'
21
- s.add_development_dependency 'rspec', '~> 3.1'
22
- s.add_development_dependency 'webmock', '~> 1.20.4'
23
- s.add_development_dependency 'timecop', '~> 0.7.1'
20
+ s.add_development_dependency 'rspec', '~> 3.7'
21
+ s.add_development_dependency 'webmock', '~> 3.4.1'
22
+ s.add_development_dependency 'timecop', '~> 0.9.1'
23
+ s.add_development_dependency 'rubocop', '~> 0.39.0'
24
24
  s.add_development_dependency 'pry'
25
25
  end
@@ -0,0 +1,23 @@
1
+ require_relative '../../spec_helper'
2
+ require 'active_support/core_ext/object/try'
3
+
4
+ describe Resterl::BaseObject do
5
+ subject { described_class.new(foo: :bar) }
6
+
7
+ context '#try from ActiveSupport' do
8
+ it 'returns a value if the key exists' do
9
+ expect(subject.try(:foo)).to eq :bar
10
+ end
11
+ it 'returns nil if the key does not exist' do
12
+ expect(subject.try(:fox)).not_to be
13
+ end
14
+ end
15
+
16
+ it { is_expected.to respond_to(:response) }
17
+ it { is_expected.to respond_to(:foo) }
18
+ it { is_expected.not_to respond_to(:fox) }
19
+
20
+ it 'supports respond_to with private methods' do
21
+ expect(subject.respond_to?(:log_built_in_message, true)).to be_truthy
22
+ end
23
+ end
@@ -4,9 +4,9 @@ require 'webmock/rspec'
4
4
  require 'timecop'
5
5
 
6
6
  describe Resterl::Client do
7
+ subject(:client) { Resterl::Client.new }
7
8
 
8
9
  describe 'minimum cache lifetime' do
9
-
10
10
  before do
11
11
  Timecop.freeze(Time.parse('2015-01-01 01:00'))
12
12
 
@@ -16,7 +16,6 @@ describe Resterl::Client do
16
16
  headers: { cache_control: 'max-age=0, private, must-revalidate' }
17
17
  ).then.to_raise('2 requests')
18
18
  end
19
- let(:client) { Resterl::Client.new }
20
19
 
21
20
  it 'is used in "max-age=0" case' do
22
21
  response = client.get 'http://www.example.com/', {}, {}
@@ -33,4 +32,12 @@ describe Resterl::Client do
33
32
  end.not_to raise_error
34
33
  end
35
34
  end
35
+
36
+ it 'encodes url params' do
37
+ stub_request(
38
+ :get, "http://www.example.com/?text=Ein%20gro%C3%9Fer%20Spa%C3%9F!"
39
+ ).to_return(status: 200, body: '', headers: {})
40
+
41
+ client.get 'http://www.example.com/', { text: 'Ein großer Spaß!' }, {}
42
+ end
36
43
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resterl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Dütsch
8
- autorequire:
8
+ - Stefan Hoffmann
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-04-15 00:00:00.000000000 Z
12
+ date: 2021-11-18 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: activesupport
@@ -16,28 +17,28 @@ dependencies:
16
17
  requirements:
17
18
  - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: 2.3.18
20
+ version: 3.2.0
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - ">="
25
26
  - !ruby/object:Gem::Version
26
- version: 2.3.18
27
+ version: 3.2.0
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: hashie
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
32
  - - "~>"
32
33
  - !ruby/object:Gem::Version
33
- version: 0.4.0
34
+ version: 3.5.7
34
35
  type: :runtime
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
39
  - - "~>"
39
40
  - !ruby/object:Gem::Version
40
- version: 0.4.0
41
+ version: 3.5.7
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: yajl-ruby
43
44
  requirement: !ruby/object:Gem::Requirement
@@ -58,42 +59,56 @@ dependencies:
58
59
  requirements:
59
60
  - - "~>"
60
61
  - !ruby/object:Gem::Version
61
- version: '3.1'
62
+ version: '3.7'
62
63
  type: :development
63
64
  prerelease: false
64
65
  version_requirements: !ruby/object:Gem::Requirement
65
66
  requirements:
66
67
  - - "~>"
67
68
  - !ruby/object:Gem::Version
68
- version: '3.1'
69
+ version: '3.7'
69
70
  - !ruby/object:Gem::Dependency
70
71
  name: webmock
71
72
  requirement: !ruby/object:Gem::Requirement
72
73
  requirements:
73
74
  - - "~>"
74
75
  - !ruby/object:Gem::Version
75
- version: 1.20.4
76
+ version: 3.4.1
76
77
  type: :development
77
78
  prerelease: false
78
79
  version_requirements: !ruby/object:Gem::Requirement
79
80
  requirements:
80
81
  - - "~>"
81
82
  - !ruby/object:Gem::Version
82
- version: 1.20.4
83
+ version: 3.4.1
83
84
  - !ruby/object:Gem::Dependency
84
85
  name: timecop
85
86
  requirement: !ruby/object:Gem::Requirement
86
87
  requirements:
87
88
  - - "~>"
88
89
  - !ruby/object:Gem::Version
89
- version: 0.7.1
90
+ version: 0.9.1
90
91
  type: :development
91
92
  prerelease: false
92
93
  version_requirements: !ruby/object:Gem::Requirement
93
94
  requirements:
94
95
  - - "~>"
95
96
  - !ruby/object:Gem::Version
96
- version: 0.7.1
97
+ version: 0.9.1
98
+ - !ruby/object:Gem::Dependency
99
+ name: rubocop
100
+ requirement: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - "~>"
103
+ - !ruby/object:Gem::Version
104
+ version: 0.39.0
105
+ type: :development
106
+ prerelease: false
107
+ version_requirements: !ruby/object:Gem::Requirement
108
+ requirements:
109
+ - - "~>"
110
+ - !ruby/object:Gem::Version
111
+ version: 0.39.0
97
112
  - !ruby/object:Gem::Dependency
98
113
  name: pry
99
114
  requirement: !ruby/object:Gem::Requirement
@@ -108,19 +123,22 @@ dependencies:
108
123
  - - ">="
109
124
  - !ruby/object:Gem::Version
110
125
  version: '0'
111
- description:
112
- email: florian.duetsch@nix-wie-weg.de
126
+ description:
127
+ email:
128
+ - florian.duetsch@nix-wie-weg.de
129
+ - stefan.hoffmann@nix-wie-weg.de
113
130
  executables: []
114
131
  extensions: []
115
132
  extra_rdoc_files: []
116
133
  files:
117
134
  - ".document"
118
135
  - ".gitignore"
136
+ - ".rubocop.yml"
137
+ - ".ruby-version"
119
138
  - Gemfile
120
139
  - LICENSE
121
140
  - README.rdoc
122
141
  - Rakefile
123
- - TODO.rdoc
124
142
  - lib/resterl.rb
125
143
  - lib/resterl/base_object.rb
126
144
  - lib/resterl/caches/cache_interface.rb
@@ -139,12 +157,13 @@ files:
139
157
  - lib/resterl/response.rb
140
158
  - lib/resterl/version.rb
141
159
  - resterl.gemspec
142
- - spec/lib/resterl/client.rb
160
+ - spec/lib/resterl/base_object_spec.rb
161
+ - spec/lib/resterl/client_spec.rb
143
162
  - spec/spec_helper.rb
144
- homepage: http://github.com/Nix-wie-weg/resterl
163
+ homepage: https://github.com/Nix-wie-weg/resterl
145
164
  licenses: []
146
165
  metadata: {}
147
- post_install_message:
166
+ post_install_message:
148
167
  rdoc_options: []
149
168
  require_paths:
150
169
  - lib
@@ -152,19 +171,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
152
171
  requirements:
153
172
  - - ">="
154
173
  - !ruby/object:Gem::Version
155
- version: '0'
174
+ version: 2.0.0
156
175
  required_rubygems_version: !ruby/object:Gem::Requirement
157
176
  requirements:
158
177
  - - ">="
159
178
  - !ruby/object:Gem::Version
160
179
  version: '0'
161
180
  requirements: []
162
- rubyforge_project:
163
- rubygems_version: 2.4.2
164
- signing_key:
181
+ rubygems_version: 3.1.6
182
+ signing_key:
165
183
  specification_version: 4
166
184
  summary: Rudimentary HTTP client with focus on caching
167
185
  test_files:
168
- - spec/lib/resterl/client.rb
186
+ - spec/lib/resterl/base_object_spec.rb
187
+ - spec/lib/resterl/client_spec.rb
169
188
  - spec/spec_helper.rb
170
- has_rdoc:
data/TODO.rdoc DELETED
@@ -1,7 +0,0 @@
1
- * Edit README.rdoc
2
- * Tests!
3
- * Use technoweenie's faraday as base (http://github.com/technoweenie/faraday)
4
- * Secure caching with tests
5
- * Store parsed objects in cache (instead of the plain response)
6
- * Persistent connections
7
- * Documentation