Module: Appraisal::Utils
- Defined in:
- lib/appraisal/utils.rb
Overview
Contains methods for various operations
Class Method Summary collapse
- .format_arguments(arguments) ⇒ Object
- .format_string(object, enclosing_object = false) ⇒ Object
- .support_parallel_installation? ⇒ Boolean
Class Method Details
.format_arguments(arguments) ⇒ Object
25 26 27 |
# File 'lib/appraisal/utils.rb', line 25 def self.format_arguments(arguments) arguments.map { |object| format_string(object, false) }.join(', ') end |
.format_string(object, enclosing_object = false) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/appraisal/utils.rb', line 8 def self.format_string(object, enclosing_object = false) case object when Hash items = object.map do |key, value| "#{format_string(key, true)} => #{format_string(value, true)}" end if enclosing_object "{ #{items.join(', ')} }" else items.join(', ') end else object.inspect end end |
.support_parallel_installation? ⇒ Boolean
4 5 6 |
# File 'lib/appraisal/utils.rb', line 4 def self.support_parallel_installation? Gem::Version.create(Bundler::VERSION) >= Gem::Version.create('1.4.0.pre.1') end |