nexosis_api 3.0.5 → 3.0.6

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
  SHA256:
3
- metadata.gz: 357378d968ba06333b3f38bc3f36a15ac2832061470507e9f31785f1b5d46006
4
- data.tar.gz: e46cc84d2f59a4b525bd5f3413db70eea72916d994ea4416c96d86b9390464ab
3
+ metadata.gz: 247bdc951c66e1804a4ffa303f6c25e5f7f4dd6ed3137814aa7d5423cbd1ad6f
4
+ data.tar.gz: db8cf7ec5ac7668e7b0b7e54bc2f9557d6b4a0cc8cb138cf84c8dcf648ac4d7c
5
5
  SHA512:
6
- metadata.gz: e373f29c5945b7f898dfcb6658aa6e27cdb09e6f4296b8626012ca335025cbf017d2c8b3f807a17252857bdfab07ca35eb50522c0962e4693aa078b6c4e4d76f
7
- data.tar.gz: 5a25298241d55fd0c765570d4e8b07bbbf854d9f4c11cddc595423f6104beba4daa5fae0dff59189534e0fc2a61fc5578e4952a9a6175f2b6b0d11242a1640b4
6
+ metadata.gz: 4e4459b5967033a36b9b5d806a90b63cf91e5ff890b517d43f62d038b9f064599492e5bbc1e5588b69805e6093494cf14a5b040e6ed7137a8d5500f3d209f734
7
+ data.tar.gz: 27544c8ceeac5641d86d4f8bf4f4300739f51a41696c47be8cdf8901d881406c845fcf813e6b85b8a53cfcc613fd22c5ea428e998c89da465904492ec68da949
@@ -117,7 +117,7 @@ module NexosisApi
117
117
  # @note Common stats returned include 'max', 'min', 'stddev', 'variance', 'median'
118
118
  def get_column_stats(dataset_name)
119
119
  raise ArgumentError, 'dataset_name was not provided and is not optional ' if dataset_name.to_s.empty?
120
- dataset_stats_url = "/data/#{dataset_name}/stats"
120
+ dataset_stats_url = "/data/#{URI.escape(dataset_name)}/stats"
121
121
  response = self.class.get(dataset_stats_url,
122
122
  headers: @headers)
123
123
  return response.parsed_response if response.success?
@@ -129,7 +129,7 @@ module NexosisApi
129
129
  # @private
130
130
  def create_dataset(dataset_name, content, content_type)
131
131
  raise ArgumentError, 'dataset_name was not provided and is not optional ' if dataset_name.to_s.empty?
132
- dataset_url = "/data/#{dataset_name}"
132
+ dataset_url = "/data/#{URI.escape(dataset_name)}"
133
133
  headers = { 'api-key' => @api_key, 'Content-Type' => content_type }
134
134
  response = self.class.put(dataset_url, headers: headers, body: content)
135
135
  if response.success?
@@ -144,7 +144,7 @@ module NexosisApi
144
144
  def get_dataset_internal(dataset_name, page_number = 0, page_size = 50, query_options = {}, content_type = 'application/json')
145
145
  raise ArgumentError, 'page size must be <= 1000 items per page' unless page_size <= 1000
146
146
  raise ArgumentError, 'dataset_name was not provided and is not optional' unless dataset_name.to_s.empty? == false
147
- dataset_url = "/data/#{dataset_name}"
147
+ dataset_url = "/data/#{URI.escape(dataset_name)}"
148
148
  headers = { 'api-key' => @api_key, 'Accept' => content_type }
149
149
  self.class.get(dataset_url, headers: headers,
150
150
  query: create_query(page_number, page_size, query_options),
@@ -3,11 +3,11 @@ module NexosisApi
3
3
  # @since 2.4.0
4
4
  class FeatureImportance < SessionResponse
5
5
  def initialize(session_hash)
6
- @scores = NexosisApi::PagedArray.new(session_hash, session_hash.fetch(:featureImportance) { |k| session_hash.fetch(k.to_s) }.to_a.map{|i| { i[0] => i[1] } })
6
+ @scores = NexosisApi::PagedArray.new(session_hash, session_hash.fetch(:featureImportance) { |k| session_hash.fetch(k.to_s) }.to_a)
7
7
  super(session_hash.reject { |k, _v| k.to_s.casecmp('featureimportance').zero? })
8
8
  end
9
9
 
10
- # A paged
10
+ # A paged array of scores where each element of the array is a two item array of the form [col_name, score]
11
11
  # @return NexosisApi::PagedArray
12
12
  attr_reader :scores
13
13
  end
@@ -16,6 +16,6 @@ Gem::Specification.new do |spec|
16
16
  spec.require_paths = ['lib']
17
17
  spec.required_ruby_version = '>= 2.3.0'
18
18
  spec.summary = "Ruby client for working with the Nexosis API"
19
- spec.version = '3.0.5'
19
+ spec.version = '3.0.6'
20
20
  spec.metadata["yard.run"] = "yri"
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexosis_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nexosis,Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-24 00:00:00.000000000 Z
11
+ date: 2018-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler