tl;dr IdotabaのGemfileは"全プレ"になりました。ご笑納ください。→ Gemfile
rebuild.fmのep36でお知らせさせていただきました、Idobataの最新版Gemfileプレゼントをお届けいたします。 過日はIdobata会議01への多数のご参加ありがとうございました。おかげさまで盛況なミートアップとなりました。 (当日会場を提供いただいたEngine Yardさまのブログにて、Idobata会議01当日の様子がまとめられています。ありがとうございます!)
| defmodule RubyServer do | |
| use GenServer | |
| def start_link(opts \\ []) do | |
| GenServer.start_link(__MODULE__, nil, opts) | |
| end | |
| def cast(server, cmd) do | |
| GenServer.cast(server, {:cast, cmd}) | |
| end |
| # based on http://api.rubyonrails.org/classes/ActionController/RequestForgeryProtection.html | |
| module Auth | |
| extend ActiveSupport::Concern | |
| included do | |
| helpers do | |
| def session | |
| env['rack.session'] | |
| end |
tl;dr IdotabaのGemfileは"全プレ"になりました。ご笑納ください。→ Gemfile
rebuild.fmのep36でお知らせさせていただきました、Idobataの最新版Gemfileプレゼントをお届けいたします。 過日はIdobata会議01への多数のご参加ありがとうございました。おかげさまで盛況なミートアップとなりました。 (当日会場を提供いただいたEngine Yardさまのブログにて、Idobata会議01当日の様子がまとめられています。ありがとうございます!)
| build_package_patch_ruby_railsexpress() { | |
| fetch_git rvm-patchsets git://github.com/skaes/rvm-patchsets.git master | |
| for p in rvm-patchsets/patches/ruby/1.9.3/p484/railsexpress/* ; do | |
| patch -p1 < $p | |
| done | |
| } | |
| install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz#36c852831d02cf90508c29852361d01b" | |
| install_package "ruby-1.9.3-p484" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.gz#8ac0dee72fe12d75c8b2d0ef5d0c2968" patch_ruby_railsexpress autoconf standard |
従来の CVCS (集中バージョン管理システム)のリビジョン番号は連番。 SVN はサーバーにデプロイした時点でリビジョン番号1と設定される。
| # encoding: utf-8 | |
| # This file should contain all the record creation needed to seed the database with its default values. | |
| # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). | |
| # | |
| # Examples: | |
| # | |
| # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) | |
| # Mayor.create(name: 'Emanuel', city: cities.first) |
(I guarantee nothing. No warranty I am not responsible blah blah blah. Seems to work great for me so far. Thanks to Tyler Bird who I forked this from.)
This installs a patched ruby 1.9.3-p448 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets
| require 'spec_helper' | |
| # Based on https://github.com/rails/ssl_requirement/blob/master/lib/ssl_requirement.rb | |
| class SslRequirement | |
| def initialize(app, options= {}) | |
| @app = app | |
| @allowed = options[:allowed] | |
| @required = options[:required] | |
| end | |
| /* | |
| * Step 1. get access token using curl | |
| * https://developers.google.com/gdata/articles/using_cURL | |
| * | |
| * service name list | |
| * https://developers.google.com/gdata/faq#clientlogin | |
| * | |
| */ | |
| curl https://www.google.com/accounts/ClientLogin \ |