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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1d837d5dba07f1d26178db09d1d19dca25463ed
4
- data.tar.gz: bb8d38e1f9612a4093b391f75a05a2794f58c03d
3
+ metadata.gz: 3feea27b7e635c85fad5d5ddccb2247b03da1cbb
4
+ data.tar.gz: fa326202f65dabc5de9379d6d0def3107bc3e496
5
5
  SHA512:
6
- metadata.gz: 178d8c782f0c8693e05428b6c4a4ae024cc553d1303eeaad99ff32688d1ebdf01cb636617f137f04e626e0acc64b2ff759856d2d5ad3ff6c8e5ede89916e761d
7
- data.tar.gz: 156bdd464baa75bbdb2d4dc9044066953e13fc358015c1fe41fa39d6c152db8b9d2217eb367c09cbcf996e5cb44069d94110fdd0f1393f3e8ff2613dbbc0cdfd
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', "Moonrope Ruby Library/#{MoonropeClient::VERSION}"
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
@@ -1,3 +1,3 @@
1
1
  module MoonropeClient
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
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.2
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: 2015-11-09 00:00:00.000000000 Z
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.4.5
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: