Code Monkey home page Code Monkey logo

homebrew-umple's Introduction

This is the original home of the homebrew formula for Umple

To install it on Mac-OS (or Linux as an alterative to managers like apt) use the brew install umple command on those platforms. It will create a command called 'umple' which invokes the umple compiler Java jar.

Umple has openjdk as a dependency, which results in several GB of other files being installed.

How we made Umple available from Homebrew, the package manager for Macs (and also available on Linux).

Prerequisite :

Create a new formula (https://docs.brew.sh/Formula-Cookbook) :

  • A formula is a package definition written in Ruby.
  • We followed the Formula Cookbook to create a new formula.
    • brew create โ†’ creates template brew formula
    • Formulas are installed at: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
  • Umple formula:
    • To create the formula one needs a URL to a zip or tarball. I decided to use a link to umple's latest JAR file because other applications in homebrew based in Java did the same.
    • The description needs to be 80 characters or less
    • The Homepage must be a https link
    • The URL is the link to umple's latest JAR file
    • Version tag is optional since homebrew tries to guess the version from the URL
      • In our case, homebrew got our version wrong so I had to add it
    • Sha256 and license are automatically generated
    • Had to add our dependencies (ant, ant-contrib and openjdk)
    • Bottle:unneeded
      • Without this line, an error will occur when installing and umple will not get installed
      • In the PR, homebrew contributors commented to remove the line
      • Bottle do block is auto generated by the brew's CI when the PR is accepted -Install block:
      • Homebrew contributors were very specific on the syntax used to install the application. It is similar for all java based applications available from Homebrew. Originally we were running shell commands through the ruby formula, but that was not accepted.
      • Homebrew packages have specific file structure: Screen Shot 2021-08-19 at 4 48 22 PM
    • The install method moves a file from the original location to the Pathname
    • Test Block:
      • Writes a simple ump file
        • Class X with one attribute
      • Tests the umple compile command
      • Use the assert_predicate to check if the java and class file were created

Testing :

  • Using the command: brew install umple
    • If installation was successful, umple command will work
  • Brew remove umple: will uninstall umple
  • Homebrew Packages Are Installed at: /usr/local/Cellar/
  • Have to run: brew audit --new (for new formula) or brew audit --strict (existing formula)
    • This command will return errors in the formula
  • Follow Cookbook (https://docs.brew.sh/Formula-Cookbook) to push to homebrew-core

Before opening a pull request :

Homebrew has a checklist that needs to be followed before opening a PR:

How to open a homebrew Pull Request: https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request

How to update :

homebrew-umple's People

Contributors

daniel-mitchell avatar fred-lafleche avatar timlethbridge avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.