lib/convenient_service/dependencies.rb in convenient_service-0.11.0 vs lib/convenient_service/dependencies.rb in convenient_service-0.12.0
- old
+ new
@@ -85,22 +85,35 @@
##
# @return [Boolean]
# @note Expected to be called from `irb`, `pry`, `spec_helper.rb`, etc.
#
+ # @internal
+ # NOTE: `byebug` has C extensions, that is why it is NOT supported in JRuby.
+ # - https://github.com/deivid-rodriguez/byebug/tree/master/ext/byebug
+ # - https://github.com/deivid-rodriguez/byebug/issues/179#issuecomment-152727003
+ #
def require_development_tools
require "awesome_print"
- require "byebug"
+ require "byebug" unless ruby.jruby?
require "paint"
require "rouge"
require "tempfile"
- require_relative "dependencies/extractions/byebug_syntax_highlighting"
- require_relative "dependencies/extractions/b"
+ require_relative "dependencies/extractions/byebug_syntax_highlighting" unless ruby.jruby?
+ require_relative "dependencies/extractions/b" unless ruby.jruby?
end
##
+ # @return [Boolean]
+ # @note Expected to be called from `spec_helper.rb`.
+ #
+ def require_test_tools
+ require "faker"
+ end
+
+ ##
# Loads RSpec extensions like `be_success` matcher, `stub_service` helper, etc.
#
# @return [Boolean]
# @note Expected to be called from `spec_helper.rb`.
#
@@ -110,21 +123,9 @@
require "rspec/mocks"
require "tempfile"
require_relative "rspec"
- end
-
- ##
- # Loads test factory.
- #
- # @return [Boolean]
- # @note Expected to be called from `spec_helper.rb`.
- #
- def require_factory
- require "faker"
-
- require_relative "factory"
end
##
# Loads standard config examples.
#