socialcast-rapuncel 0.0.7.RC1 → 0.0.7.RC2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +9 -5
- data/lib/rapuncel/adapters/curb_adapter.rb +1 -0
- data/lib/rapuncel/connection.rb +26 -12
- data/rapuncel.gemspec +1 -1
- metadata +38 -15
- data/rapuncel-0.0.6.RC3.gem +0 -0
data/Gemfile.lock
CHANGED
@@ -1,18 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rapuncel (0.0.
|
4
|
+
socialcast-rapuncel (0.0.7.RC2)
|
5
5
|
activesupport (>= 3.0.0)
|
6
|
+
cookiejar (~> 0.3.0)
|
6
7
|
nokogiri
|
7
8
|
|
8
9
|
GEM
|
9
10
|
remote: http://www.rubygems.org/
|
10
11
|
specs:
|
11
|
-
activesupport (3.
|
12
|
+
activesupport (3.2.12)
|
13
|
+
i18n (~> 0.6)
|
12
14
|
multi_json (~> 1.0)
|
15
|
+
cookiejar (0.3.0)
|
13
16
|
diff-lcs (1.1.2)
|
14
|
-
|
15
|
-
|
17
|
+
i18n (0.6.4)
|
18
|
+
multi_json (1.6.1)
|
19
|
+
nokogiri (1.5.6)
|
16
20
|
rake (0.9.2)
|
17
21
|
rspec (2.6.0)
|
18
22
|
rspec-core (~> 2.6.0)
|
@@ -28,5 +32,5 @@ PLATFORMS
|
|
28
32
|
|
29
33
|
DEPENDENCIES
|
30
34
|
rake
|
31
|
-
rapuncel!
|
32
35
|
rspec (>= 2.6.0)
|
36
|
+
socialcast-rapuncel!
|
@@ -26,6 +26,7 @@ module Rapuncel
|
|
26
26
|
def send_method_call str
|
27
27
|
@curb ||= Curl::Easy.new "#{connection.protocol}://#{connection.host}:#{connection.port}#{connection.path}"
|
28
28
|
|
29
|
+
@curb.ssl_version = connection.ssl_version
|
29
30
|
if connection.auth?
|
30
31
|
@curb.username = connection.user
|
31
32
|
@curb.password = connection.password
|
data/lib/rapuncel/connection.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Rapuncel
|
2
2
|
class Connection
|
3
|
-
attr_accessor :host, :port, :path, :ssl, :user, :password, :cookie_file_path
|
3
|
+
attr_accessor :host, :port, :path, :ssl, :user, :password, :cookie_file_path, :ssl_version
|
4
4
|
alias_method :ssl?, :ssl
|
5
5
|
|
6
6
|
def initialize configuration = {}
|
@@ -10,25 +10,25 @@ module Rapuncel
|
|
10
10
|
def url
|
11
11
|
"#{protocol}://#{host}:#{port}#{path}"
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def host= value
|
15
15
|
@host = value.to_s.sub /^http(s)?\:\/\//, ''
|
16
|
-
|
16
|
+
|
17
17
|
if $1 == 's'
|
18
18
|
@ssl = true
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
@host
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
def path= value
|
25
25
|
unless value =~ /^\//
|
26
26
|
value = "/" + value
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
@path = value
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
32
|
def headers= headers
|
33
33
|
@headers = {
|
34
34
|
'User-Agent' => 'Rapuncel, Ruby XMLRPC Client'
|
@@ -38,20 +38,33 @@ module Rapuncel
|
|
38
38
|
def headers
|
39
39
|
@headers.merge 'Accept' => 'text/xml', 'content-type' => 'text/xml'
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
42
|
def protocol
|
43
43
|
ssl? ? 'https' : 'http'
|
44
44
|
end
|
45
45
|
alias_method :scheme, :protocol
|
46
|
-
|
46
|
+
|
47
47
|
def auth?
|
48
48
|
!!user && !!password
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
|
+
def ssl_version
|
52
|
+
case @ssl_version
|
53
|
+
when 'tslv1'
|
54
|
+
Curl::CURL_SSLVERSION_TLSv1
|
55
|
+
when 'sslv2'
|
56
|
+
Curl::CURL_SSLVERSION::SSLv2
|
57
|
+
when 'sslv3'
|
58
|
+
Curl::CURL_SSLVERSION_SSLv3
|
59
|
+
else
|
60
|
+
Curl::CURL_SSLVERSION_DEFAULT
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
51
64
|
protected
|
52
65
|
def load_configuration configuration
|
53
66
|
configuration = configuration.symbolize_keys
|
54
|
-
|
67
|
+
|
55
68
|
self.ssl = !!configuration[:ssl]
|
56
69
|
self.host = configuration[:host] || 'localhost'
|
57
70
|
self.port = configuration[:port] || '8080'
|
@@ -60,6 +73,7 @@ module Rapuncel
|
|
60
73
|
self.user = configuration[:user]
|
61
74
|
self.password = configuration[:password]
|
62
75
|
self.cookie_file_path = configuration[:cookie_file_path]
|
76
|
+
self.ssl_version = configuration[:ssl_version]
|
63
77
|
end
|
64
78
|
end
|
65
|
-
end
|
79
|
+
end
|
data/rapuncel.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socialcast-rapuncel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.7.
|
4
|
+
version: 0.0.7.RC2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2013-03-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: nokogiri
|
17
|
-
requirement:
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,15 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements:
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
26
31
|
- !ruby/object:Gem::Dependency
|
27
32
|
name: activesupport
|
28
|
-
requirement:
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
29
34
|
none: false
|
30
35
|
requirements:
|
31
36
|
- - ! '>='
|
@@ -33,10 +38,15 @@ dependencies:
|
|
33
38
|
version: 3.0.0
|
34
39
|
type: :runtime
|
35
40
|
prerelease: false
|
36
|
-
version_requirements:
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 3.0.0
|
37
47
|
- !ruby/object:Gem::Dependency
|
38
48
|
name: cookiejar
|
39
|
-
requirement:
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
40
50
|
none: false
|
41
51
|
requirements:
|
42
52
|
- - ~>
|
@@ -44,10 +54,15 @@ dependencies:
|
|
44
54
|
version: 0.3.0
|
45
55
|
type: :runtime
|
46
56
|
prerelease: false
|
47
|
-
version_requirements:
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ~>
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 0.3.0
|
48
63
|
- !ruby/object:Gem::Dependency
|
49
64
|
name: rspec
|
50
|
-
requirement:
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
51
66
|
none: false
|
52
67
|
requirements:
|
53
68
|
- - ! '>='
|
@@ -55,10 +70,15 @@ dependencies:
|
|
55
70
|
version: 2.6.0
|
56
71
|
type: :development
|
57
72
|
prerelease: false
|
58
|
-
version_requirements:
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 2.6.0
|
59
79
|
- !ruby/object:Gem::Dependency
|
60
80
|
name: rake
|
61
|
-
requirement:
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
62
82
|
none: false
|
63
83
|
requirements:
|
64
84
|
- - ! '>='
|
@@ -66,7 +86,12 @@ dependencies:
|
|
66
86
|
version: '0'
|
67
87
|
type: :development
|
68
88
|
prerelease: false
|
69
|
-
version_requirements:
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
70
95
|
description: Rapuncel is a simple XML-RPC Client based on Nokogiri, thus provides
|
71
96
|
a fast and easy way to interact with XML-RPC services.
|
72
97
|
email: marian@cice-online.net
|
@@ -90,10 +115,8 @@ files:
|
|
90
115
|
- lib/rapuncel.rb
|
91
116
|
- MIT-LICENSE
|
92
117
|
- Rakefile
|
93
|
-
- rapuncel-0.0.6.RC3.gem
|
94
118
|
- rapuncel.gemspec
|
95
119
|
- README.md
|
96
|
-
- socialcast-rapuncel-0.0.7.RC1.gem
|
97
120
|
- spec/functional/client_spec.rb
|
98
121
|
- spec/spec_helper.rb
|
99
122
|
- spec/test_server.rb
|
@@ -133,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
156
|
version: 1.3.1
|
134
157
|
requirements: []
|
135
158
|
rubyforge_project:
|
136
|
-
rubygems_version: 1.8.
|
159
|
+
rubygems_version: 1.8.25
|
137
160
|
signing_key:
|
138
161
|
specification_version: 3
|
139
162
|
summary: Simple XML-RPC Client
|
data/rapuncel-0.0.6.RC3.gem
DELETED
Binary file
|