openstudio_measure_tester 0.2.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -1
- data/CHANGELOG.md +24 -1
- data/Gemfile +2 -0
- data/Jenkinsfile +2 -2
- data/LICENSE.md +1 -1
- data/README.md +9 -5
- data/Rakefile +2 -0
- data/bin/console +1 -0
- data/bin/run_measure_tests +4 -3
- data/lib/openstudio_measure_tester.rb +2 -2
- data/lib/openstudio_measure_tester/core_ext.rb +1 -1
- data/lib/openstudio_measure_tester/coverage.rb +1 -1
- data/lib/openstudio_measure_tester/dashboard.rb +30 -2
- data/lib/openstudio_measure_tester/minitest_result.rb +2 -2
- data/lib/openstudio_measure_tester/openstudio_style.rb +7 -7
- data/lib/openstudio_measure_tester/openstudio_testing_result.rb +2 -2
- data/lib/openstudio_measure_tester/rake_task.rb +1 -1
- data/lib/openstudio_measure_tester/rubocop_result.rb +1 -1
- data/lib/openstudio_measure_tester/runner.rb +35 -7
- data/lib/openstudio_measure_tester/version.rb +2 -2
- data/openstudio_measure_tester.gemspec +16 -21
- metadata +57 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c15a4fac1673cf76d721ada0463cb01f177731e2a1b1be976811d796ae24d2b6
|
4
|
+
data.tar.gz: e32d8a1cc53bab52d6610a967836f05f650575fae17a12472953e7c16954000d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7e1e908646227bad3c04b3270ad6849747e0a791b0178564242ec59d14889490ab9ca267ee985e6b5b1501a6a4cde21ad76da6b44e387f3678b3b7cde958cf6
|
7
|
+
data.tar.gz: bfe9138b42692e0087adb0bf79d9e5abb643101850c8a1b84affb73296bbf9bfa426eca5766303e396236705ec6183edbab643ab612160acdd8547bc4cf159ab
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,29 @@
|
|
1
|
+
# Version 0.3.1
|
2
|
+
|
3
|
+
* Upgrade to new version of rubocop, 1.15.0
|
4
|
+
* Use new Rubocop OpenStudio rules from S3 (version 4)
|
5
|
+
|
6
|
+
# Version 0.3.0
|
7
|
+
|
8
|
+
* Upgrade to Ruby 2.7.0
|
9
|
+
|
10
|
+
# Version 0.2.3
|
11
|
+
|
12
|
+
* Use updated rubocop style (v3)
|
13
|
+
* Update instructions on running tests in Docker.
|
14
|
+
|
15
|
+
# Version 0.2.2
|
16
|
+
|
17
|
+
* Revert to using Rubocop 0.54 to support non-native gems in OpenStudio CLI.
|
18
|
+
|
19
|
+
# Version 0.2.1
|
20
|
+
|
21
|
+
* Update to SimpleCov 0.18.2
|
22
|
+
* Pessimistically version dependencies
|
23
|
+
|
1
24
|
# Version 0.2.0
|
2
25
|
|
3
|
-
* Remove support for Ruby 2.2.4. Use Ruby 2.5.
|
26
|
+
* Remove support for Ruby 2.2.4. Use Ruby ~> 2.5.x
|
4
27
|
* Remove NREL's fork of simplecov
|
5
28
|
* Update copyrights
|
6
29
|
* Remove travis and leverage NREL's Jenkins CI
|
data/Gemfile
CHANGED
data/Jenkinsfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
//Jenkins pipelines are stored in shared
|
1
|
+
//Jenkins pipelines are stored in shared libraries. Please see: https://github.com/NREL/cbci_jenkins_libs
|
2
2
|
|
3
|
-
@Library('cbci_shared_libs') _
|
3
|
+
@Library('cbci_shared_libs@master') _
|
4
4
|
|
5
5
|
// Build for PR to develop branch only.
|
6
6
|
if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { // check if set
|
data/LICENSE.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
OpenStudio(R), Copyright (c) 2008-
|
1
|
+
OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
2
2
|
|
3
3
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
4
4
|
that the following conditions are met:
|
data/README.md
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
# OpenStudio® Measure Tester
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/NREL/OpenStudio-measure-tester-gem.svg?branch=develop)](https://travis-ci.org/NREL/OpenStudio-measure-tester-gem)
|
4
3
|
[![Gem Version](https://badge.fury.io/rb/openstudio_measure_tester.svg)](https://badge.fury.io/rb/openstudio_measure_tester)
|
5
4
|
|
6
5
|
The OpenStudio Measure Tester is a rubygem that exposes rake tasks for testing OpenStudio measures.
|
@@ -71,17 +70,22 @@ The OpenStudio Measure Tester is a rubygem that exposes rake tasks for testing O
|
|
71
70
|
# Testing in Docker
|
72
71
|
|
73
72
|
```bash
|
73
|
+
docker run -it -v $(pwd):/root/test -w '/root' ubuntu:18.04 bash
|
74
74
|
|
75
|
+
# within container
|
75
76
|
apt-get update && apt-get install -y curl
|
76
77
|
curl -sLO https://raw.githubusercontent.com/NREL/OpenStudio-server/develop/docker/deployment/scripts/install_ruby.sh
|
77
|
-
curl -sLO https://raw.githubusercontent.com/NREL/OpenStudio-server/develop/
|
78
|
+
curl -sLO https://raw.githubusercontent.com/NREL/OpenStudio-server/develop/ci/travis/install_openstudio.sh
|
78
79
|
chmod +x install_ruby.sh
|
79
80
|
chmod +x install_openstudio.sh
|
80
|
-
./install_ruby.sh 2.
|
81
|
-
./install_openstudio.sh
|
81
|
+
./install_ruby.sh 2.5.5 28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c
|
82
|
+
./install_openstudio.sh 3.0.0 1c9617fa4e
|
82
83
|
export RUBYLIB=/usr/Ruby
|
83
|
-
```
|
84
84
|
|
85
|
+
cd /root/test
|
86
|
+
bundle update
|
87
|
+
bundle exec rake
|
88
|
+
```
|
85
89
|
|
86
90
|
# Releasing
|
87
91
|
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/bin/run_measure_tests
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
4
|
require 'openstudio_measure_tester'
|
4
5
|
|
@@ -12,11 +13,11 @@ end
|
|
12
13
|
begin
|
13
14
|
runner = OpenStudioMeasureTester::Runner.new(measure_dir)
|
14
15
|
runner.run_all(Dir.pwd)
|
15
|
-
rescue StandardError =>
|
16
|
+
rescue StandardError => e
|
16
17
|
puts
|
17
18
|
puts '!!!!!!!!!!!!!!!!!!!!! Error Occurred !!!!!!!!!!!!!!!!!!!!!'
|
18
|
-
puts
|
19
|
-
puts
|
19
|
+
puts e.message
|
20
|
+
puts e.backtrace
|
20
21
|
puts '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
|
21
22
|
puts
|
22
23
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
########################################################################################################################
|
4
|
-
# OpenStudio(R), Copyright (c) 2008-
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
7
|
# following conditions are met:
|
@@ -37,7 +37,7 @@ require 'simplecov'
|
|
37
37
|
|
38
38
|
begin
|
39
39
|
require 'git'
|
40
|
-
rescue LoadError =>
|
40
|
+
rescue LoadError => e
|
41
41
|
puts 'Could not load git, will not be able to report git information'
|
42
42
|
end
|
43
43
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
########################################################################################################################
|
4
|
-
# OpenStudio(R), Copyright (c) 2008-
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
7
|
# following conditions are met:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
########################################################################################################################
|
4
|
-
# OpenStudio(R), Copyright (c) 2008-
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
7
|
# following conditions are met:
|
@@ -1,5 +1,33 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
########################################################################################################################
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
|
+
#
|
6
|
+
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
|
+
# following conditions are met:
|
8
|
+
#
|
9
|
+
# (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
10
|
+
# disclaimer.
|
11
|
+
#
|
12
|
+
# (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
|
13
|
+
# following disclaimer in the documentation and/or other materials provided with the distribution.
|
14
|
+
#
|
15
|
+
# (3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote
|
16
|
+
# products derived from this software without specific prior written permission from the respective party.
|
17
|
+
#
|
18
|
+
# (4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other derivative
|
19
|
+
# works may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar designation without
|
20
|
+
# specific prior written permission from Alliance for Sustainable Energy, LLC.
|
21
|
+
#
|
22
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
23
|
+
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
24
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR
|
25
|
+
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
26
|
+
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
27
|
+
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
28
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
+
########################################################################################################################
|
30
|
+
|
3
31
|
require 'erb'
|
4
32
|
module OpenStudioMeasureTester
|
5
33
|
class Dashboard
|
@@ -17,7 +45,7 @@ module OpenStudioMeasureTester
|
|
17
45
|
end
|
18
46
|
|
19
47
|
def render
|
20
|
-
rendered = ERB.new(@template, 0,
|
48
|
+
rendered = ERB.new(@template, 0, nil, '@html').result(binding)
|
21
49
|
save_dir = "#{@test_results_directory}/dashboard"
|
22
50
|
|
23
51
|
# Render the dashboard
|
@@ -26,7 +54,7 @@ module OpenStudioMeasureTester
|
|
26
54
|
# copy over all the resource files to display the website correctly.
|
27
55
|
resource_path = File.expand_path('../../dashboard', File.dirname(__FILE__))
|
28
56
|
# KAF: for some reason, not overwriting the files. delete them from destination first
|
29
|
-
FileUtils.remove_dir("#{save_dir}/css") if Dir.exist?"#{save_dir}/css"
|
57
|
+
FileUtils.remove_dir("#{save_dir}/css") if Dir.exist? "#{save_dir}/css"
|
30
58
|
FileUtils.remove_dir("#{save_dir}/js") if Dir.exist? "#{save_dir}/js"
|
31
59
|
FileUtils.cp_r("#{resource_path}/css", "#{save_dir}/css", remove_destination: true)
|
32
60
|
FileUtils.cp_r("#{resource_path}/js", "#{save_dir}/js", remove_destination: true)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
########################################################################################################################
|
4
|
-
# OpenStudio(R), Copyright (c) 2008-
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
7
|
# following conditions are met:
|
@@ -67,7 +67,7 @@ module OpenStudioMeasureTester
|
|
67
67
|
json_data = JSON.parse(File.read(file), symbolize_names: true)
|
68
68
|
|
69
69
|
# Test if the measure has already been parse, if so, then continue
|
70
|
-
next if @measure_results.
|
70
|
+
next if @measure_results.key?(json_data[:measure_name])
|
71
71
|
|
72
72
|
mhash = {}
|
73
73
|
mhash[:tested_class] = json_data[:measure_name]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
########################################################################################################################
|
4
|
-
# OpenStudio(R), Copyright (c) 2008-
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
7
|
# following conditions are met:
|
@@ -98,7 +98,7 @@ module OpenStudioMeasureTester
|
|
98
98
|
severity: :warning,
|
99
99
|
file_type: :test
|
100
100
|
}, {
|
101
|
-
regex:
|
101
|
+
regex: %r{require .openstudio/ruleset },
|
102
102
|
check_type: :if_exists,
|
103
103
|
message: "Require openstudio/ruleset/* is deprecated. Use require 'openstudio/measure/*'",
|
104
104
|
type: :syntax,
|
@@ -168,10 +168,10 @@ module OpenStudioMeasureTester
|
|
168
168
|
begin
|
169
169
|
# there seems to be a race condition with the infoExtractor method
|
170
170
|
measure_info = infoExtractor(measure, OpenStudio::Model::OptionalModel.new, OpenStudio::OptionalWorkspace.new)
|
171
|
-
rescue NameError =>
|
172
|
-
log_message("Unable to parse info from measure. Error: '#{
|
173
|
-
rescue StandardError =>
|
174
|
-
log_message("Unknown error extracting measure info. Error #{
|
171
|
+
rescue NameError => e
|
172
|
+
log_message("Unable to parse info from measure. Error: '#{e}'", :general, :error)
|
173
|
+
rescue StandardError => e
|
174
|
+
log_message("Unknown error extracting measure info. Error #{e}", :general, :error)
|
175
175
|
end
|
176
176
|
|
177
177
|
measure_hash = generate_measure_hash(measure_dir, measure, measure_info)
|
@@ -242,7 +242,7 @@ module OpenStudioMeasureTester
|
|
242
242
|
log_message(check[:message], check[:type], check[:severity])
|
243
243
|
end
|
244
244
|
elsif check[:check_type] == :if_missing
|
245
|
-
if data
|
245
|
+
if !data&.match?(check[:regex])
|
246
246
|
log_message(check[:message], check[:type], check[:severity])
|
247
247
|
end
|
248
248
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
########################################################################################################################
|
4
|
-
# OpenStudio(R), Copyright (c) 2008-
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
7
|
# following conditions are met:
|
@@ -60,7 +60,7 @@ module OpenStudioMeasureTester
|
|
60
60
|
if !logs.empty?
|
61
61
|
sha = logs.first.sha
|
62
62
|
end
|
63
|
-
rescue StandardError =>
|
63
|
+
rescue StandardError => e
|
64
64
|
puts 'Could not find .git for measure(s), will not be able to report git information'
|
65
65
|
end
|
66
66
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
########################################################################################################################
|
4
|
-
# OpenStudio(R), Copyright (c) 2008-
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
7
|
# following conditions are met:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
########################################################################################################################
|
4
|
-
# OpenStudio(R), Copyright (c) 2008-
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
7
|
# following conditions are met:
|
@@ -1,5 +1,33 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
########################################################################################################################
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
|
+
#
|
6
|
+
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
|
+
# following conditions are met:
|
8
|
+
#
|
9
|
+
# (1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
10
|
+
# disclaimer.
|
11
|
+
#
|
12
|
+
# (2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
|
13
|
+
# following disclaimer in the documentation and/or other materials provided with the distribution.
|
14
|
+
#
|
15
|
+
# (3) Neither the name of the copyright holder nor the names of any contributors may be used to endorse or promote
|
16
|
+
# products derived from this software without specific prior written permission from the respective party.
|
17
|
+
#
|
18
|
+
# (4) Other than as required in clauses (1) and (2), distributions in any form of modifications or other derivative
|
19
|
+
# works may not use the "OpenStudio" trademark, "OS", "os", or any other confusingly similar designation without
|
20
|
+
# specific prior written permission from Alliance for Sustainable Energy, LLC.
|
21
|
+
#
|
22
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
23
|
+
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
24
|
+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, THE UNITED STATES GOVERNMENT, OR ANY CONTRIBUTORS BE LIABLE FOR
|
25
|
+
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
26
|
+
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
27
|
+
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
28
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
+
########################################################################################################################
|
30
|
+
|
3
31
|
module OpenStudioMeasureTester
|
4
32
|
# The runner is the workhorse that executes the tests. This class does not invoke Rake and can be run
|
5
33
|
# as a library method or as a CLI call
|
@@ -234,9 +262,9 @@ module OpenStudioMeasureTester
|
|
234
262
|
end
|
235
263
|
end
|
236
264
|
end
|
237
|
-
rescue StandardError =>
|
265
|
+
rescue StandardError => e
|
238
266
|
compatible[:compatible] = false
|
239
|
-
compatible[:message] =
|
267
|
+
compatible[:message] = e.message
|
240
268
|
end
|
241
269
|
|
242
270
|
if !compatible[:compatible]
|
@@ -250,8 +278,8 @@ module OpenStudioMeasureTester
|
|
250
278
|
load file
|
251
279
|
compatible[:loaded] = true
|
252
280
|
num_tests += 1
|
253
|
-
rescue StandardError, LoadError =>
|
254
|
-
compatible[:load_errors] <<
|
281
|
+
rescue StandardError, LoadError => e
|
282
|
+
compatible[:load_errors] << e.message
|
255
283
|
end
|
256
284
|
|
257
285
|
ensure
|
@@ -294,11 +322,11 @@ module OpenStudioMeasureTester
|
|
294
322
|
# openstudio_measure_tester.rb file, so it will not run.
|
295
323
|
begin
|
296
324
|
Minitest.run ['--verbose']
|
297
|
-
rescue StandardError =>
|
325
|
+
rescue StandardError => e
|
298
326
|
puts
|
299
327
|
puts '!!!!!!!!!!!!!!!!!!!!! Minitest Error Occurred !!!!!!!!!!!!!!!!!!!!!'
|
300
|
-
puts
|
301
|
-
puts
|
328
|
+
puts e.message
|
329
|
+
puts e.backtrace
|
302
330
|
puts '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
|
303
331
|
puts
|
304
332
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
########################################################################################################################
|
4
|
-
# OpenStudio(R), Copyright (c) 2008-
|
4
|
+
# OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC. All rights reserved.
|
5
5
|
#
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
7
7
|
# following conditions are met:
|
@@ -29,5 +29,5 @@
|
|
29
29
|
########################################################################################################################
|
30
30
|
|
31
31
|
module OpenStudioMeasureTester
|
32
|
-
VERSION = '0.
|
32
|
+
VERSION = '0.3.1'.freeze
|
33
33
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
lib = File.expand_path('lib', __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
require 'openstudio_measure_tester/version'
|
@@ -12,10 +14,10 @@ Gem::Specification.new do |spec|
|
|
12
14
|
spec.summary = 'Testing framework for OpenStudio measures'
|
13
15
|
spec.description = 'Testing framework for OpenStudio measures'
|
14
16
|
spec.metadata = {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
'bug_tracker_uri' => 'https://github.com/NREL/OpenStudio-measure-tester-gem/issues',
|
18
|
+
'changelog_uri' => 'https://github.com/NREL/OpenStudio-measure-tester-gem/blob/develop/CHANGELOG.md',
|
19
|
+
# 'documentation_uri' => 'https://www.rubydoc.info/gems/openstudio_measure_tester/#{gem.version}',
|
20
|
+
'source_code_uri' => "https://github.com/NREL/OpenStudio-measure-tester-gem/tree/v#{spec.version}"
|
19
21
|
}
|
20
22
|
|
21
23
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
@@ -25,24 +27,17 @@ Gem::Specification.new do |spec|
|
|
25
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
28
|
spec.require_paths = ['lib']
|
27
29
|
|
28
|
-
spec.required_ruby_version = '
|
29
|
-
|
30
|
-
if /^2\.5/.match(RUBY_VERSION)
|
31
|
-
spec.add_dependency 'rubocop', '0.54.0'
|
32
|
-
elsif /^2\.2/.match(RUBY_VERSION)
|
33
|
-
spec.add_dependency 'rubocop', '0.54.0'
|
34
|
-
elsif /^2\.0/.match(RUBY_VERSION)
|
35
|
-
spec.add_dependency 'rainbow', '2.2.2'
|
36
|
-
spec.add_dependency 'rubocop', '0.50.0'
|
37
|
-
end
|
30
|
+
spec.required_ruby_version = '~> 2.7.0'
|
38
31
|
|
39
|
-
spec.add_dependency 'git', '1.
|
40
|
-
spec.add_dependency 'minitest', '5.
|
41
|
-
spec.add_dependency 'minitest-reporters', '1.2
|
42
|
-
spec.add_dependency 'rake', '
|
43
|
-
spec.add_dependency 'rubocop
|
44
|
-
spec.add_dependency '
|
32
|
+
spec.add_dependency 'git', '~> 1.8.1'
|
33
|
+
spec.add_dependency 'minitest', '~> 5.14.0'
|
34
|
+
spec.add_dependency 'minitest-reporters', '~> 1.4.2'
|
35
|
+
spec.add_dependency 'rake', '~> 13.0'
|
36
|
+
spec.add_dependency 'rubocop', '~> 1.15.0'
|
37
|
+
spec.add_dependency 'rubocop-performance', '~> 1.11.3'
|
38
|
+
spec.add_dependency 'rubocop-checkstyle_formatter', '~> 0.4.0'
|
39
|
+
spec.add_dependency 'simplecov', '~> 0.18.2'
|
45
40
|
|
46
|
-
spec.add_development_dependency 'bundler', '
|
41
|
+
spec.add_development_dependency 'bundler', '>= 2.1.0'
|
47
42
|
spec.add_development_dependency 'rspec', '~> 3.9'
|
48
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio_measure_tester
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Long
|
@@ -11,120 +11,134 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2021-05-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
-
name:
|
17
|
+
name: git
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
|
-
- -
|
20
|
+
- - "~>"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 1.8.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 1.8.1
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: minitest
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
|
-
- -
|
34
|
+
- - "~>"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version:
|
36
|
+
version: 5.14.0
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
43
|
+
version: 5.14.0
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
|
-
name: minitest
|
45
|
+
name: minitest-reporters
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- -
|
48
|
+
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
50
|
+
version: 1.4.2
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- -
|
55
|
+
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
57
|
+
version: 1.4.2
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
|
-
name:
|
59
|
+
name: rake
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- -
|
62
|
+
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version:
|
64
|
+
version: '13.0'
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- -
|
69
|
+
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version:
|
71
|
+
version: '13.0'
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
|
-
name:
|
73
|
+
name: rubocop
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - "~>"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.15.0
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 1.15.0
|
86
|
+
- !ruby/object:Gem::Dependency
|
87
|
+
name: rubocop-performance
|
74
88
|
requirement: !ruby/object:Gem::Requirement
|
75
89
|
requirements:
|
76
|
-
- -
|
90
|
+
- - "~>"
|
77
91
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
92
|
+
version: 1.11.3
|
79
93
|
type: :runtime
|
80
94
|
prerelease: false
|
81
95
|
version_requirements: !ruby/object:Gem::Requirement
|
82
96
|
requirements:
|
83
|
-
- -
|
97
|
+
- - "~>"
|
84
98
|
- !ruby/object:Gem::Version
|
85
|
-
version:
|
99
|
+
version: 1.11.3
|
86
100
|
- !ruby/object:Gem::Dependency
|
87
101
|
name: rubocop-checkstyle_formatter
|
88
102
|
requirement: !ruby/object:Gem::Requirement
|
89
103
|
requirements:
|
90
|
-
- -
|
104
|
+
- - "~>"
|
91
105
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
106
|
+
version: 0.4.0
|
93
107
|
type: :runtime
|
94
108
|
prerelease: false
|
95
109
|
version_requirements: !ruby/object:Gem::Requirement
|
96
110
|
requirements:
|
97
|
-
- -
|
111
|
+
- - "~>"
|
98
112
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
113
|
+
version: 0.4.0
|
100
114
|
- !ruby/object:Gem::Dependency
|
101
115
|
name: simplecov
|
102
116
|
requirement: !ruby/object:Gem::Requirement
|
103
117
|
requirements:
|
104
|
-
- -
|
118
|
+
- - "~>"
|
105
119
|
- !ruby/object:Gem::Version
|
106
|
-
version: 0.18.
|
120
|
+
version: 0.18.2
|
107
121
|
type: :runtime
|
108
122
|
prerelease: false
|
109
123
|
version_requirements: !ruby/object:Gem::Requirement
|
110
124
|
requirements:
|
111
|
-
- -
|
125
|
+
- - "~>"
|
112
126
|
- !ruby/object:Gem::Version
|
113
|
-
version: 0.18.
|
127
|
+
version: 0.18.2
|
114
128
|
- !ruby/object:Gem::Dependency
|
115
129
|
name: bundler
|
116
130
|
requirement: !ruby/object:Gem::Requirement
|
117
131
|
requirements:
|
118
|
-
- - "
|
132
|
+
- - ">="
|
119
133
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
134
|
+
version: 2.1.0
|
121
135
|
type: :development
|
122
136
|
prerelease: false
|
123
137
|
version_requirements: !ruby/object:Gem::Requirement
|
124
138
|
requirements:
|
125
|
-
- - "
|
139
|
+
- - ">="
|
126
140
|
- !ruby/object:Gem::Version
|
127
|
-
version:
|
141
|
+
version: 2.1.0
|
128
142
|
- !ruby/object:Gem::Dependency
|
129
143
|
name: rspec
|
130
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,7 +162,6 @@ extra_rdoc_files: []
|
|
148
162
|
files:
|
149
163
|
- ".gitignore"
|
150
164
|
- ".rspec"
|
151
|
-
- ".rubocop-http---s3-amazonaws-com-openstudio-resources-styles-rubocop-yml"
|
152
165
|
- ".rubocop.yml"
|
153
166
|
- CHANGELOG.md
|
154
167
|
- Gemfile
|
@@ -187,24 +200,23 @@ licenses: []
|
|
187
200
|
metadata:
|
188
201
|
bug_tracker_uri: https://github.com/NREL/OpenStudio-measure-tester-gem/issues
|
189
202
|
changelog_uri: https://github.com/NREL/OpenStudio-measure-tester-gem/blob/develop/CHANGELOG.md
|
190
|
-
source_code_uri: https://github.com/NREL/OpenStudio-measure-tester-gem/tree/v0.
|
203
|
+
source_code_uri: https://github.com/NREL/OpenStudio-measure-tester-gem/tree/v0.3.1
|
191
204
|
post_install_message:
|
192
205
|
rdoc_options: []
|
193
206
|
require_paths:
|
194
207
|
- lib
|
195
208
|
required_ruby_version: !ruby/object:Gem::Requirement
|
196
209
|
requirements:
|
197
|
-
- - "
|
210
|
+
- - "~>"
|
198
211
|
- !ruby/object:Gem::Version
|
199
|
-
version:
|
212
|
+
version: 2.7.0
|
200
213
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
214
|
requirements:
|
202
215
|
- - ">="
|
203
216
|
- !ruby/object:Gem::Version
|
204
217
|
version: '0'
|
205
218
|
requirements: []
|
206
|
-
|
207
|
-
rubygems_version: 2.7.6.2
|
219
|
+
rubygems_version: 3.1.4
|
208
220
|
signing_key:
|
209
221
|
specification_version: 4
|
210
222
|
summary: Testing framework for OpenStudio measures
|