Skip to content

Commit

Permalink
Merge pull request #199 from NREL/bundler-hack
Browse files Browse the repository at this point in the history
Bundler hack to handle conflict with OpenStudio
  • Loading branch information
kflemin authored Jan 10, 2025
2 parents 15d0b6c + af09ba8 commit 054c184
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 11 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# OpenStudio(R) Extension Gem

## Version 0.8.3
* [#199]( https://github.com/NREL/openstudio-extension-gem/pull/199), Patch for bundler conflict issue

## Version 0.8.2

* [#192]( https://github.com/NREL/openstudio-extension-gem/pull/192), Pinned regexp_parser version
Expand Down
15 changes: 10 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@
# See also https://openstudio.net/license
# *******************************************************************************

require 'bundler/gem_tasks'
if !defined?(Bundler)
require 'bundler/gem_tasks'
end
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)

require 'openstudio/extension/rake_task'
require 'openstudio/extension'
rake_task = OpenStudio::Extension::RakeTask.new
rake_task.set_extension_class(OpenStudio::Extension::Extension, 'nrel/openstudio-extension-gem')
# Only load extension tasks if we're not installing
unless ARGV.include?('install')
require 'openstudio/extension/rake_task'
require 'openstudio/extension'
rake_task = OpenStudio::Extension::RakeTask.new
rake_task.set_extension_class(OpenStudio::Extension::Extension, 'nrel/openstudio-extension-gem')
end

require 'rubocop/rake_task'
RuboCop::RakeTask.new
Expand Down
4 changes: 3 additions & 1 deletion bin/console
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env ruby

require 'bundler/setup'
if !defined?(Bundler)
require 'bundler/setup'
end
require 'openstudio/extension'

# You can add fixtures and/or initialization code here to make experimenting
Expand Down
4 changes: 3 additions & 1 deletion init_templates/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# See also https://openstudio.net/license
# *******************************************************************************

require 'bundler/setup'
if !defined?(Bundler)
require 'bundler/setup'
end
require 'openstudio/GEM_NAME_UNDERSCORES'

RSpec.configure do |config|
Expand Down
5 changes: 4 additions & 1 deletion lib/openstudio/extension/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# See also https://openstudio.net/license
# *******************************************************************************

require 'bundler'
# Check if Bundler is already loaded
if !defined?(Bundler)
require 'bundler'
end
require 'fileutils'
require 'json'
require 'open3'
Expand Down
5 changes: 4 additions & 1 deletion lib/openstudio/extension/runner_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# See also https://openstudio.net/license
# *******************************************************************************

require 'bundler'
# Check if Bundler is already loaded
if !defined?(Bundler)
require 'bundler'
end
require 'fileutils'
require 'json'
require 'parallel'
Expand Down
2 changes: 1 addition & 1 deletion lib/openstudio/extension/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

module OpenStudio
module Extension
VERSION = '0.8.2'.freeze
VERSION = '0.8.3'.freeze
end
end
2 changes: 2 additions & 0 deletions openstudio-extension.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ Gem::Specification.new do |spec|
spec.add_dependency 'octokit', '~> 4.18.0' # for change logs
spec.add_dependency 'openstudio_measure_tester', '~> 0.4.0'
spec.add_dependency 'openstudio-workflow', '~> 2.4.0'
# parallel, regexp_parser, and addressable versions are pinned to avoid test_with_openstudio errors
spec.add_dependency 'parallel', '~> 1.19.1'
spec.add_dependency 'regexp_parser', '2.9.0'
spec.add_dependency 'addressable', '2.8.1'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.9'
end
4 changes: 3 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# See also https://openstudio.net/license
# *******************************************************************************

require 'bundler/setup'
if !defined?(Bundler)
require 'bundler/setup'
end
require 'openstudio/extension'

RSpec.configure do |config|
Expand Down

0 comments on commit 054c184

Please sign in to comment.