lib/convenient_service/dependencies.rb in convenient_service-0.13.0 vs lib/convenient_service/dependencies.rb in convenient_service-0.14.0

- old
+ new

@@ -290,13 +290,14 @@ ## # @api private # # Loads standard config examples. # + # @param version [String] # @return [Boolean] # - def require_standard_examples + def require_standard_examples(version: "") ## # - https://ruby-doc.org/stdlib-2.7.0/libdoc/date/rdoc/Date.html # - https://ruby-doc.org/stdlib-2.7.0/libdoc/date/rdoc/DateTime.html # - https://github.com/ruby/date # @@ -323,25 +324,26 @@ # - https://ruby-doc.org/stdlib-2.7.0/libdoc/uri/rdoc/URI.html # - https://github.com/ruby/uri # require "uri" - require_relative "examples/standard/cowsay" - require_relative "examples/standard/date_time" - require_relative "examples/standard/factorial" - require_relative "examples/standard/gemfile" - require_relative "examples/standard/request_params" + require_relative ::File.join("examples", "standard", version, "cowsay") + require_relative ::File.join("examples", "standard", version, "date_time") + require_relative ::File.join("examples", "standard", version, "factorial") + require_relative ::File.join("examples", "standard", version, "gemfile") + require_relative ::File.join("examples", "standard", version, "request_params") end ## # @api private # # Loads rails config examples. # + # @param version [String] # @return [Boolean] # - def require_rails_examples + def require_rails_examples(version: "") ## # - https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html # - https://github.com/flori/json # require "json" @@ -355,21 +357,22 @@ # - https://ruby-doc.org/stdlib-2.7.0/libdoc/webrick/rdoc/WEBrick.html # - https://github.com/ruby/webrick # require "webrick" - require_relative "examples/rails/gemfile" + require_relative ::File.join("examples", "rails", version, "gemfile") end ## # @api private # # Loads dry config examples. # + # @param version [String] # @return [Boolean] # - def require_dry_examples + def require_dry_examples(version: "") ## # - https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html # - https://github.com/flori/json # require "json" @@ -383,10 +386,10 @@ # - https://ruby-doc.org/stdlib-2.7.0/libdoc/webrick/rdoc/WEBrick.html # - https://github.com/ruby/webrick # require "webrick" - require_relative "examples/dry/gemfile" + require_relative ::File.join("examples", "dry", version, "gemfile") end ## # @api private #