
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.
The world's tiniest MongoDB Ruby library, only 6 lines of code. Nothing is faster than no code.
If you need models, have a look at Modelize, it can be run on top of Minimongo.
We also have Mongocore if you're looking for a full ORM.
gem install minimongo
or add to Gemfile.
# All commands supported
# https://docs.mongodb.com/ruby-driver/master/quick-start
# Connect
Minimongo.db = Mongo::Client.new([ '127.0.0.1:27017' ], :database => "minimongo_#{ENV['RACK_ENV']}")
# Include methods in a class or module
include Minimongo::Query
# Include as helper in a Sinatra app
helpers Minimongo::Query
# Find needs first, count or to_a after
d = find(:domains).first
d = find(:domains).sort(:duration => -1).to_a
m = find(:messages, :_id => d._id).limit(1).first
c = find(:messages).count
# All
m = all(:messages)
m = all(:messages, :duration => {:$gt => 6})
# First
m = first(:models)
m = first(:models, :goal => 7)
# Last
m = last(:models)
m = last(:models, :duration => {:$ne => 6})
# Count
c = count(:messages)
c = count(:messages, :goal => 'hello')
# Insert
insert(:domains, :name => p[:name], :email => p[:email], :reply => p[:reply])
# Update
update(:domains, {:_id => p[:id]}, :name => p[:name], :email => p[:email])
# Delete
delete(:domains, :_id => p[:id])
# String as ID
find(:domains, '586333360aec08e87bd62180')
first(:domains, '586333360aec08e87bd62180')
# String to Object ID
oid('586333360aec08e87bd62180')
# New Object ID
oid
oid(:new)
Created and maintained by Fugroup Ltd. We are the creators of CrowdfundHQ.
@authors: Vidar
FAQs
Unknown package
We found that minimongo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.