Sha256: cdd1e94b59b07fe19c63521d9a90066b7a35fc6437e6b344fe32d568875a1191

Contents?: true

Size: 846 Bytes

Versions: 17

Compression:

Stored size: 846 Bytes

Contents

module Byebug
  module Helpers
    #
    # Utilities for managing gem paths
    #
    module PathHelper
      def bin_file
        @bin_file ||= Gem.bin_path('byebug', 'byebug')
      end

      def root_path
        @root_path ||= File.expand_path('../..', bin_file)
      end

      def lib_files
        @lib_files ||= expand_from_root('lib/**/*.{rb,yml}')
      end

      def ext_files
        @ext_files ||= expand_from_root('ext/**/*.{c,h,rb}')
      end

      def test_files
        @test_files ||= expand_from_root('test/**/*.rb')
      end

      def gem_files
        @gem_files ||= [bin_file] + lib_files + ext_files
      end

      def all_files
        @all_files ||= gem_files + test_files
      end

      private

      def expand_from_root(glob)
        Dir.glob(File.expand_path(glob, root_path))
      end
    end
  end
end

Version data entries

17 entries across 16 versions & 2 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/byebug-9.0.6/lib/byebug/helpers/path.rb
tdiary-5.0.5 vendor/bundle/gems/byebug-9.0.6/lib/byebug/helpers/path.rb
tdiary-5.0.4 vendor/bundle/gems/byebug-9.0.6/lib/byebug/helpers/path.rb
byebug-9.0.6 lib/byebug/helpers/path.rb
byebug-9.0.5 lib/byebug/helpers/path.rb
byebug-9.0.4 lib/byebug/helpers/path.rb
byebug-9.0.3 lib/byebug/helpers/path.rb
byebug-9.0.2 lib/byebug/helpers/path.rb
byebug-9.0.1 lib/byebug/helpers/path.rb
byebug-9.0.0 lib/byebug/helpers/path.rb
byebug-8.2.5 lib/byebug/helpers/path.rb
byebug-8.2.4 lib/byebug/helpers/path.rb
byebug-8.2.3 lib/byebug/helpers/path.rb
byebug-8.2.2 lib/byebug/helpers/path.rb
byebug-8.2.1 lib/byebug/helpers/path.rb
byebug-8.2.0 lib/byebug/helpers/path.rb
byebug-8.1.0 lib/byebug/helpers/path.rb