From 6d00eb380465de140e91fc72130008660cf4a359 Mon Sep 17 00:00:00 2001 From: Terry Brady Date: Wed, 13 Nov 2024 13:52:32 -0800 Subject: [PATCH] 7.1 changes --- Gemfile | 2 +- Gemfile.lock | 155 ++++++++++-------- app/controllers/application_controller.rb | 2 +- app/lib/group_ldap.rb | 5 +- app/lib/ldap_mixin.rb | 4 +- app/lib/merritt_retry_mixin.rb | 2 +- app/lib/user_ldap.rb | 4 +- bin/setup | 2 +- config/application.rb | 7 +- config/environments/development.rb | 8 +- config/environments/production.rb | 56 ++++--- config/environments/test.rb | 20 ++- .../initializers/content_security_policy.rb | 13 +- .../initializers/filter_parameter_logging.rb | 4 +- config/initializers/permissions_policy.rb | 20 ++- spec/libs/group_ldap_spec.rb | 2 +- spec/libs/institution_ldap_spec.rb | 2 +- spec/libs/streamer_spec.rb | 1 + spec/libs/user_ldap_spec.rb | 2 +- 19 files changed, 177 insertions(+), 134 deletions(-) diff --git a/Gemfile b/Gemfile index 08c0a4923..21e496d00 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ gem 'activeresource' gem 'json' gem 'multi_json' gem 'mysql2' -gem 'rails', '7.0.1' +gem 'rails', '~> 7.1' gem 'aws-sdk-ec2' gem 'aws-sdk-ssm' diff --git a/Gemfile.lock b/Gemfile.lock index b447963e6..d0797dd9a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,78 +8,90 @@ GIT GEM remote: http://rubygems.org/ specs: - actioncable (7.0.1) - actionpack (= 7.0.1) - activesupport (= 7.0.1) + actioncable (7.1.5) + actionpack (= 7.1.5) + activesupport (= 7.1.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.1) - actionpack (= 7.0.1) - activejob (= 7.0.1) - activerecord (= 7.0.1) - activestorage (= 7.0.1) - activesupport (= 7.0.1) + zeitwerk (~> 2.6) + actionmailbox (7.1.5) + actionpack (= 7.1.5) + activejob (= 7.1.5) + activerecord (= 7.1.5) + activestorage (= 7.1.5) + activesupport (= 7.1.5) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.1) - actionpack (= 7.0.1) - actionview (= 7.0.1) - activejob (= 7.0.1) - activesupport (= 7.0.1) + actionmailer (7.1.5) + actionpack (= 7.1.5) + actionview (= 7.1.5) + activejob (= 7.1.5) + activesupport (= 7.1.5) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp - rails-dom-testing (~> 2.0) - actionpack (7.0.1) - actionview (= 7.0.1) - activesupport (= 7.0.1) - rack (~> 2.0, >= 2.2.0) + rails-dom-testing (~> 2.2) + actionpack (7.1.5) + actionview (= 7.1.5) + activesupport (= 7.1.5) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.1) - actionpack (= 7.0.1) - activerecord (= 7.0.1) - activestorage (= 7.0.1) - activesupport (= 7.0.1) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.5) + actionpack (= 7.1.5) + activerecord (= 7.1.5) + activestorage (= 7.1.5) + activesupport (= 7.1.5) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.1) - activesupport (= 7.0.1) + actionview (7.1.5) + activesupport (= 7.1.5) builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.1) - activesupport (= 7.0.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.5) + activesupport (= 7.1.5) globalid (>= 0.3.6) - activemodel (7.0.1) - activesupport (= 7.0.1) + activemodel (7.1.5) + activesupport (= 7.1.5) activemodel-serializers-xml (1.0.3) activemodel (>= 5.0.0.a) activesupport (>= 5.0.0.a) builder (~> 3.1) - activerecord (7.0.1) - activemodel (= 7.0.1) - activesupport (= 7.0.1) + activerecord (7.1.5) + activemodel (= 7.1.5) + activesupport (= 7.1.5) + timeout (>= 0.4.0) activeresource (6.1.4) activemodel (>= 6.0) activemodel-serializers-xml (~> 1.0) activesupport (>= 6.0) - activestorage (7.0.1) - actionpack (= 7.0.1) - activejob (= 7.0.1) - activerecord (= 7.0.1) - activesupport (= 7.0.1) + activestorage (7.1.5) + actionpack (= 7.1.5) + activejob (= 7.1.5) + activerecord (= 7.1.5) + activesupport (= 7.1.5) marcel (~> 1.0) - mini_mime (>= 1.1.0) - activesupport (7.0.1) + activesupport (7.1.5) + base64 + benchmark (>= 0.3) + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) + logger (>= 1.4.2) minitest (>= 5.1) + mutex_m + securerandom (>= 0.3) tzinfo (~> 2.0) addressable (2.8.7) public_suffix (>= 2.0.2, < 7.0) @@ -104,6 +116,7 @@ GEM aws-eventstream (~> 1, >= 1.0.2) base64 (0.2.0) bcrypt_pbkdf (1.1.1) + benchmark (0.4.0) bigdecimal (3.1.8) bindex (0.8.1) bootsnap (1.18.4) @@ -141,6 +154,7 @@ GEM coderay (1.1.3) colorize (1.1.0) concurrent-ruby (1.3.4) + connection_pool (2.4.1) crack (1.0.0) bigdecimal rexml @@ -160,6 +174,7 @@ GEM diffy (3.4.3) docile (1.4.1) domain_name (0.6.20240107) + drb (2.2.1) ed25519 (1.3.0) equivalent-xml (0.6.0) nokogiri (>= 1.4.3) @@ -227,6 +242,7 @@ GEM minitest (5.25.1) msgpack (1.7.5) multi_json (1.15.0) + mutex_m (0.2.0) mysql2 (0.5.6) net-imap (0.4.18) date @@ -272,22 +288,27 @@ GEM rack (>= 0.4) rack-proxy (0.7.7) rack + rack-session (1.0.2) + rack (< 3) rack-test (2.1.0) rack (>= 1.3) - rails (7.0.1) - actioncable (= 7.0.1) - actionmailbox (= 7.0.1) - actionmailer (= 7.0.1) - actionpack (= 7.0.1) - actiontext (= 7.0.1) - actionview (= 7.0.1) - activejob (= 7.0.1) - activemodel (= 7.0.1) - activerecord (= 7.0.1) - activestorage (= 7.0.1) - activesupport (= 7.0.1) + rackup (1.0.1) + rack (< 3) + webrick + rails (7.1.5) + actioncable (= 7.1.5) + actionmailbox (= 7.1.5) + actionmailer (= 7.1.5) + actionpack (= 7.1.5) + actiontext (= 7.1.5) + actionview (= 7.1.5) + activejob (= 7.1.5) + activemodel (= 7.1.5) + activerecord (= 7.1.5) + activestorage (= 7.1.5) + activesupport (= 7.1.5) bundler (>= 1.15.0) - railties (= 7.0.1) + railties (= 7.1.5) rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest @@ -295,13 +316,14 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.1) - actionpack (= 7.0.1) - activesupport (= 7.0.1) - method_source + railties (7.1.5) + actionpack (= 7.1.5) + activesupport (= 7.1.5) + irb + rackup (>= 1.0.0) rake (>= 12.2) - thor (~> 1.0) - zeitwerk (~> 2.5) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) rb-fsevent (0.11.2) @@ -347,11 +369,12 @@ GEM rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.35.0) + rubocop-ast (1.36.1) parser (>= 3.3.1.0) ruby-prof (1.7.1) ruby-progressbar (1.13.0) rubyzip (2.3.2) + securerandom (0.3.2) selenium-webdriver (4.26.0) base64 (~> 0.2) logger (~> 1.4) @@ -459,7 +482,7 @@ DEPENDENCIES pry-remote puma rack-cache - rails (= 7.0.1) + rails (~> 7.1) rest-client rspec-rails rubocop diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 3f9b99d3a..82ebd4e2a 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -14,7 +14,7 @@ class ApplicationController < ActionController::Base include PaginationMixin include HttpMixin include MerrittRetryMixin - require 'streamer' + require_relative '../lib/streamer' helper_method( :available_groups, diff --git a/app/lib/group_ldap.rb b/app/lib/group_ldap.rb index 84f7cd7f3..3bbfd06d6 100644 --- a/app/lib/group_ldap.rb +++ b/app/lib/group_ldap.rb @@ -1,7 +1,6 @@ require 'rubygems' require 'net/ldap' -require 'noid' -require 'ldap_mixin' +# require 'ldap_mixin' module GroupLdap @@ -34,7 +33,7 @@ def add(groupid, description, permissions = %w[read write], extra_classes = ['me group_attributes = { objectclass: ['organizationalUnit'] + extra_classes, description: description, - arkId: "ark:/13030/#{@minter.mint}" + arkId: 'ark:/13030/12345' } true_or_exception(admin_ldap.add(dn: ns_dn(groupid), attributes: group_attributes)) diff --git a/app/lib/ldap_mixin.rb b/app/lib/ldap_mixin.rb index 22639c815..2f6477d31 100644 --- a/app/lib/ldap_mixin.rb +++ b/app/lib/ldap_mixin.rb @@ -2,8 +2,6 @@ # mixed in modules must define ns_dn(id) and obj_filter(id) methods which differ # for each (like a Java abstract class) as well as any specific methods for each -# require 'lib/noid' - module LdapMixin class LdapException < RuntimeError; end @@ -22,7 +20,7 @@ def initialize(host:, port:, base:, admin_user:, admin_password:, minter:, conne # minter: 'http://noid.cdlib.org/nd/noidu_g9' # connect_timeout: 60 - @minter = Noid::Minter.new(minter) + puts "minter #{minter} ignored" @base = base @ldap_connect = { host: host, diff --git a/app/lib/merritt_retry_mixin.rb b/app/lib/merritt_retry_mixin.rb index 1068a3bc1..1323530d4 100644 --- a/app/lib/merritt_retry_mixin.rb +++ b/app/lib/merritt_retry_mixin.rb @@ -18,7 +18,7 @@ def merritt_retry_block if retries > RETRY_LIMIT Rails.logger.error('Retries exhausted. Clearing all active connections.') # ActiveRecord::Base.clear_active_connections! - ActiveRecord::Base.clear_all_connections! + ActiveRecord::Base.connection_handler.clear_all_connections! # yet to try: flush_idle_connections raise RetryException, e end diff --git a/app/lib/user_ldap.rb b/app/lib/user_ldap.rb index f7e3e5eb3..becaa096e 100644 --- a/app/lib/user_ldap.rb +++ b/app/lib/user_ldap.rb @@ -1,6 +1,6 @@ require 'rubygems' require 'net/ldap' -# require 'lib/ldap_mixin' +# require 'ldap_mixin' module UserLdap class Server @@ -29,7 +29,7 @@ def add(userid, password, firstname, lastname, email) cn: "#{firstname} #{lastname}", displayName: "#{firstname} #{lastname}", userPassword: password, - arkId: "ark:/13030/#{@minter.mint}", + arkId: 'ark:/13030/12345', mail: email } true_or_exception(admin_ldap.add(dn: ns_dn(userid), attributes: attr)) diff --git a/bin/setup b/bin/setup index ec47b79b3..3cd5a9d78 100755 --- a/bin/setup +++ b/bin/setup @@ -5,7 +5,7 @@ require "fileutils" APP_ROOT = File.expand_path("..", __dir__) def system!(*args) - system(*args) || abort("\n== Command #{args} failed ==") + system(*args, exception: true) end FileUtils.chdir APP_ROOT do diff --git a/config/application.rb b/config/application.rb index dca763e2e..27590e6b3 100644 --- a/config/application.rb +++ b/config/application.rb @@ -11,7 +11,12 @@ module MrtDashboard class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.0 + config.load_defaults 7.1 + + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w[assets tasks]) # Configuration for the application, engines, and railties goes here. # diff --git a/config/environments/development.rb b/config/environments/development.rb index e522e6ec1..9003c2b1b 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -6,7 +6,7 @@ # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. - config.cache_classes = false + config.enable_reloading = true # Do not eager load code on boot. config.eager_load = false @@ -56,6 +56,9 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true + # Highlight code that enqueued background job in logs. + config.active_job.verbose_enqueue_logs = true + # Suppress logger output for asset requests. config.assets.quiet = true @@ -67,4 +70,7 @@ # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = false end diff --git a/config/environments/production.rb b/config/environments/production.rb index a2e6b0e6c..7e3d18987 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -4,7 +4,7 @@ # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. - config.cache_classes = true + config.enable_reloading = false # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers @@ -13,21 +13,20 @@ config.eager_load = true # Full error reports are disabled and caching is turned on. - config.consider_all_requests_local = false + config.consider_all_requests_local = false config.action_controller.perform_caching = true - # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] - # or in config/master.key. This key is used to decrypt credentials (and other encrypted files). + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). # config.require_master_key = true - # Disable serving static files from the `/public` folder by default since - # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. + # config.public_file_server.enabled = false # Compress CSS using a preprocessor. # config.assets.css_compressor = :sass - # Do not fallback to assets pipeline if a precompiled asset is missed. + # Do not fall back to assets pipeline if a precompiled asset is missed. config.assets.compile = false # Enable serving of images, stylesheets, and JavaScripts from an asset server. @@ -45,21 +44,31 @@ # config.action_cable.url = "wss://example.com/cable" # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # config.assume_ssl = true + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true - # Include generic and useful information about system operation, but avoid logging too much - # information to avoid inadvertent exposure of personally identifiable information (PII). - config.log_level = :info + # Log to STDOUT by default + config.logger = ActiveSupport::Logger.new($stdout) + .tap { |logger| logger.formatter = Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } # Prepend all log lines with the following tags. config.log_tags = [:request_id] + # "info" includes generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = ENV.fetch('RAILS_LOG_LEVEL', 'info') + # Use a different cache store in production. # config.cache_store = :mem_cache_store # Use a real queuing backend for Active Job (and separate queues per environment). - # config.active_job.queue_adapter = :resque + # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "mrt_dashboard_production" config.action_mailer.perform_caching = false @@ -75,19 +84,14 @@ # Don't log any deprecations. config.active_support.report_deprecations = false - # Use default logging formatter so that PID and timestamp are not suppressed. - config.log_formatter = Logger::Formatter.new - - # Use a different logger for distributed setups. - # require "syslog/logger" - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") - - if ENV['RAILS_LOG_TO_STDOUT'].present? - logger = ActiveSupport::Logger.new($stdout) - logger.formatter = config.log_formatter - config.logger = ActiveSupport::TaggedLogging.new(logger) - end - # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false + + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } end diff --git a/config/environments/test.rb b/config/environments/test.rb index 5f6cef4d6..367f8b5a1 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,12 +8,13 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # Turn false under Spring and add config.action_view.cache_template_loading = true. - config.cache_classes = true + # While tests run files are not watched, reloading is not necessary. + config.enable_reloading = false - # Eager loading loads your whole application. When running a single test locally, - # this probably isn't necessary. It's a good idea to do in a continuous integration - # system, or in some way before deploying your code. + # Eager loading loads your entire application. When running a single test locally, + # this is usually not necessary, and can slow down your test suite. However, it's + # recommended that you enable it in continuous integration systems to ensure eager + # loading is working properly before deploying your code. config.eager_load = ENV['CI'].present? # Configure public file server for tests with Cache-Control for performance. @@ -23,12 +24,12 @@ } # Show full error reports and disable caching. - config.consider_all_requests_local = true + config.consider_all_requests_local = true config.action_controller.perform_caching = false config.cache_store = :null_store - # Raise exceptions instead of rendering exception templates. - config.action_dispatch.show_exceptions = false + # Render exception templates for rescuable exceptions and raise for other exceptions. + config.action_dispatch.show_exceptions = :rescuable # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false @@ -57,4 +58,7 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = false end diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 3621f97f8..b3076b38f 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -1,8 +1,8 @@ # Be sure to restart your server when you modify this file. -# Define an application-wide content security policy -# For further information see the following documentation -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header # Rails.application.configure do # config.content_security_policy do |policy| @@ -16,11 +16,10 @@ # # policy.report_uri "/csp-violation-report-endpoint" # end # -# # Generate session nonces for permitted importmap and inline scripts +# # Generate session nonces for permitted importmap, inline scripts, and inline styles. # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } -# config.content_security_policy_nonce_directives = %w(script-src) +# config.content_security_policy_nonce_directives = %w(script-src style-src) # -# # Report CSP violations to a specified URI. See: -# # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only +# # Report violations without enforcing the policy. # # config.content_security_policy_report_only = true # end diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 3e6969490..262e86202 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,6 +1,8 @@ # Be sure to restart your server when you modify this file. -# Configure sensitive parameters which will be filtered from the log file. +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. Rails.application.config.filter_parameters += %i[ passw secret token _key crypt salt certificate otp ssn ] diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb index 00f64d71b..7db3b9577 100644 --- a/config/initializers/permissions_policy.rb +++ b/config/initializers/permissions_policy.rb @@ -1,11 +1,13 @@ +# Be sure to restart your server when you modify this file. + # Define an application-wide HTTP permissions policy. For further -# information see https://developers.google.com/web/updates/2018/06/feature-policy -# -# Rails.application.config.permissions_policy do |f| -# f.camera :none -# f.gyroscope :none -# f.microphone :none -# f.usb :none -# f.fullscreen :self -# f.payment :self, "https://secure.example.com" +# information see: https://developers.google.com/web/updates/2018/06/feature-policy + +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" # end diff --git a/spec/libs/group_ldap_spec.rb b/spec/libs/group_ldap_spec.rb index d177e1bc7..d2b5147b9 100644 --- a/spec/libs/group_ldap_spec.rb +++ b/spec/libs/group_ldap_spec.rb @@ -1,5 +1,5 @@ require 'rails_helper' -require 'group_ldap' +require_relative '../../app/lib/group_ldap' module GroupLdap describe Server do diff --git a/spec/libs/institution_ldap_spec.rb b/spec/libs/institution_ldap_spec.rb index ebe315716..c9173a6c8 100644 --- a/spec/libs/institution_ldap_spec.rb +++ b/spec/libs/institution_ldap_spec.rb @@ -1,5 +1,5 @@ require 'rails_helper' -require 'institution_ldap' +require_relative '../../app/lib/institution_ldap' module InstitutionLdap describe Server do diff --git a/spec/libs/streamer_spec.rb b/spec/libs/streamer_spec.rb index 6bd26afab..a0ddf0664 100644 --- a/spec/libs/streamer_spec.rb +++ b/spec/libs/streamer_spec.rb @@ -1,4 +1,5 @@ require 'rails_helper' +require_relative '../../app/lib/streamer' require 'webmock/rspec' describe Streamer do diff --git a/spec/libs/user_ldap_spec.rb b/spec/libs/user_ldap_spec.rb index e7a115458..bc60b6722 100644 --- a/spec/libs/user_ldap_spec.rb +++ b/spec/libs/user_ldap_spec.rb @@ -1,5 +1,5 @@ require 'rails_helper' -require 'user_ldap' +require_relative '../../app/lib/user_ldap' module UserLdap describe Server do