mprofi_api_client 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 9fc957c0eb9e44d069f8c3d1a8744c3837b658a83cca01b8ac83932058fc092d
4
- data.tar.gz: a5e49744b9e0a5d1d84133322d4404e07b67bdf5d80587eb5180ef4313230f2c
3
+ metadata.gz: e672e6efb39e725b2e70c5ca5fb305da4791f6bba01f7f5a342b4b99d598c4f5
4
+ data.tar.gz: f990673eac1bf7e0c2f3346303d1383374d479ada6041c04b9d2806bc5846731
5
5
  SHA512:
6
- metadata.gz: 9201e0b067e2252702d3bfa42a3bb2fcec860a457108449d09ba414f43304fd4b99ef31ff428a0f13f7482cc08b640d9e5058415bf5a5b404b508435b872eb79
7
- data.tar.gz: af5aa7cd39c8814a8e500c6a9cf1088f6184af484d9a9b8dbe692e2772edca1e1f7f5992de78282e50dfa2efa7592bc850727cf1d6d1069d3ce31c0070cadb42
6
+ metadata.gz: d01c66ac892de2bcf5733d1a698f1f073a5b3493e9fef42a957aa5d8543f423e430731b263c485d3c0add12dbbff3ff8761f41f9d3f2fe7d9662f29694272bb9
7
+ data.tar.gz: 36148abd51b617bef3aab90198eaf6e247b51e6a09c7108752b7d7566023cd6b5c544fd322865804a4ad7b63fc1de7f33edd4f927469d83d3f99ad9204d60f0c
data/README.md CHANGED
@@ -38,6 +38,8 @@ connector = MprofiApiClient::Connector.new(API_TOKEN)
38
38
  # or
39
39
  # connector = MprofiApiClient::Connector.new(API_TOKEN, 'http://your_proxy_host_address:8080/')
40
40
  begin
41
+ # you can change read_timeout if the default of 60 seconds is not enough
42
+ # connector.read_timeout = 120
41
43
  connector.add_message('501002003', 'Test message 1', 'your-msg-id-001')
42
44
  # message with Polish diacritics
43
45
  connector.add_message('601002003', 'Test message ąćęłńóśźż', 'your-msg-id-002', encoding: 'utf-8')
@@ -27,6 +27,7 @@ module MprofiApiClient
27
27
  @proxy_url = proxy_url
28
28
  @messages = []
29
29
  @clear_messages = true
30
+ @read_timeout = nil
30
31
  end
31
32
 
32
33
  # Add one message to message queue.
@@ -85,6 +86,11 @@ module MprofiApiClient
85
86
  return result
86
87
  end
87
88
 
89
+ # Set read timeout
90
+ # +timeout+ - number of seconds
91
+ def read_timeout=(timeout)
92
+ @read_timeout = timeout
93
+ end
88
94
 
89
95
  private
90
96
 
@@ -123,6 +129,8 @@ module MprofiApiClient
123
129
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
124
130
  end
125
131
 
132
+ http.read_timeout = @read_timeout unless @read_timeout.nil?
133
+
126
134
  result = http.request(request)
127
135
  rescue Exception => err
128
136
  raise MprofiConnectionError.new(err.message, err)
@@ -3,6 +3,6 @@ require 'mprofi_api_client/connector'
3
3
 
4
4
  module MprofiApiClient
5
5
 
6
- VERSION = '0.1.1' #:nodoc:
6
+ VERSION = '0.1.2' #:nodoc:
7
7
 
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mprofi_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - COMVERGA Sp. z o. o.
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  - !ruby/object:Gem::Version
114
114
  version: '0'
115
115
  requirements: []
116
- rubygems_version: 3.3.7
116
+ rubygems_version: 3.1.6
117
117
  signing_key:
118
118
  specification_version: 4
119
119
  summary: MProfi API client library