activeresource 6.1.0 → 6.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_resource/base.rb +3 -4
- data/lib/active_resource/connection.rb +4 -5
- data/lib/active_resource/version.rb +1 -1
- data/lib/active_resource.rb +4 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95f17d4e9c32ac07705fd268b64bc8d2dbdff491b948c87339ab8b7bd054163e
|
4
|
+
data.tar.gz: 9b7ec268d567d641a25608f31d29e8a5675c8436b89448eaecd7a1e179dff587
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 789a6c7d3dd6044c806e8496ebcdf422f0c8c21e64dc42d6e0352781b96070b8f190b0a42ce8171f920bd9d1057969f4599ef150c7be334da59e89c2d4ac10fb
|
7
|
+
data.tar.gz: 29df5673ea2374cfa8a282b47bce5ca4d800744add388ddd8baaab0d3fd157a835361049213b4640aeac5697a86b94247c407c1b19dcedd552c4d77bb15fa6bc
|
data/lib/active_resource/base.rb
CHANGED
@@ -11,7 +11,6 @@ require "active_support/core_ext/object/blank"
|
|
11
11
|
require "active_support/core_ext/object/to_query"
|
12
12
|
require "active_support/core_ext/object/duplicable"
|
13
13
|
require "set"
|
14
|
-
require "uri"
|
15
14
|
|
16
15
|
require "active_resource/connection"
|
17
16
|
require "active_resource/formats"
|
@@ -490,8 +489,8 @@ module ActiveResource
|
|
490
489
|
self._site = nil
|
491
490
|
else
|
492
491
|
self._site = create_site_uri_from(site)
|
493
|
-
self._user =
|
494
|
-
self._password =
|
492
|
+
self._user = URI_PARSER.unescape(_site.user) if _site.user
|
493
|
+
self._password = URI_PARSER.unescape(_site.password) if _site.password
|
495
494
|
end
|
496
495
|
end
|
497
496
|
|
@@ -750,7 +749,7 @@ module ActiveResource
|
|
750
749
|
# Default value is <tt>site.path</tt>.
|
751
750
|
def prefix=(value = "/")
|
752
751
|
# Replace :placeholders with '#{embedded options[:lookups]}'
|
753
|
-
prefix_call = value.gsub(/:\w+/) { |key| "\#{
|
752
|
+
prefix_call = value.gsub(/:\w+/) { |key| "\#{URI_PARSER.escape options[#{key}].to_s}" }
|
754
753
|
|
755
754
|
# Clear prefix parameters in case they have been cached
|
756
755
|
@prefix_parameters = nil
|
@@ -5,7 +5,6 @@ require "active_support/core_ext/object/inclusion"
|
|
5
5
|
require "net/https"
|
6
6
|
require "date"
|
7
7
|
require "time"
|
8
|
-
require "uri"
|
9
8
|
|
10
9
|
module ActiveResource
|
11
10
|
# Class to handle connections to remote web services.
|
@@ -43,8 +42,8 @@ module ActiveResource
|
|
43
42
|
def site=(site)
|
44
43
|
@site = site.is_a?(URI) ? site : URI.parse(site)
|
45
44
|
@ssl_options ||= {} if @site.is_a?(URI::HTTPS)
|
46
|
-
@user =
|
47
|
-
@password =
|
45
|
+
@user = URI_PARSER.unescape(@site.user) if @site.user
|
46
|
+
@password = URI_PARSER.unescape(@site.password) if @site.password
|
48
47
|
end
|
49
48
|
|
50
49
|
# Set the proxy for remote service.
|
@@ -173,8 +172,8 @@ module ActiveResource
|
|
173
172
|
|
174
173
|
def new_http
|
175
174
|
if @proxy
|
176
|
-
user =
|
177
|
-
password =
|
175
|
+
user = URI_PARSER.unescape(@proxy.user) if @proxy.user
|
176
|
+
password = URI_PARSER.unescape(@proxy.password) if @proxy.password
|
178
177
|
Net::HTTP.new(@site.host, @site.port, @proxy.host, @proxy.port, user, password)
|
179
178
|
else
|
180
179
|
Net::HTTP.new(@site.host, @site.port)
|
data/lib/active_resource.rb
CHANGED
@@ -23,6 +23,8 @@
|
|
23
23
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
24
24
|
#++
|
25
25
|
|
26
|
+
require "uri"
|
27
|
+
|
26
28
|
require "active_support"
|
27
29
|
require "active_model"
|
28
30
|
require "active_resource/exceptions"
|
@@ -31,6 +33,8 @@ require "active_resource/version"
|
|
31
33
|
module ActiveResource
|
32
34
|
extend ActiveSupport::Autoload
|
33
35
|
|
36
|
+
URI_PARSER = defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::RFC2396_Parser.new
|
37
|
+
|
34
38
|
autoload :Base
|
35
39
|
autoload :Callbacks
|
36
40
|
autoload :Connection
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeresource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Heinemeier Hansson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -135,11 +135,11 @@ licenses:
|
|
135
135
|
- MIT
|
136
136
|
metadata:
|
137
137
|
bug_tracker_uri: https://github.com/rails/activeresource/issues
|
138
|
-
changelog_uri: https://github.com/rails/activeresource/releases/tag/v6.1.
|
138
|
+
changelog_uri: https://github.com/rails/activeresource/releases/tag/v6.1.1
|
139
139
|
documentation_uri: http://rubydoc.info/gems/activeresource
|
140
|
-
source_code_uri: https://github.com/rails/activeresource/tree/v6.1.
|
140
|
+
source_code_uri: https://github.com/rails/activeresource/tree/v6.1.1
|
141
141
|
rubygems_mfa_required: 'true'
|
142
|
-
post_install_message:
|
142
|
+
post_install_message:
|
143
143
|
rdoc_options: []
|
144
144
|
require_paths:
|
145
145
|
- lib
|
@@ -154,8 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
- !ruby/object:Gem::Version
|
155
155
|
version: '0'
|
156
156
|
requirements: []
|
157
|
-
rubygems_version: 3.
|
158
|
-
signing_key:
|
157
|
+
rubygems_version: 3.5.11
|
158
|
+
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: REST modeling framework (part of Rails).
|
161
161
|
test_files: []
|