moonrope-client 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moonrope_client/connection.rb +8 -1
- data/lib/moonrope_client/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3feea27b7e635c85fad5d5ddccb2247b03da1cbb
|
4
|
+
data.tar.gz: fa326202f65dabc5de9379d6d0def3107bc3e496
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 404232dd138bd72fdb9735ccb9f389a026de437d85bbd9e5f332eeecf8cd81641bb5070dc537651c8425725be3ea7696f7e9886835998ea5188ebf3bdfae797d
|
7
|
+
data.tar.gz: 69c998c287e4a2474ed05468c902e4b032073de02b5f586b969bfd7a46d3962af4f240f63c8ae16fd97e87a34d782fa19ce068a621f4b1ea37b293dadc536b01
|
@@ -53,6 +53,13 @@ module MoonropeClient
|
|
53
53
|
@options[:version] || 1
|
54
54
|
end
|
55
55
|
|
56
|
+
#
|
57
|
+
# @return [String] the User-Agent to send with the request
|
58
|
+
#
|
59
|
+
def user_agent
|
60
|
+
@options[:user_agent] || "Moonrope Ruby Library/#{MoonropeClient::VERSION}"
|
61
|
+
end
|
62
|
+
|
56
63
|
#
|
57
64
|
# Make a request and return an appropriate request object.
|
58
65
|
#
|
@@ -86,7 +93,7 @@ module MoonropeClient
|
|
86
93
|
def raw_request(path, params = {})
|
87
94
|
request = Net::HTTP::Post.new(path)
|
88
95
|
request.set_form_data(params)
|
89
|
-
request.add_field 'User-Agent',
|
96
|
+
request.add_field 'User-Agent', self.user_agent
|
90
97
|
headers.each { |k,v| request.add_field k, v }
|
91
98
|
connection = Net::HTTP.new(self.host, self.port)
|
92
99
|
if ssl
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moonrope-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Cooke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -91,8 +91,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.
|
94
|
+
rubygems_version: 2.5.1
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: A client library for the the Moonrope API server.
|
98
98
|
test_files: []
|
99
|
+
has_rdoc:
|