predictionio-simple 0.10.0.2 → 0.10.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95c5c363487fe000ebee6481eedcba0b5d902266
4
- data.tar.gz: e150afab01f16cadf205d50cb1bf4d9c732ad0c4
3
+ metadata.gz: 6e2b34832f2df9c7b0a40eb91e86f18a9a9d9dbf
4
+ data.tar.gz: 9e74b182f0a88f96b62a44576a5c86ee0c74d1d6
5
5
  SHA512:
6
- metadata.gz: dde32c8b18698685b9cb212ab15d203c32e48f52faf0be51367bd2c6e7a9caab79a6e4f35835663eea859a17fb40a9417ce019ab4f0ff43bb0e3386711f0b86a
7
- data.tar.gz: 5161110fdf448076c8db36a1ea031e41397807889c2b5e727209f80e13c7974a7b314aa42353cf607ff7c67c9ce125466f3d76d001003ae9137f589be4bc827c
6
+ metadata.gz: 278696bae08c1449a39dfe25326246de8f5c8135a9bc7980da3dea8af19ea37303354c40320d09a0e63477675f4114c4cf79909f40d370c88844a7adaeda3dda
7
+ data.tar.gz: e62158ae1d503238adc50a9a236d90ea100585818382537c0b6567e9fe0b695795ba6cb6c38408bb2b4b756dc6826c76ee8f1c465bb83e32befd08c313ecb881
@@ -11,6 +11,7 @@ module PredictionIO
11
11
  faraday.request :url_encoded # form-encode POST params
12
12
  faraday.response :logger # log requests to STDOUT
13
13
  faraday.adapter Faraday.default_adapter # make requests with Net::HTTP
14
+ yield faraday if block_given?
14
15
  end
15
16
  @connection.headers['Content-Type'] = 'application/json; charset=utf-8'
16
17
  end
@@ -49,7 +49,9 @@ module PredictionIO
49
49
  # - API entry point at http://localhost:8000 (apiurl)
50
50
  # - a 60-second timeout for each HTTP(S) connection (thread_timeout)
51
51
  def initialize(apiurl = 'http://localhost:8000')
52
- @http = PredictionIO::Connection.new(URI(apiurl))
52
+ @http = PredictionIO::Connection.new(URI(apiurl)) do |faraday|
53
+ yield faraday if block_given?
54
+ end
53
55
  end
54
56
 
55
57
 
@@ -84,7 +84,9 @@ module PredictionIO
84
84
  # - a 60-second timeout for each HTTP(S) connection (thread_timeout)
85
85
  def initialize(access_key, apiurl = 'http://localhost:7070')
86
86
  @access_key = access_key
87
- @http = PredictionIO::Connection.new(URI(apiurl))
87
+ @http = PredictionIO::Connection.new(URI(apiurl)) do |faraday|
88
+ yield faraday if block_given?
89
+ end
88
90
  end
89
91
 
90
92
  # Returns PredictionIO's status in string.
@@ -1,3 +1,3 @@
1
1
  module PredictionIO
2
- VERSION = '0.10.0.2'
2
+ VERSION = '0.10.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: predictionio-simple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0.2
4
+ version: 0.10.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yavor Stoychev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-21 00:00:00.000000000 Z
11
+ date: 2016-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json