Top Level Namespace
Defined Under Namespace
Modules: Karafka, Rimless Classes: ApplicationConsumer, CustomConsumer, FakeConfluentSchemaRegistryServer
Instance Method Summary collapse
-
#rimless_gem_version?(gem_name, expected) ⇒ Boolean
Check the actual (currently loaded) gem version against the expected (given) version.
Instance Method Details
#rimless_gem_version?(gem_name, expected) ⇒ Boolean
Check the actual (currently loaded) gem version against the expected (given) version. It returns true
when the expected version matches the actual one. The version check is patch-level independent.
9 10 11 12 |
# File 'lib/rimless/initializers/compatibility.rb', line 9 def rimless_gem_version?(gem_name, expected) actual = Gem.loaded_specs[gem_name].version Gem::Dependency.new('', expected.to_s).match?('', actual) end |