urbanopt-core 0.2.0 → 0.5.0
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 +5 -5
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +21 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +1 -4
- data/Jenkinsfile +10 -0
- data/LICENSE.md +1 -1
- data/README.md +2 -2
- data/Rakefile +2 -2
- data/doc_templates/LICENSE.md +1 -1
- data/doc_templates/copyright_erb.txt +1 -1
- data/doc_templates/copyright_js.txt +1 -1
- data/doc_templates/copyright_ruby.txt +1 -1
- data/lib/urbanopt/core.rb +1 -1
- data/lib/urbanopt/core/extension.rb +1 -1
- data/lib/urbanopt/core/feature.rb +1 -1
- data/lib/urbanopt/core/feature_file.rb +1 -1
- data/lib/urbanopt/core/version.rb +2 -2
- data/urbanopt-core-gem.gemspec +4 -4
- metadata +11 -12
- data/lib/change_log.rb +0 -147
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: b955d62aa6b112eaf1fddcdf5c9e3d3a0d23e818689ca9e41162c134348b8678
|
|
4
|
+
data.tar.gz: da7ad128e96964ce33a77ab688eebfb00d368c8d58dac5d995048a307cc5c89a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a06580e2134fae7c4beaccd0ee9723613d85d88a3553622fcb0391409d5b4d2c7aa76dc6af1341bf174830fd02a8961fc4592a92111ae73191833bb934e26e2
|
|
7
|
+
data.tar.gz: e097f6bedac586cb5e70b3fd7a66b6c7e0facc6c2ee62607397ff93081eae34d2879ee5b76d74e98c4a7827886c3c80096979f05ca02e3675e190f944524d31b
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# URBANopt Core Gem
|
|
2
2
|
|
|
3
|
+
## Version 0.5.0
|
|
4
|
+
|
|
5
|
+
Date Range: 09/18/20 - 11/25/20
|
|
6
|
+
|
|
7
|
+
Updated dependencies for OpenStudio 3.1.0
|
|
8
|
+
|
|
9
|
+
## Version 0.4.0
|
|
10
|
+
|
|
11
|
+
Date Range: 06/05/20 - 09/17/20
|
|
12
|
+
|
|
13
|
+
- Fixed [#7]( https://github.com/urbanopt/urbanopt-core-gem/issues/7 ), Remove travis in favor of Jenkins
|
|
14
|
+
- Fixed [#24]( https://github.com/urbanopt/urbanopt-core-gem/issues/24 ), Chore: Add TM to first mention URBANopt on LICENSE file and LICENSE section
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## Version 0.3.0
|
|
18
|
+
|
|
19
|
+
Date Range: 03/31/20 - 06/04/20
|
|
20
|
+
|
|
21
|
+
- Updated dependencies for ruby 2.5.x and OpenStudio 3.x
|
|
22
|
+
- Remove old changelog script functionality in favor of new extension-gem functionality (can be run via rake task)
|
|
23
|
+
|
|
3
24
|
## Version 0.2.0
|
|
4
25
|
|
|
5
26
|
URBANopt Core Gem version 0.2.0 include minor updates to dependencies and updated copyrights.
|
data/CONTRIBUTING.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Version 1.0
|
|
4
4
|
|
|
5
|
-
The URBANopt team welcomes your contribution to the project. You can contribute to the URBANopt project in several ways: by using the software, reporting issues, contributing documentation, or contributing code back to the project. The GitHub [Contributing to Open Source](https://opensource.guide/how-to-contribute/) guide provides a good overview. If you contribute code, you agree that your contribution may be incorporated into the URBANopt Software Development Kit (SDK) and made available under the URBANopt SDK license.
|
|
5
|
+
The URBANopt<sup>™</sup> team welcomes your contribution to the project. You can contribute to the URBANopt project in several ways: by using the software, reporting issues, contributing documentation, or contributing code back to the project. The GitHub [Contributing to Open Source](https://opensource.guide/how-to-contribute/) guide provides a good overview. If you contribute code, you agree that your contribution may be incorporated into the URBANopt Software Development Kit (SDK) and made available under the URBANopt SDK license.
|
|
6
6
|
|
|
7
7
|
The contribution process for URBANopt is composed of three steps:
|
|
8
8
|
|
data/Gemfile
CHANGED
|
@@ -14,8 +14,5 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
|
14
14
|
if allow_local && File.exist?('../OpenStudio-extension-gem')
|
|
15
15
|
gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
|
|
16
16
|
elsif allow_local
|
|
17
|
-
|
|
17
|
+
gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
|
|
18
18
|
end
|
|
19
|
-
|
|
20
|
-
# simplecov has an unneccesary dependency on native json gem, use fork that does not require this
|
|
21
|
-
gem 'simplecov', github: 'NREL/simplecov'
|
data/Jenkinsfile
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//Jenkins pipelines are stored in shared libraries. Please see: https://github.com/NREL/cbci_jenkins_libs
|
|
2
|
+
|
|
3
|
+
@Library('cbci_shared_libs') _
|
|
4
|
+
|
|
5
|
+
// Build for PR to develop branch only.
|
|
6
|
+
if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { // check if set
|
|
7
|
+
|
|
8
|
+
openstudio_urbanopt_extension_gems()
|
|
9
|
+
|
|
10
|
+
}
|
data/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
URBANopt
|
|
1
|
+
URBANopt<sup>™</sup>, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
2
2
|
contributors. All rights reserved.
|
|
3
3
|
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification,
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# URBANopt Core
|
|
2
2
|
|
|
3
|
-
URBANopt core libraries and measures.
|
|
3
|
+
URBANopt<sup>TM</sup> core libraries and measures.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -29,4 +29,4 @@ This Extension Gem stores the base information needed for all derivative URBANop
|
|
|
29
29
|
* Update version in `/lib/urbanopt/core/version.rb`
|
|
30
30
|
* Create PR to master, after tests and reviews complete, then merge
|
|
31
31
|
* Locally - from the master branch, run `rake release`
|
|
32
|
-
& On GitHub, go to the releases page and update the latest release tag. Name it “Version x.y.z” and copy the CHANGELOG entry into the description box.
|
|
32
|
+
& On GitHub, go to the releases page and update the latest release tag. Name it “Version x.y.z” and copy the CHANGELOG entry into the description box.
|
data/Rakefile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt
|
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
3
3
|
# contributors. All rights reserved.
|
|
4
4
|
#
|
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
|
@@ -37,7 +37,7 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
37
37
|
require 'openstudio/extension/rake_task'
|
|
38
38
|
require 'urbanopt/core'
|
|
39
39
|
rake_task = OpenStudio::Extension::RakeTask.new
|
|
40
|
-
rake_task.set_extension_class(URBANopt::Core::Extension)
|
|
40
|
+
rake_task.set_extension_class(URBANopt::Core::Extension, 'urbanopt/urbanopt-core-gem')
|
|
41
41
|
|
|
42
42
|
require 'rubocop/rake_task'
|
|
43
43
|
RuboCop::RakeTask.new
|
data/doc_templates/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
URBANopt
|
|
1
|
+
URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
2
2
|
contributors. All rights reserved.
|
|
3
3
|
|
|
4
4
|
Redistribution and use in source and binary forms, with or without modification,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%
|
|
2
2
|
# *********************************************************************************
|
|
3
|
-
# URBANopt
|
|
3
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
4
4
|
# contributors. All rights reserved.
|
|
5
5
|
#
|
|
6
6
|
# Redistribution and use in source and binary forms, with or without modification,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* @preserve
|
|
2
|
-
* URBANopt
|
|
2
|
+
* URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
|
|
3
3
|
* Use of this source code is governed by the BSD 3-Clause license.
|
|
4
4
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt
|
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
3
3
|
# contributors. All rights reserved.
|
|
4
4
|
#
|
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
data/lib/urbanopt/core.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt
|
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
3
3
|
# contributors. All rights reserved.
|
|
4
4
|
#
|
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt
|
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
3
3
|
# contributors. All rights reserved.
|
|
4
4
|
#
|
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt
|
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
3
3
|
# contributors. All rights reserved.
|
|
4
4
|
#
|
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt
|
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
3
3
|
# contributors. All rights reserved.
|
|
4
4
|
#
|
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# *********************************************************************************
|
|
2
|
-
# URBANopt
|
|
2
|
+
# URBANopt™, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
|
|
3
3
|
# contributors. All rights reserved.
|
|
4
4
|
#
|
|
5
5
|
# Redistribution and use in source and binary forms, with or without modification,
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
|
|
31
31
|
module URBANopt
|
|
32
32
|
module Core
|
|
33
|
-
VERSION = '0.
|
|
33
|
+
VERSION = '0.5.0'.freeze
|
|
34
34
|
end
|
|
35
35
|
end
|
data/urbanopt-core-gem.gemspec
CHANGED
|
@@ -20,11 +20,11 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.bindir = 'exe'
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
22
|
spec.require_paths = ['lib']
|
|
23
|
-
spec.required_ruby_version = '~> 2.
|
|
23
|
+
spec.required_ruby_version = '~> 2.5.0'
|
|
24
24
|
|
|
25
|
-
spec.add_development_dependency 'bundler', '~> 1
|
|
26
|
-
spec.add_development_dependency 'rake', '~>
|
|
25
|
+
spec.add_development_dependency 'bundler', '~> 2.1'
|
|
26
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
|
27
27
|
spec.add_development_dependency 'rspec', '~> 3.7'
|
|
28
28
|
|
|
29
|
-
spec.add_dependency 'openstudio-extension', '~> 0.1
|
|
29
|
+
spec.add_dependency 'openstudio-extension', '~> 0.3.1'
|
|
30
30
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: urbanopt-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dan Macumber
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-
|
|
12
|
+
date: 2020-11-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -17,28 +17,28 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - "~>"
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: '1
|
|
20
|
+
version: '2.1'
|
|
21
21
|
type: :development
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - "~>"
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: '1
|
|
27
|
+
version: '2.1'
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: rake
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
|
32
32
|
- - "~>"
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '
|
|
34
|
+
version: '13.0'
|
|
35
35
|
type: :development
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
39
|
- - "~>"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
41
|
+
version: '13.0'
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
43
|
name: rspec
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -59,14 +59,14 @@ dependencies:
|
|
|
59
59
|
requirements:
|
|
60
60
|
- - "~>"
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
|
-
version: 0.1
|
|
62
|
+
version: 0.3.1
|
|
63
63
|
type: :runtime
|
|
64
64
|
prerelease: false
|
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
66
66
|
requirements:
|
|
67
67
|
- - "~>"
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: 0.1
|
|
69
|
+
version: 0.3.1
|
|
70
70
|
description: URBANopt core library and measures
|
|
71
71
|
email:
|
|
72
72
|
- nicholas.long@nrel.gov
|
|
@@ -81,6 +81,7 @@ files:
|
|
|
81
81
|
- CHANGELOG.md
|
|
82
82
|
- CONTRIBUTING.md
|
|
83
83
|
- Gemfile
|
|
84
|
+
- Jenkinsfile
|
|
84
85
|
- LICENSE.md
|
|
85
86
|
- README.md
|
|
86
87
|
- Rakefile
|
|
@@ -89,7 +90,6 @@ files:
|
|
|
89
90
|
- doc_templates/copyright_erb.txt
|
|
90
91
|
- doc_templates/copyright_js.txt
|
|
91
92
|
- doc_templates/copyright_ruby.txt
|
|
92
|
-
- lib/change_log.rb
|
|
93
93
|
- lib/measures/.gitkeep
|
|
94
94
|
- lib/urbanopt/core.rb
|
|
95
95
|
- lib/urbanopt/core/extension.rb
|
|
@@ -108,15 +108,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
108
108
|
requirements:
|
|
109
109
|
- - "~>"
|
|
110
110
|
- !ruby/object:Gem::Version
|
|
111
|
-
version: 2.
|
|
111
|
+
version: 2.5.0
|
|
112
112
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
113
|
requirements:
|
|
114
114
|
- - ">="
|
|
115
115
|
- !ruby/object:Gem::Version
|
|
116
116
|
version: '0'
|
|
117
117
|
requirements: []
|
|
118
|
-
|
|
119
|
-
rubygems_version: 2.4.5.1
|
|
118
|
+
rubygems_version: 3.1.4
|
|
120
119
|
signing_key:
|
|
121
120
|
specification_version: 4
|
|
122
121
|
summary: URBANopt core library and measures
|
data/lib/change_log.rb
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'github_api'
|
|
4
|
-
require 'date'
|
|
5
|
-
require 'optparse'
|
|
6
|
-
require 'optparse/date'
|
|
7
|
-
|
|
8
|
-
# Instructions:
|
|
9
|
-
# Get a token from github's settings (https://github.com/settings/tokens)
|
|
10
|
-
#
|
|
11
|
-
# Example:
|
|
12
|
-
# ruby change_log.rb -t abcdefghijklmnopqrstuvwxyz -s 2017-09-06
|
|
13
|
-
#
|
|
14
|
-
|
|
15
|
-
options = {}
|
|
16
|
-
OptionParser.new do |opts|
|
|
17
|
-
opts.banner = "Usage: change_log.rb [options]\n" \
|
|
18
|
-
'Prints New, Open, Closed Issues, and number of accepted PRs'
|
|
19
|
-
opts.separator ''
|
|
20
|
-
|
|
21
|
-
# defaults, go back 90 days
|
|
22
|
-
options[:start_date] = Date.today - 90
|
|
23
|
-
options[:end_date] = Date.today
|
|
24
|
-
|
|
25
|
-
opts.on('-s', '--start-date [DATE]', Date, 'Start of data (e.g. 2017-09-06)') do |v|
|
|
26
|
-
options[:start_date] = v
|
|
27
|
-
end
|
|
28
|
-
opts.on('-e', '--end-date [DATE]', Date, 'End of data (e.g. 2017-09-13)') do |v|
|
|
29
|
-
options[:end_date] = v
|
|
30
|
-
end
|
|
31
|
-
opts.on('-t', '--token [String]', String, 'Github API Token') do |v|
|
|
32
|
-
options[:token] = v
|
|
33
|
-
end
|
|
34
|
-
end.parse!
|
|
35
|
-
|
|
36
|
-
# Convert dates to time objects
|
|
37
|
-
options[:start_date] = Time.parse(options[:start_date].to_s)
|
|
38
|
-
options[:end_date] = Time.parse(options[:end_date].to_s)
|
|
39
|
-
puts options
|
|
40
|
-
|
|
41
|
-
### Repository options
|
|
42
|
-
repo_owner = 'URBANopt'
|
|
43
|
-
repo = 'urbanopt-core-gem'
|
|
44
|
-
|
|
45
|
-
github = Github.new
|
|
46
|
-
if options[:token]
|
|
47
|
-
puts 'Using github token'
|
|
48
|
-
github = Github.new oauth_token: options[:token]
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
total_open_issues = []
|
|
52
|
-
total_open_pull_requests = []
|
|
53
|
-
new_issues = []
|
|
54
|
-
closed_issues = []
|
|
55
|
-
accepted_pull_requests = []
|
|
56
|
-
|
|
57
|
-
def get_num(issue)
|
|
58
|
-
issue.html_url.split('/')[-1].to_i
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def get_issue_num(issue)
|
|
62
|
-
"\##{get_num(issue)}"
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def get_html_url(issue)
|
|
66
|
-
issue.html_url
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def get_title(issue)
|
|
70
|
-
issue.title
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
def print_issue(issue)
|
|
74
|
-
is_feature = false
|
|
75
|
-
issue.labels.each { |label| is_feature = true if label.name == 'Feature Request' }
|
|
76
|
-
|
|
77
|
-
if is_feature
|
|
78
|
-
"- Improved [#{get_issue_num(issue)}]( #{get_html_url(issue)} ), #{get_title(issue)}"
|
|
79
|
-
else
|
|
80
|
-
"- Fixed [#{get_issue_num(issue)}]( #{get_html_url(issue)} ), #{get_title(issue)}"
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Process Open Issues
|
|
85
|
-
results = -1
|
|
86
|
-
page = 1
|
|
87
|
-
while results != 0
|
|
88
|
-
resp = github.issues.list user: repo_owner, repo: repo, sort: 'created', direction: 'asc',
|
|
89
|
-
state: 'open', per_page: 100, page: page
|
|
90
|
-
results = resp.length
|
|
91
|
-
resp.env[:body].each do |issue, _index|
|
|
92
|
-
created = Time.parse(issue.created_at)
|
|
93
|
-
if !issue.key?(:pull_request)
|
|
94
|
-
total_open_issues << issue
|
|
95
|
-
if created >= options[:start_date] && created <= options[:end_date]
|
|
96
|
-
new_issues << issue
|
|
97
|
-
end
|
|
98
|
-
else
|
|
99
|
-
total_open_pull_requests << issue
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
page += 1
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
# Process Closed Issues
|
|
107
|
-
results = -1
|
|
108
|
-
page = 1
|
|
109
|
-
while results != 0
|
|
110
|
-
resp = github.issues.list user: repo_owner, repo: repo, sort: 'created', direction: 'asc',
|
|
111
|
-
state: 'closed', per_page: 100, page: page
|
|
112
|
-
results = resp.length
|
|
113
|
-
resp.env[:body].each do |issue, _index|
|
|
114
|
-
created = Time.parse(issue.created_at)
|
|
115
|
-
closed = Time.parse(issue.closed_at)
|
|
116
|
-
if !issue.key?(:pull_request)
|
|
117
|
-
if created >= options[:start_date] && created <= options[:end_date]
|
|
118
|
-
new_issues << issue
|
|
119
|
-
end
|
|
120
|
-
if closed >= options[:start_date] && closed <= options[:end_date]
|
|
121
|
-
closed_issues << issue
|
|
122
|
-
end
|
|
123
|
-
elsif closed >= options[:start_date] && closed <= options[:end_date]
|
|
124
|
-
accepted_pull_requests << issue
|
|
125
|
-
end
|
|
126
|
-
end
|
|
127
|
-
|
|
128
|
-
page += 1
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
closed_issues.sort! { |x, y| get_num(x) <=> get_num(y) }
|
|
132
|
-
new_issues.sort! { |x, y| get_num(x) <=> get_num(y) }
|
|
133
|
-
accepted_pull_requests.sort! { |x, y| get_num(x) <=> get_num(y) }
|
|
134
|
-
total_open_pull_requests.sort! { |x, y| get_num(x) <=> get_num(y) }
|
|
135
|
-
|
|
136
|
-
puts "Total Open Issues: #{total_open_issues.length}"
|
|
137
|
-
puts "Total Open Pull Requests: #{total_open_pull_requests.length}"
|
|
138
|
-
puts "\nDate Range: #{options[:start_date].strftime('%m/%d/%y')} - #{options[:end_date].strftime('%m/%d/%y')}:"
|
|
139
|
-
puts "\nNew Issues: #{new_issues.length} (" + new_issues.map { |issue| get_issue_num(issue) }.join(', ') + ')'
|
|
140
|
-
|
|
141
|
-
puts "\nClosed Issues: #{closed_issues.length}"
|
|
142
|
-
closed_issues.each { |issue| puts print_issue(issue) }
|
|
143
|
-
|
|
144
|
-
puts "\nAccepted Pull Requests: #{accepted_pull_requests.length}"
|
|
145
|
-
accepted_pull_requests.each { |issue| puts print_issue(issue) }
|
|
146
|
-
|
|
147
|
-
puts "\nAll Open Issues: #{total_open_issues.length} (" + total_open_issues.map { |issue| get_issue_num(issue) }.join(', ') + ')'
|