Skip to content

Instantly share code, notes, and snippets.

@fnmunhoz
fnmunhoz / react2ng1.js
Created May 16, 2017 00:30 — forked from aantipov/react2ng1.js
A simple way to convert React components into AngularJS components
import React from "react";
import ReactDOM from "react-dom";
import { fromPairs, map, pick } from "ramda";
/**
* Wraps a React component into Angular component. Returns a new Angular component.
*
* Usage: angular.module('some.module').component('newAngularComponent', react2angular(MyReactComponent))
* (the usage is the same as in similar lib https://github.com/coatue-oss/react2angular)
*/
describe Denomination do
context 'validations' do
subject { Denomination.new }
it { should validate_presence_of(:name) }
it { should validate_presence_of(:status) }
it { should allow_value('active').for(:status) }
it { should allow_value('awaiting_approval').for(:status) }
it { should_not allow_value('invalid').for(:status) }
it { should_not allow_mass_assignment_of(:name) }
describe CreateBondBusiness do
let(:bond_type) { double :bond_type }
let(:user) { double :user }
let(:cousin) { double :user }
let(:bond_form) { double :bond_form }
context "#save" do
subject { CreateBondBusiness.new(bond_form) }

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.