Sha256: 3a150a45b1bafee45c96c40cd5a809a476796b05249c22d940460f543c928d92

Contents?: true

Size: 544 Bytes

Versions: 2

Compression:

Stored size: 544 Bytes

Contents

module MRuby::CLI
  # Wrapper around MRuby::Source module to stop execution if MRuby's source is not available
  module Source
    ERROR_MESSAGE = <<-EOM

Error:
      To execute this action you need a copy of MRuby's source.

      Add this to your Gemfile:

          gem "mruby-source", github: 'sagmor/mruby', branch: 'gem'

      Run bundle install and re-run your last command

    EOM

    def self.path
      require 'mruby/source'

      MRuby::Source::ROOT
    rescue LoadError
      puts ERROR_MESSAGE
      exit 1
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mruby-cli-0.2.0 lib/mruby/cli/source.rb
mruby-cli-0.1.2 lib/mruby/cli/source.rb