Sha256: 5eee27220e74d331a3a9b83fca1be990b96303386bf419aee83026dcbc06a674
Contents?: true
Size: 690 Bytes
Versions: 4
Compression:
Stored size: 690 Bytes
Contents
require 'singleton' class SpecConfig include Singleton def initialize if ENV['MONGODB_URI'] @uri_str = ENV['MONGODB_URI'] @uri = Mongo::URI.new(@uri_str) end end attr_reader :uri_str attr_reader :uri def addresses if @uri @uri.servers else ['127.0.0.1'] end end def mri? !jruby? end def jruby? RUBY_PLATFORM =~ /\bjava\b/ end def platform RUBY_PLATFORM end def client_debug? %w(1 true yes).include?(ENV['CLIENT_DEBUG'] && ENV['CLIENT_DEBUG'].downcase) end def app_tests? %w(1 true yes).include?(ENV['APP_TESTS'] && ENV['APP_TESTS'].downcase) end def ci? !!ENV['CI'] end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
mongoid-7.0.12 | spec/support/spec_config.rb |
mongoid-7.0.11 | spec/support/spec_config.rb |
mongoid-7.0.10 | spec/support/spec_config.rb |
mongoid-7.0.8 | spec/support/spec_config.rb |