datasift 3.1.2 → 3.1.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: b9641d5c63c65ea33e57315b99af6a9c590d40cb
4
- data.tar.gz: 8337c158f42385c7b64d02c647497973340c4cbc
3
+ metadata.gz: 0eee7436a56aaedecada56c0fe536f159fcd2d10
4
+ data.tar.gz: f5df616662250c8ffbe52828e517650cdc3df25b
5
5
  SHA512:
6
- metadata.gz: 6ca8d240d18faf58308dbc04a47f5088207684e536bf627c0fbd59cb70bd84110c7b19f8561a8ec0b58b4c55e93f48ee84dad23422ba69fc351993252a66027b
7
- data.tar.gz: 0e5b55c4c145be0835e37ba33feb438cffd5f308a5c6be857f506ade9aeaa63ed324f796b6e03a5e66375d6288ed0a8cc9829df27c415ffa0b5b3bbecf2da5d2
6
+ metadata.gz: efc65b0038b8e12dfa98e03bda3296a4ca3b4f28643a04e7aedeb6564a7c1e2ae0d18964961c590d415e28e14168f9fa6edda9dbf33c2f9ff6bf6b66c4eeb3aa
7
+ data.tar.gz: 018f6305640bd21c2f8594f515988975f07dc7cae7b71fbf2ca17bd07fdd75b036a5fa97b4350246134837cea5ea0ba169ee6752175de533b9d19dc8b8f147c2
@@ -2,4 +2,4 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
- - 2.1.2
5
+ - 2.1
@@ -1,6 +1,12 @@
1
1
  CHANGELOG
2
2
  ================================
3
3
 
4
+ v.3.1.3 (2014-12-02)
5
+ --------------------
6
+ ####Fixes
7
+ * Resolves #57; ensures config is not overridden when initializing LiveStream
8
+ * Relaxed version dependency on multi_json to resolve #67
9
+
4
10
  v.3.1.2 (2014-08-28)
5
11
  --------------------
6
12
 
data/README.md CHANGED
@@ -8,8 +8,17 @@ DataSift
8
8
  [travis]: https://travis-ci.org/datasift/datasift-ruby
9
9
 
10
10
 
11
- The official Ruby library for accessing the DataSift API. See
12
- [datasift.com](http://datasift.com/) for full details and to sign up for an account.
11
+ The official Ruby library for accessing the DataSift API.
12
+
13
+ Getting Started
14
+ ---------------
15
+
16
+ **Read our [Ruby Getting Started Guide](http://dev.datasift.com/quickstart/ruby) to get started with the DataSift platform.** The guide will take you through creating a [DataSift](http://datasift.com) account, and activating data sources which you will need to do before using the DataSift API.
17
+
18
+ Many of the examples and API endpoints used in this library require you have enabled certain data sources before you can receive any data (you should do this at [datasift.com/source](https://datasift.com/source)). Certain API features, such as [Historics](http://datasift.com/platform/historics/) and [Managed Sources](http://datasift.com/platform/datasources/) will require you have signed up to a monthly subscription before you can access them.
19
+
20
+ If you are interested in using these features, or would like more information about DataSift, please [get in touch](http://datasift.com/contact-us/)!
21
+
13
22
 
14
23
  Install Instructions
15
24
  --------------------
@@ -31,13 +40,6 @@ The library will use SSL connections by default. While we recommend using SSL
31
40
  you may disable it if required by passing ':enable_ssl => false' as the third
32
41
  parameter when creating your @config object.
33
42
 
34
- Getting Started
35
- ---------------
36
- Before you can begin using this library, you will need to have an active [DataSift](http://datasift.com) account - you can sign up for a new account at [datasift.com/get-started](http://datasift.com/get-started/).
37
-
38
- Many of the examples and API endpoints used in this library require you have enabled certain data sources before you can receive any data (you should do this at [datasift.com/source](https://datasift.com/source)). Certain API features, such as [Historics](http://datasift.com/platform/historics/) and [Managed Sources](http://datasift.com/platform/datasources/) will require you have signed up to a monthly subscription before you can access them.
39
-
40
- If you are interested in using these features, or would like more information about DataSift, please [get in touch](http://datasift.com/contact-us/)!
41
43
 
42
44
  Simple example
43
45
  --------------
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.2
1
+ 3.1.3
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version=
13
13
 
14
14
  s.add_runtime_dependency('rest-client', '~> 1.6')
15
- s.add_runtime_dependency('multi_json', '~> 1.8')
15
+ s.add_runtime_dependency('multi_json', '>= 1.7')
16
16
  s.add_runtime_dependency('websocket-td', '~> 0.0.4')
17
17
 
18
18
  s.add_development_dependency('rdoc', '>= 0')
@@ -20,6 +20,7 @@ class StreamingApi < DataSiftExample
20
20
  on_delete = lambda { |stream, m| puts 'We must delete this to be compliant ==> ' + m }
21
21
 
22
22
  on_error = lambda do |stream, e|
23
+ # This is called when an error occurs on your connection; you should probably log this event
23
24
  puts 'A serious error has occurred'
24
25
  puts e.message
25
26
  end
@@ -57,6 +58,7 @@ class StreamingApi < DataSiftExample
57
58
  end
58
59
 
59
60
  on_close = lambda do |stream,msg|
61
+ # This is called when a connection is closed; you should probably log this event
60
62
  puts msg
61
63
  end
62
64
 
@@ -10,6 +10,7 @@ module DataSift
10
10
  config[:enable_ssl] = false unless config.has_key?(:enable_ssl)
11
11
  # max 320 seconds retry - http://dev.datasift.com/docs/streaming-api/reconnecting
12
12
  config[:max_retry_time] = 320 unless config.has_key?(:max_retry_time)
13
+ config[:retry_timeout] = 0 unless config.has_key?(:retry_timeout)
13
14
  end
14
15
 
15
16
  def requires params
@@ -156,7 +156,7 @@ module DataSift
156
156
  :timeout => timeout,
157
157
  :payload => payload,
158
158
  :url => url,
159
- :ssl_version => 'TLSv1'
159
+ :ssl_version => OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ssl_version]
160
160
  )
161
161
 
162
162
  begin
@@ -323,6 +323,7 @@ module DataSift
323
323
  def self.retry_connect(config, connection, on_delete, on_error, on_open, on_close, message = '', use_closed = false)
324
324
  config[:retry_timeout] = config[:retry_timeout] == 0 || config[:retry_timeout] == nil ? 10 : config[:retry_timeout] * 2
325
325
  connection.retry_timeout = config[:retry_timeout]
326
+
326
327
  if config[:retry_timeout] > config[:max_retry_time]
327
328
  if use_closed && on_close != nil
328
329
  on_close.call(connection, message)
@@ -5,7 +5,7 @@ module DataSift
5
5
  @on_datasift_message = lambda {}
6
6
 
7
7
  def initialize (config, stream)
8
- @config = config
8
+ super(config)
9
9
  @stream = stream
10
10
  @retry_timeout = 0
11
11
  @subscriptions = {}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datasift
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - DataSift
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-28 00:00:00.000000000 Z
11
+ date: 2014-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: multi_json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '1.8'
33
+ version: '1.7'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '1.8'
40
+ version: '1.7'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: websocket-td
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  version: 1.3.6
222
222
  requirements: []
223
223
  rubyforge_project:
224
- rubygems_version: 2.3.0
224
+ rubygems_version: 2.4.3
225
225
  signing_key:
226
226
  specification_version: 4
227
227
  summary: DataSift is a simple wrapper for the DataSift API.