Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'
Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component
(and thus, prerendering).
Note that jquery-rails
can be removed from Gemfile, the npm version of jquery
and jquery-ujs
will be used instead.
# curl -u "user:password" https://api.github.com/orgs/:org/repos | |
require 'httparty' | |
require 'pp' | |
class GitHub | |
include HTTParty | |
base_uri 'https://api.github.com' | |
def initialize(u, p) |
# creates a global JST object containing all the templates | |
# 1. install Tilt in your Gemspec | |
# 2. Paste this in a file at app/assets/javascripts/templates.js.coffee.erb | |
# 3. `require` the templates file from your main js include file. | |
# 4. Put your templates at app/views/whatever/my_template.html.jst | |
window.JST = | |
<% Dir[Rails.root.join('app/views/**/*.jst')].each do |path| %> | |
<%= path.match(%r{/([^/]+)\.html\.jst$})[1] %>: _.template(<%= File.read(path).inspect.gsub(/\r?\n/, '') %>) | |
<% end %> |
module SuperRPC | |
class SuperRPCError < StandardError; end | |
class UnknownKlass < SuperRPCError; end | |
class UnknownMethod < SuperRPCError; end | |
class Unauthorized < SuperRPCError; end | |
def klasses | |
@klasses ||= [] | |
end | |
module_function :klasses |