openstudio-extension 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +5 -0
- data/Gemfile +0 -2
- data/Rakefile +0 -2
- data/bin/console +0 -1
- data/lib/change_log.rb +35 -10
- data/lib/measures/openstudio_extension_test_measure/measure.rb +0 -2
- data/lib/openstudio/extension/rake_task.rb +4 -7
- data/lib/openstudio/extension/runner.rb +5 -7
- data/lib/openstudio/extension/runner_config.rb +1 -3
- data/lib/openstudio/extension/version.rb +1 -3
- data/lib/openstudio/extension.rb +0 -2
- data/lib/openstudio-extension.rb +0 -2
- data/openstudio-extension.gemspec +3 -5
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbd3f65a4f467a9beee5439e58dbeddc445da4dfeb606d23547865a57d461d06
|
4
|
+
data.tar.gz: 4f7c9792f4f9bc5419caff2aa57a4bd8dcdb4252ad8d77b8e6b28b50eedeeb99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61f585def76ef5d6998892f74fe8338744df5c90cdb26b906a04dbc5c53e7cfa1524c23e6636b3fd08acfcb8a2a0b9378473c24253265a320585b576ac9c4692
|
7
|
+
data.tar.gz: 6842e2d7eb60fd4d047d26e8b2e2e286819d3ed63a904f436bb1b8a28c2f469efcae2876eebf3372aad12716859d77350129f354a0336f8b4aedd31415cc953f
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# OpenStudio Extension Gem
|
2
2
|
|
3
|
+
## Version 0.2.3
|
4
|
+
|
5
|
+
* Use new version of rubocop style from S3
|
6
|
+
* Remove frozen string literals in comments
|
7
|
+
|
3
8
|
## Version 0.2.2
|
4
9
|
|
5
10
|
* Exclude measure tests from being released with the gem (reduces the size of the installed gem significantly)
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/lib/change_log.rb
CHANGED
@@ -1,18 +1,43 @@
|
|
1
|
-
|
2
|
-
#
|
1
|
+
# *******************************************************************************
|
2
|
+
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
3
|
+
# All rights reserved.
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
#
|
7
|
+
# (1) Redistributions of source code must retain the above copyright notice,
|
8
|
+
# this list of conditions and the following disclaimer.
|
9
|
+
#
|
10
|
+
# (2) Redistributions in binary form must reproduce the above copyright notice,
|
11
|
+
# this list of conditions and the following disclaimer in the documentation
|
12
|
+
# and/or other materials provided with the distribution.
|
13
|
+
#
|
14
|
+
# (3) Neither the name of the copyright holder nor the names of any contributors
|
15
|
+
# may be used to endorse or promote products derived from this software without
|
16
|
+
# specific prior written permission from the respective party.
|
17
|
+
#
|
18
|
+
# (4) Other than as required in clauses (1) and (2), distributions in any form
|
19
|
+
# of modifications or other derivative works may not use the "OpenStudio"
|
20
|
+
# trademark, "OS", "os", or any other confusingly similar designation without
|
21
|
+
# specific prior written permission from Alliance for Sustainable Energy, LLC.
|
22
|
+
#
|
23
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
|
24
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
25
|
+
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
26
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
|
27
|
+
# UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
|
28
|
+
# THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
29
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
30
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
31
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
32
|
+
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
33
|
+
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
34
|
+
# *******************************************************************************
|
3
35
|
|
4
36
|
require 'octokit'
|
5
37
|
require 'date'
|
6
38
|
require 'optparse'
|
7
39
|
require 'optparse/date'
|
8
40
|
|
9
|
-
# Instructions:
|
10
|
-
#
|
11
|
-
# Example:
|
12
|
-
# ruby change_log.rb -t abcdefghijklmnopqrstuvwxyz -s 2017-09-06
|
13
|
-
#
|
14
|
-
#
|
15
|
-
|
16
41
|
class ChangeLog
|
17
42
|
def initialize(user_and_repo, start_date = Date.today - 90, end_date = Date.today, apikey = nil)
|
18
43
|
@user_and_repo = user_and_repo
|
@@ -119,7 +144,7 @@ class ChangeLog
|
|
119
144
|
puts "Total Open Issues: #{@total_open_issues.length}"
|
120
145
|
puts "Total Open Pull Requests: #{@total_open_pull_requests.length}"
|
121
146
|
puts "\nDate Range: #{@start_date.strftime('%m/%d/%y')} - #{@end_date.strftime('%m/%d/%y')}:"
|
122
|
-
puts "\nNew Issues: #{@new_issues.length} (" + @new_issues.map
|
147
|
+
puts "\nNew Issues: #{@new_issues.length} (" + @new_issues.map(&:number).join(', ') + ')'
|
123
148
|
|
124
149
|
puts "\nClosed Issues: #{@closed_issues.length}"
|
125
150
|
@closed_issues.each { |issue| puts print_issue(issue) }
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
# *******************************************************************************
|
4
2
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
5
3
|
# All rights reserved.
|
@@ -51,11 +49,12 @@ module OpenStudio
|
|
51
49
|
setup_subtasks(@name)
|
52
50
|
end
|
53
51
|
|
54
|
-
def set_extension_class(extension_class, github_repo='')
|
52
|
+
def set_extension_class(extension_class, github_repo = '')
|
55
53
|
@extension_class = extension_class
|
56
54
|
@extension = extension_class.new
|
57
55
|
@root_dir = @extension.root_dir
|
58
|
-
|
56
|
+
# Catch if measures_dir is nil, then just make it an empty string
|
57
|
+
@measures_dir = @extension.measures_dir || ''
|
59
58
|
@staged_path = @measures_dir + '/staged'
|
60
59
|
@core_dir = @extension.core_dir
|
61
60
|
@doc_templates_dir = @extension.doc_templates_dir
|
@@ -83,8 +82,6 @@ module OpenStudio
|
|
83
82
|
|
84
83
|
desc 'Use openstudio system ruby to run tests'
|
85
84
|
task :test_with_openstudio do
|
86
|
-
# puts Dir.pwd
|
87
|
-
# puts Rake.original_dir
|
88
85
|
puts 'testing with openstudio'
|
89
86
|
runner = OpenStudio::Extension::Runner.new(Dir.pwd)
|
90
87
|
result = runner.test_measures_with_cli(@measures_dir)
|
@@ -176,7 +173,7 @@ module OpenStudio
|
|
176
173
|
results = bcl.search(keyword, "fq[]=bundle:nrel_measure&show_rows=#{num_results}", false)
|
177
174
|
puts "there are #{results[:result].count} results"
|
178
175
|
results[:result].each do |res|
|
179
|
-
puts
|
176
|
+
puts(res[:measure][:name]).to_s
|
180
177
|
end
|
181
178
|
end
|
182
179
|
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
# *******************************************************************************
|
4
2
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
5
3
|
# All rights reserved.
|
@@ -563,12 +561,12 @@ module OpenStudio
|
|
563
561
|
puts "Encoding.default_internal = #{Encoding.default_internal}"
|
564
562
|
|
565
563
|
paths.each do |path|
|
566
|
-
Dir[path[:glob]].each do |
|
567
|
-
puts "Updating license in file #{
|
568
|
-
f = File.read(
|
564
|
+
Dir[path[:glob]].each do |dir_file|
|
565
|
+
puts "Updating license in file #{dir_file}"
|
566
|
+
f = File.read(dir_file)
|
569
567
|
if f.match?(path[:regex])
|
570
568
|
puts ' License found -- updating'
|
571
|
-
File.open(
|
569
|
+
File.open(dir_file, 'w') { |write| write << f.gsub(path[:regex], path[:license]) }
|
572
570
|
elsif f =~ /\(C\)/i || f =~ /\(Copyright\)/i
|
573
571
|
puts ' File already has copyright -- skipping'
|
574
572
|
else
|
@@ -577,7 +575,7 @@ module OpenStudio
|
|
577
575
|
puts ' CANNOT add license to file automatically, add it manually and it will update automatically in the future'
|
578
576
|
next
|
579
577
|
end
|
580
|
-
File.open(
|
578
|
+
File.open(dir_file, 'w') { |write| write << f.insert(0, path[:license] + "\n") }
|
581
579
|
end
|
582
580
|
end
|
583
581
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
# *******************************************************************************
|
4
2
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
5
3
|
# All rights reserved.
|
@@ -40,7 +38,7 @@ require 'json'
|
|
40
38
|
module OpenStudio
|
41
39
|
module Extension
|
42
40
|
class RunnerConfig
|
43
|
-
FILENAME = 'runner.conf'
|
41
|
+
FILENAME = 'runner.conf'.freeze
|
44
42
|
|
45
43
|
##
|
46
44
|
# Class to store configuration of the runner options.
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
# *******************************************************************************
|
4
2
|
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
|
5
3
|
# All rights reserved.
|
@@ -37,6 +35,6 @@
|
|
37
35
|
|
38
36
|
module OpenStudio
|
39
37
|
module Extension
|
40
|
-
VERSION = '0.2.
|
38
|
+
VERSION = '0.2.3'.freeze
|
41
39
|
end
|
42
40
|
end
|
data/lib/openstudio/extension.rb
CHANGED
data/lib/openstudio-extension.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
lib = File.expand_path('lib', __dir__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
require 'openstudio/extension/version'
|
@@ -30,11 +28,11 @@ Gem::Specification.new do |spec|
|
|
30
28
|
|
31
29
|
spec.required_ruby_version = '~> 2.5.0'
|
32
30
|
|
33
|
-
spec.add_dependency 'bcl', '~> 0.6.
|
31
|
+
spec.add_dependency 'bcl', '~> 0.6.1'
|
34
32
|
spec.add_dependency 'bundler', '~> 2.1'
|
35
|
-
spec.add_dependency 'octokit', '~> 4.18.0'
|
36
|
-
spec.add_dependency 'openstudio_measure_tester', '~> 0.2.2'
|
33
|
+
spec.add_dependency 'octokit', '~> 4.18.0' # for change logs
|
37
34
|
spec.add_dependency 'openstudio-workflow', '~> 2.0.0'
|
35
|
+
spec.add_dependency 'openstudio_measure_tester', '~> 0.2.2'
|
38
36
|
spec.add_dependency 'parallel', '~> 1.19.1'
|
39
37
|
|
40
38
|
spec.add_development_dependency 'rake', '~> 13.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstudio-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katherine Fleming
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2020-05-
|
13
|
+
date: 2020-05-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bcl
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.6.
|
21
|
+
version: 0.6.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 0.6.
|
28
|
+
version: 0.6.1
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: bundler
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
@@ -55,33 +55,33 @@ dependencies:
|
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: 4.18.0
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
|
-
name:
|
58
|
+
name: openstudio-workflow
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.
|
63
|
+
version: 2.0.0
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.
|
70
|
+
version: 2.0.0
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
|
-
name:
|
72
|
+
name: openstudio_measure_tester
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: 2.
|
77
|
+
version: 0.2.2
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - "~>"
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: 2.
|
84
|
+
version: 0.2.2
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: parallel
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -218,7 +218,7 @@ licenses: []
|
|
218
218
|
metadata:
|
219
219
|
bug_tracker_uri: https://github.com/NREL/openstudio-extension-gem/issues
|
220
220
|
changelog_uri: https://github.com/NREL/openstudio-extension-gem/blob/develop/CHANGELOG.md
|
221
|
-
source_code_uri: https://github.com/NREL/openstudio-extension-gem/tree/v0.2.
|
221
|
+
source_code_uri: https://github.com/NREL/openstudio-extension-gem/tree/v0.2.3
|
222
222
|
post_install_message:
|
223
223
|
rdoc_options: []
|
224
224
|
require_paths:
|