wrest 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/README.md +2 -2
- data/lib/wrest/async_request/thread_pool.rb +1 -1
- data/lib/wrest/cache_proxy.rb +2 -2
- data/lib/wrest/caching/redis.rb +7 -6
- data/lib/wrest/native/response.rb +1 -1
- data/lib/wrest/version.rb +1 -1
- metadata +39 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f71da147141bb3c77dc79fa46d7b5560f526d958
|
4
|
+
data.tar.gz: f812789b289ee63449e78eb4c12ee68d0a0d2aba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e6c8ca1e11f7e892bb305faf34925b1000fcf732b3a28be106697cce211a716eb409c9cc94c0fc96cab78adf71a109cb769ae8cbdb14263f6f19da190a5c5ae
|
7
|
+
data.tar.gz: a5a9d2212a01ba5a5334e17233ce3188759e05dcc46c92ba154aec9bea0793b0ad397bf589ca0d9f53f81c34cd57f0fa87de388d5de7ed5107f9f2a5b91d6a7b
|
data/CHANGELOG
CHANGED
@@ -2,6 +2,9 @@ Features under the section marked 'Current' are completed but pending release as
|
|
2
2
|
|
3
3
|
Features under a numbered section are complete and available in the Wrest gem.
|
4
4
|
|
5
|
+
== 2.1.2
|
6
|
+
* Setting cache keys as URI strings
|
7
|
+
|
5
8
|
== 2.1.1
|
6
9
|
* Including Redis as a Caching Backend
|
7
10
|
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
[![Build Status](https://travis-ci.org/c42/wrest.svg?branch=master)](https://travis-ci.org/c42/wrest)
|
2
2
|
|
3
|
-
# Wrest 2.1.
|
3
|
+
# Wrest 2.1.3
|
4
4
|
|
5
|
-
(c) Copyright 2009-
|
5
|
+
(c) Copyright 2009-2016 [Sidu Ponnappa](http://twitter.com/ponnappa). All Rights Reserved.
|
6
6
|
|
7
7
|
Wrest is a ruby REST/HTTP client library which
|
8
8
|
|
data/lib/wrest/cache_proxy.rb
CHANGED
@@ -40,7 +40,7 @@ module Wrest
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def get
|
43
|
-
cached_response = @cache_store[@get.
|
43
|
+
cached_response = @cache_store[@get.uri.to_s]
|
44
44
|
return get_fresh_response if cached_response.nil?
|
45
45
|
|
46
46
|
if cached_response.expired?
|
@@ -61,7 +61,7 @@ module Wrest
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def cache(response)
|
64
|
-
@cache_store[@get.
|
64
|
+
@cache_store[@get.uri.uri_string] = response.clone if response && response.cacheable?
|
65
65
|
end
|
66
66
|
|
67
67
|
#:nodoc:
|
data/lib/wrest/caching/redis.rb
CHANGED
@@ -21,16 +21,17 @@ module Wrest::Caching
|
|
21
21
|
unmarshalled_value
|
22
22
|
end
|
23
23
|
|
24
|
-
def []=(key,
|
25
|
-
|
26
|
-
@redis.set(key,
|
24
|
+
def []=(key, response)
|
25
|
+
marshalled_response = YAML::dump(response)
|
26
|
+
@redis.set(key, marshalled_response)
|
27
|
+
unless response.expired?
|
28
|
+
@redis.expire(key, response.freshness_lifetime)
|
29
|
+
end
|
27
30
|
end
|
28
|
-
|
31
|
+
|
29
32
|
def delete(key)
|
30
33
|
value = self[key]
|
31
|
-
|
32
34
|
@redis.del(key)
|
33
|
-
|
34
35
|
return value
|
35
36
|
end
|
36
37
|
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: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sidu Ponnappa
|
@@ -9,90 +9,90 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-02-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '3.3'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '3.3'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: sinatra
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 1.0.0
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 1.0.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: metric_fu
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: activesupport
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '4'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - ~>
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '4'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: builder
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">"
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '2.0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">"
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '2.0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: multi_json
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - ~>
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '1.0'
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - ~>
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '1.0'
|
98
98
|
description: Wrest is a fluent, easy-to-use, object oriented Ruby HTTP/REST client
|
@@ -106,43 +106,48 @@ extensions: []
|
|
106
106
|
extra_rdoc_files:
|
107
107
|
- README.md
|
108
108
|
files:
|
109
|
+
- CHANGELOG
|
110
|
+
- LICENCE
|
111
|
+
- README.md
|
109
112
|
- bin/wrest
|
110
113
|
- bin/wrest_shell.rb
|
114
|
+
- lib/wrest.rb
|
115
|
+
- lib/wrest/async_request.rb
|
111
116
|
- lib/wrest/async_request/event_machine_backend.rb
|
112
117
|
- lib/wrest/async_request/thread_backend.rb
|
113
118
|
- lib/wrest/async_request/thread_pool.rb
|
114
|
-
- lib/wrest/async_request.rb
|
115
119
|
- lib/wrest/cache_proxy.rb
|
120
|
+
- lib/wrest/caching.rb
|
116
121
|
- lib/wrest/caching/memcached.rb
|
117
122
|
- lib/wrest/caching/redis.rb
|
118
|
-
- lib/wrest/caching.rb
|
119
123
|
- lib/wrest/callback.rb
|
124
|
+
- lib/wrest/components.rb
|
125
|
+
- lib/wrest/components/container.rb
|
120
126
|
- lib/wrest/components/container/alias_accessors.rb
|
121
127
|
- lib/wrest/components/container/typecaster.rb
|
122
|
-
- lib/wrest/components/
|
128
|
+
- lib/wrest/components/mutators.rb
|
123
129
|
- lib/wrest/components/mutators/base.rb
|
124
130
|
- lib/wrest/components/mutators/camel_to_snake_case.rb
|
125
131
|
- lib/wrest/components/mutators/xml_mini_type_caster.rb
|
126
132
|
- lib/wrest/components/mutators/xml_simple_type_caster.rb
|
127
|
-
- lib/wrest/components/
|
133
|
+
- lib/wrest/components/translators.rb
|
128
134
|
- lib/wrest/components/translators/content_types.rb
|
129
135
|
- lib/wrest/components/translators/json.rb
|
130
136
|
- lib/wrest/components/translators/txt.rb
|
131
137
|
- lib/wrest/components/translators/xml.rb
|
132
|
-
- lib/wrest/components/translators.rb
|
133
|
-
- lib/wrest/components.rb
|
134
|
-
- lib/wrest/core_ext/hash/conversions.rb
|
135
138
|
- lib/wrest/core_ext/hash.rb
|
136
|
-
- lib/wrest/core_ext/
|
139
|
+
- lib/wrest/core_ext/hash/conversions.rb
|
137
140
|
- lib/wrest/core_ext/string.rb
|
141
|
+
- lib/wrest/core_ext/string/conversions.rb
|
138
142
|
- lib/wrest/exceptions.rb
|
139
143
|
- lib/wrest/hash_with_case_insensitive_access.rb
|
140
144
|
- lib/wrest/http_codes.rb
|
145
|
+
- lib/wrest/http_shared.rb
|
141
146
|
- lib/wrest/http_shared/headers.rb
|
142
147
|
- lib/wrest/http_shared/standard_headers.rb
|
143
148
|
- lib/wrest/http_shared/standard_tokens.rb
|
144
|
-
- lib/wrest/http_shared.rb
|
145
149
|
- lib/wrest/multipart.rb
|
150
|
+
- lib/wrest/native.rb
|
146
151
|
- lib/wrest/native/connection_factory.rb
|
147
152
|
- lib/wrest/native/delete.rb
|
148
153
|
- lib/wrest/native/get.rb
|
@@ -155,43 +160,38 @@ files:
|
|
155
160
|
- lib/wrest/native/request.rb
|
156
161
|
- lib/wrest/native/response.rb
|
157
162
|
- lib/wrest/native/session.rb
|
158
|
-
- lib/wrest/native.rb
|
159
|
-
- lib/wrest/test/request_patches.rb
|
160
163
|
- lib/wrest/test.rb
|
161
|
-
- lib/wrest/
|
164
|
+
- lib/wrest/test/request_patches.rb
|
162
165
|
- lib/wrest/uri.rb
|
166
|
+
- lib/wrest/uri/builders.rb
|
163
167
|
- lib/wrest/uri_template.rb
|
164
168
|
- lib/wrest/version.rb
|
165
|
-
- lib/wrest/xml_mini
|
169
|
+
- lib/wrest/xml_mini.rb
|
166
170
|
- lib/wrest/xml_mini/jdom.rb
|
167
|
-
- lib/wrest/xml_mini/
|
171
|
+
- lib/wrest/xml_mini/jdom/xpath_filter.rb
|
168
172
|
- lib/wrest/xml_mini/libxml.rb
|
169
|
-
- lib/wrest/xml_mini/
|
173
|
+
- lib/wrest/xml_mini/libxml/xpath_filter.rb
|
170
174
|
- lib/wrest/xml_mini/nokogiri.rb
|
171
|
-
- lib/wrest/xml_mini/
|
175
|
+
- lib/wrest/xml_mini/nokogiri/xpath_filter.rb
|
172
176
|
- lib/wrest/xml_mini/rexml.rb
|
173
|
-
- lib/wrest/xml_mini.rb
|
174
|
-
- lib/wrest.rb
|
177
|
+
- lib/wrest/xml_mini/rexml/xpath_filter.rb
|
175
178
|
- lib/wrest_no_ext.rb
|
176
|
-
- README.md
|
177
|
-
- CHANGELOG
|
178
|
-
- LICENCE
|
179
179
|
homepage: http://c42.in/open_source
|
180
180
|
licenses: []
|
181
181
|
metadata: {}
|
182
182
|
post_install_message:
|
183
183
|
rdoc_options:
|
184
|
-
- --charset=UTF-8
|
184
|
+
- "--charset=UTF-8"
|
185
185
|
require_paths:
|
186
186
|
- lib
|
187
187
|
required_ruby_version: !ruby/object:Gem::Requirement
|
188
188
|
requirements:
|
189
|
-
- -
|
189
|
+
- - ">="
|
190
190
|
- !ruby/object:Gem::Version
|
191
191
|
version: '0'
|
192
192
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
193
|
requirements:
|
194
|
-
- -
|
194
|
+
- - ">="
|
195
195
|
- !ruby/object:Gem::Version
|
196
196
|
version: 1.3.0
|
197
197
|
requirements:
|
@@ -201,7 +201,7 @@ requirements:
|
|
201
201
|
(and should be unneccessary) on jruby.
|
202
202
|
- To use eventmachine as a parallel backend, install the 'eventmachine' gem.
|
203
203
|
rubyforge_project: wrest
|
204
|
-
rubygems_version: 2.
|
204
|
+
rubygems_version: 2.4.5.1
|
205
205
|
signing_key:
|
206
206
|
specification_version: 4
|
207
207
|
summary: Wrest is a fluent, object oriented HTTP client library for 2.x.x, JRuby 1.7.6
|