🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

motion-assert

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

motion-assert

0.0.5
99

Supply Chain Security

100

Vulnerability

96

Quality

100

Maintenance

100

License

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Shell access

Supply chain risk

This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.

Found 1 instance in 1 package

Version published
Maintainers
1
Created

MotionAssert

Asserting in RubyMotion is a tricky task. NSAssert is not yet supported and displaying stacktrace or disabling asserts in release build are far from straight forward. The goal of this gem is to provide the best thing we can currently do for asserting within RubyMotion.

Installation

Add this line to your application's Gemfile:

gem 'motion-assert', :git => 'git://github.com/codiumco/motion-assert.git'

And then execute:

$ bundle

Or install it yourself as:

$ gem install motion-assert

Usage

Inlcude MotionAssert module in your app_delegate.rb:

include MotionAssert

Once MotionAssert module is included, you can assert by calling:

Debug.assert(someValue == otherValue, 'someValue is not equal to otherValue!')

Currently, displaying a stacktrace when an assert is raised is not yet supported. So when an assert is raised, the best way to identify where it come from is to supply a descriptive message. You can use ruby's __FILE__ and __LINE__ to help you identify the location of the assert as well.

WARNING!

Currently, automatically remove assert in release build is not yet support. Make sure you remember to perform a find-replace for 'Debug.assert' with '#Debug.assert' before you release your application

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 24 Dec 2013

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