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

bonanza

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bonanza

  • 1.7.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Bonanza

Bonanza provides some nice helpers and enhancements for nine.ch Rails apps.

For real cowboys only!

Bonanza

Installation

Add this line to your application's Gemfile:

gem 'bonanza'

And then execute:

$ bundle

There is a basic little helper to get an application's url. To use the urn specific link helpers, the infrastructure-client dependency is required.

nine_app_url(:redmine, :issue, '123')
=> "https://redmine.nine.ch/issues/123"

There are two link helpers for the nine ticket systems. One for customer profiles and one for tickets.

Link to a customer profile:

<%= link_to_otrs_customer 'OTRS Customer Profile', 5247, class: 'blue' %>

Link to an otrs ticket:

<%= link_to_otrs_ticket 'OTRS Ticket', '2014110610000325' %>

Link to customer data in Billing:

<%= link_to_billing 'Billing', 5247, class: 'blue' %>

Link to customer data in the Mighty Stats:

<%= link_to_stats 'Stats', 5247, class: 'black' %>

Link to a redmine issue:

<%= link_to_redmine 'Redmine', 123 %>

Link to a migration item:

<%= link_to_migration_item 'Migration', 123 %>

Link to a resource represented by a URN:

<%= link_to_urn 'VServer', 'urn:nine:vserver:1279' %>

Validators

Bonanza can validate OTRS Ticket numbers. But don't fear! It just checks for a 16-character number.

class Order < ActiveRecord::Base
  include Bonanza::Validators
  validates :otrs_ticket, otrs_number: true
end

Bonanza can validate nine urns, like 'urn:nine:vserver:1234'. To use this validator, the infrastructure-client dependency is required.

class Order < ActiveRecord::Base
  include Bonanza::Validators
  validates :urn, urn: true
end

FAQs

Package last updated on 17 Jan 2018

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