openstudio-analysis 1.0.0.rc15 → 1.0.0.rc16

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: 0067d3a4d72f588dd1f5a981c3e44592675c44eb
4
- data.tar.gz: 98d4be34b9a8d2a99d0dc3dd9ee1fb4e450948ed
3
+ metadata.gz: b7a9dc756ad836c27c5786fb07041f602361681d
4
+ data.tar.gz: 1262bd15996a76a48e96d742b9018b9511c62009
5
5
  SHA512:
6
- metadata.gz: 47d669f0e282ce5da24926c09fbaa0bb585cac6cce70f50eeae54fd58487753f5133127621d9c9d52c23646140701d0c97dca535a88454164da194534a475a19
7
- data.tar.gz: 9e5c4a0d82c7ea242b1580980fcbcf78bde6c849d1eef6222bbdc341e14a729c60bcbf8b847ed7c0068c318f48dd0c2f422554739f4c1a3829f0ef119cd31c43
6
+ metadata.gz: 182e6bb29ee7271ea6d3ca0341ca54407885f2de631941ce795bd8bf6215a608b9d985f5ba90478da8dbdb6d68349159749280ed3c3f22fdb3254a6db804c29b
7
+ data.tar.gz: 76418bfdbbda8d2185f25e8cfd0651047591e5eedac908d3707fffefdca84e43af74f22b2505d5f46d09ddcad30e9da3578a256ec837afc46b59a6884f218fe6
@@ -172,6 +172,8 @@ module OpenStudio
172
172
  j = JSON.parse resp.body, symbolize_names: true
173
173
  if j && j[:analysis] && j[:analysis][:analysis_type] == analysis_type
174
174
  status = j[:analysis][:status]
175
+ elsif j && j[:analysis] && analysis_type == 'batch_run'
176
+ status = j[:analysis][:status]
175
177
  end
176
178
  end
177
179
  end
@@ -295,13 +297,22 @@ module OpenStudio
295
297
  downloaded = false
296
298
  file_path_and_name = nil
297
299
 
298
- response = @conn.get "/data_points/#{datapoint_id}/download"
300
+ response = @conn.get "/data_points/#{datapoint_id}/download_result_file?filename=data_point.zip"
299
301
  if response.status == 200
300
302
  filename = response['content-disposition'].match(/filename=(\"?)(.+)\1/)[2]
301
303
  downloaded = true
302
304
  file_path_and_name = "#{save_directory}/#{filename}"
303
305
  puts "File #{filename} already exists, overwriting" if File.exist?(file_path_and_name)
304
306
  File.open(file_path_and_name, 'wb') { |f| f << response.body }
307
+ else
308
+ response = @conn.get "/data_points/#{datapoint_id}/download"
309
+ if response.status == 200
310
+ filename = response['content-disposition'].match(/filename=(\"?)(.+)\1/)[2]
311
+ downloaded = true
312
+ file_path_and_name = "#{save_directory}/#{filename}"
313
+ puts "File #{filename} already exists, overwriting" if File.exist?(file_path_and_name)
314
+ File.open(file_path_and_name, 'wb') { |f| f << response.body }
315
+ end
305
316
  end
306
317
 
307
318
  [downloaded, file_path_and_name]
@@ -702,7 +702,6 @@ module OpenStudio
702
702
  variable_index = -1
703
703
  measure_name = nil
704
704
  rows.each_with_index do |row, icnt|
705
- next if icnt < 1 # skip the first line after the header
706
705
  # puts "Parsing line: #{icnt}:#{row}"
707
706
 
708
707
  # check if we are a measure - nil means that the cell was blank
@@ -1,5 +1,5 @@
1
1
  module OpenStudio
2
2
  module Analysis
3
- VERSION = '1.0.0.rc15'.freeze
3
+ VERSION = '1.0.0.rc16'.freeze
4
4
  end
5
5
  end
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
23
23
  s.require_paths = ['lib']
24
24
 
25
25
  s.add_dependency 'faraday', '~> 0.8'
26
- s.add_dependency 'nokogiri', '~> 1.6'
26
+ s.add_dependency 'nokogiri', '~> 1.6.8'
27
27
  s.add_dependency 'roo', '~> 2.4'
28
28
  s.add_dependency 'rubyzip', '~> 1.2'
29
29
  s.add_dependency 'semantic', '~> 1.4'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstudio-analysis
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc15
4
+ version: 1.0.0.rc16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Long
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-08 00:00:00.000000000 Z
11
+ date: 2017-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '1.6'
33
+ version: 1.6.8
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.6'
40
+ version: 1.6.8
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: roo
43
43
  requirement: !ruby/object:Gem::Requirement