Sha256: a9c4df481db420308f7c2e4c73c8736e84c27820be0b051145de146d938d42c9
Contents?: true
Size: 1.82 KB
Versions: 4
Compression:
Stored size: 1.82 KB
Contents
# external gems require "version_gem" require "bundler" # This gem utilizes bundler as a tool. require "gem_bench/version" require "gem_bench/scout" require "gem_bench/player" require "gem_bench/team" require "gem_bench/gemfile_line_tokenizer" require "gem_bench/strict_version_gem" require "gem_bench/strict_version_requirement" module GemBench USAGE = "[GemBench] Usage: Require another gem in this session to evaluate it.\n\tExample:\n\t\trequire 'rails'\n\t\tGemBench.check({verbose: true})\n" RAILTIE_REGEX = /Rails::Engine|Rails::Railtie/ TRASH_REGEX = /^(\s*)(\#+.*)?$/ REQUIRE_FALSE_REGEX = /^[^#]+require((:\s*)|(\s*=>\s*))false.*/ DEPENDENCY_REGEX_PROC = ->(name) { /^\s*[^#]*\s*gem\s+['"]{1}#{name}['"]{1}/ } PATH_GLOB = ->(name) { "#{name}*/lib/**/*.rb" } EXCLUDE_FILE_PATTERN_REGEX_PROC = ->(name) { %r{#{name}/test|features|spec|bin|exe} } DO_NOT_SCAN = [] PLAYER_STATES = { starter: :starter, bench: :bench, } class << self attr_accessor :roster def check(verbose: false) @roster = GemBench::Team.new({verbose: verbose}) end def versions_present?(verbose: false) @roster = GemBench::StrictVersionRequirement.new({verbose: verbose}) @roster.versions_present? end def list_missing_version_constraints(verbose: false) @roster = GemBench::StrictVersionRequirement.new({verbose: verbose}) @roster.list_missing_version_constraints end def find(look_for_regex: GemBench::RAILTIE_REGEX, exclude_file_pattern_regex_proc: GemBench::EXCLUDE_FILE_PATTERN_REGEX_PROC, verbose: false) @roster = GemBench::Team.new({ look_for_regex: look_for_regex, exclude_file_pattern_regex_proc: exclude_file_pattern_regex_proc, verbose: verbose, }) end end end GemBench::Version.class_eval do extend VersionGem::Basic end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
gem_bench-2.0.3 | lib/gem_bench.rb |
gem_bench-2.0.2 | lib/gem_bench.rb |
gem_bench-2.0.1 | lib/gem_bench.rb |
gem_bench-2.0.0 | lib/gem_bench.rb |