
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
mire analyzes a Ruby project and helps you to find dependencies, call stacks and unused methods. It parses Ruby and Haml files and collects all method definitions and invocations.
Add this line to your application's Gemfile:
gem 'mire'
And then execute:
$ bundle
Or install it yourself as:
$ gem install mire
First you need to analyze the code and create a .mire_analysis.yml
file.
bundle exec mire -a
A Ruby code like
class Foo
def bar
buz
end
end
will lead to this .mire_analysis.yml
file.
:bar:
:definitions:
- :class: Foo
:method: :bar
:file: foo.rb
:line: 2
:invocations: []
:buz:
:definition: []
:invocations:
- :class: Foo
:method: :bar
:file: foo.rb
:line: 3
After this the .mire_analysis.yml
file can be used to find unused
methods for example.
bundle exec mire -u
Checking for unused methods
foo.rb:2 Foo.bar
This result can only be taken as a hint for unused methods. For example ERB files are not being analysed yet. Also dynamic method definitions or invocations are not considered. So mire can't find every usage of a method.
mire can be configured with a .mire.yml
file in your project folder.
With mire -i
a initial configuration file is created.
You can configure which files or folders should be excluded while analyzing the code or when displaying the unused methods.
excluded_files:
- vendor/**/*
output:
unused:
excluded_files:
- db/migrate/**/*
- spec/**/*
- script/**/*
- lib/**/*
Why is HAML-Lint needed?
HAML-Lint did a great job to write a Ruby code extractor for Haml files. mire is using this extractor.
The current implementation of mire is really basic. It needs to become
more robust and the parsed file types (e.g. .erb
) needs to be
extended.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Nils Gemeinhardt and Marcus Lankenau
Copyright (c) 2015 XING EVENTS GmbH
Released under the MIT license. For full details see LICENSE included in this distribution.
FAQs
Unknown package
We found that mire demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.