Socket
Book a DemoInstallSign in
Socket

morsel

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

morsel

0.0.2
bundlerRubygems
Version published
Maintainers
1
Created
Source

morsel: git submodules are overkill

I want to user other people's code. Most of the time, I don't want to use git submodules. For those times, I wrote morsel.

Point morsel at a git repository and tell it which files you want. It'll fetch them for you and place them into your source tree.

Problem

There is no dependency management system for Cocoa development. Everytime I want to use a new library, my options are:

  • Clone the repository. Figure out which files I need. Copy them into my source tree.

  • Add a git submodule.

Both options are annoying in their own way. Inspired by bundler and homebrew, I present morsel.

Install

morsel is available as a RubyGem

$ gem install morsel

Usage

Create a Morselfile in your project's root that looks something like this:

morsel 'jsonkit' do |m|
    m.url = 'https://github.com/johnezang/JSONKit.git'
    m.files = %w{
        JSONKit.h
        JSONKit.m
    }
end

Then run morsel install. It'll clone the repos into ~/.morsel/repos and then copy your desired files into a morsels directory in your project's root:

$ find .
.
./Morselfile
./morsels
./morsels/jsonkit
./morsels/jsonkit/JSONKit.h
./morsels/jsonkit/JSONKit.m

That's it!

What's Next

First, the whole thing is half-baked, so fleshing it out a bit will be nice.

Then, it's annoying to have to define the url and files for each morsel. An ideal Morselfile would look something like this:

morsel 'jsonkit', :sha => 'c9ffd8f823e68df96fa2f87185bee861984ef637'
morsel 'asihttprequest', :tag => 'v1.8'

That'll require some homebrew-style package management.

FAQs

Package last updated on 10 Jul 2011

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.