Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jamjar

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jamjar

  • 1.2.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gem Version Build Status Code Climate

JamJar

JamJar dynamically creates ActiveRecord models, backed by in-memory SQLite, to help you test your ActiveRecord extensions.

Installation

Add this line to your application's Gemfile:

gem "jamjar"

And then execute:

$ bundle

Usage

To generate a new model, simply call:

JamJar.model

You can pass a block, which will be evaluated in the model's class context:

model = JamJar.model do
  def self.foo
    "bar"
  end
end

model.foo #=> "bar"

You can add columns to your model's table with column.

JamJar.model do
  column :foo, :string
end

You can pass any options for your column that are supported by Rails, as described in the Rails API Documentation.

JamJar.model do
  column :foo, :string, default: "bar"
end

Contributing

  1. Fork it
  2. Create a branch (git checkout -b super-foo)
  3. Add your feature and specs.
  4. Commit your changes (git commit -am 'Extra-super foo-matic.')
  5. Push to the branch (git push origin super-foo)
  6. Create new Pull Request

FAQs

Package last updated on 17 Jul 2015

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc