モバイルアプリサービス部@モバイルバックエンドグループの五十嵐です。 これから何回かに分けてherの使い方を書いていこうと思います。 remiprev/her: Her is anORM (Object RelationalMapper) thatmaps REST resources toRuby objects.It is designed tobuild applications that are powered by a RESTfulAPI instead of adatabase. 概要 herはActiveRecordのように振る舞うRESTfulAPIのORMです。 今回は、herを使ってOAuth2.0のClientCredentialsGrantのアクセストークンを利用するAPIにアクセスしてみます。 環境Ruby: 2.2.4p230Rails:
![[Rails] RESTfulAPIをORMするgem “her” の利用方法(1) | DevelopersIO](/image.pl?url=https%3a%2f%2fcdn-ak-scissors.b.st-hatena.com%2fimage%2fsquare%2fc4ba9673af464883e264d1d320af2d2947fae03d%2fheight%3d288%3bversion%3d1%3bwidth%3d512%2fhttps%253A%252F%252Fdevio2023-media.developers.io%252Fwp-content%252Fuploads%252F2013%252F11%252Frails.jpg&f=jpg&w=240)
白金動物園、2位いただきました #isucon @sora_h @rosylilly と3人でチーム「白金動物園」として ISUCON 5 に参加し、本選で2位を獲得しました。 主な分担としては sorah とrosylilly の2人が実装をして、僕はインフラまわりの整備と、ログ分析や指示出し、あと二人が喧嘩したら仲裁をするという分担でした。今年は二人が喧嘩しなかったので仲裁役は必要なくて良かったです。 (追記 2015/11/02 14:14)2人の記事が揃ったので以下にリンクしておきます。HTTP/2 まわりのチャレンジなどは彼らの記事に詳しいです。 sorah: ISUCON5 で準優勝してきた #isucon - diary.sorahrosylilly: ISUCON5 で準優勝しました - 鳩舎 やったこと 今回の問題はマイクロサービスがテーマになっていて、運営側が用意し
GraphQL has been stirring up quite a buzz ever sinceit was introduced by Facebook. Since then companies likeGithub, Shopify andPinterest have been usingit as a core part of theirtechnology stack. A typicalGraphQL query would be structured as below: { allMovies { title description } }GraphQL provides flexibility for querying thenecessary fields that are required. This flexibility provides nu

by Shishir Kakaraddi, Srinivas Raghunathan, Adam Gross and Ryan Johnston We are pleased to announce the open source release of the Fast JSONAPI gem geared towardsRuby onRails applications. Introduction Fast JSONAPI isaimed at providing all the major functionality that Active Model Serializer (AMS) provides, along with anemphasis on speed and performance by meeting a benchmark requirement of b

概要 携わっている案件で作成しているRailsアプリケーションでは、JSONシリアライザとしてRablを採用していました。しかしどうもRablが遅い。 そこで、さまざまなシリアライザを比較してみることにしました。 世間では"ActiveModel Serializerが圧倒的に早いぞ!"というのをよく見るが、だいたいの検証記事はひとつのモデルのインスタンスをそのままシリアライズするような場合。 関連するモデルの情報を含めたり、モデルの属性から算出する値を含めたりする場合の性能比較は見つかりません。 そこで、より現実に即した状況で性能を比較検討してみましたというものです。。 全選手入場!! 比較対象は次のよっつ。ActiveModel::Serializer Grape::Entity Jbuilder (個人的には一番書きやすくて好き) Rabl バージョンはそれぞれ active_mo

2018.01.19 週刊Railsウォッチ(20180119)derailed_benchmarks gem、PostgreSQLをGraphQLAPI化するPostGraphile、機械学習でモック画像をHTML化ほか こんにちは、hachi8833です。Nintendo Laboにいろいろ持ってかれそうで気になってます。 つっつきボイス: 「任天堂のものづくりセンス、パないなー」 なんでこんなに感動してしまったかと考えていたんだけど、きっと心の中の「小5病」に火が着いたんだな — 稲見昌彦🌤️INAMI Masahiko (@drinami) January 18, 2018 それでは今週のウォッチ、いってみましょう。Rails: 今週の改修 今回はCommit差分から見繕いました。 left_outer_joinsをunscopeできるようになった commit: f3d69

In thisguide you will learn: WhatRails provides forAPI-only applications How to configureRails to start without any browser features How to decide which middleware you will want to include How to decide which modules to use in your controller 1 What is anAPI Application?Traditionally, when people said that they usedRails as an "API", they meant providing a programmatically accessibleAPI alo
はじめにRails サーバからGoogle AnalyticsAPI をたたいて情報を取得する手順をまとめます。google/google-api-ruby-client ·GitHub を使います。ログインだと Web で認可をもとめられる(後述)ので OAuth を使います。 日にちごとのスクリーンビューを取得するスパイクをつくるのがゴールです。 OAuth に必要な鍵を修得Google Analytics で使用するアカウントでGoogle Developers Console にアクセスプロジェクトを作成 作成したプロジェクトをクリックAPIs & Auth >Credentials を選択 Client ID を新規作成。Service account を選択 p12 をダウンロード 鍵は $RAILS_ROOT/certificates/google_ana
RubyKaigi 2017 でどんな発表をしたか 発表スライド 荷物とともにPC 送っちゃったのであとで貼ります ほぼ同内容のテキストはこちらの 4 記事です。 RESTfulAPI のおさらいRails での JSONAPI 実装まとめ スキーマファースト開発 The NEXT of REST 発表時のtwitter での反応togetter にまとめておきました。API Development in 2017 -RubyKaigi 2017 #rubykaigi -Togetterまとめ Proposal 事前資料の公開が推奨されていたので、CFP に出した内容も置いておきます。 事後になってしまい申し訳ありません。 TitleAPI Development in 2017 公開されてから思ったんだけど、RubyKaigi はruby のAPI の話が多いので

Rails での JSONAPI 実装まとめ 前後リンク RESTfulAPI のおさらいRails での JSONAPI 実装まとめ スキーマファースト開発 The NEXT of RESTRuby on JSON の図のような流れになるんですが、それぞれ見ていきます。 to_json (2011-2013 頃) 2011-2013 年頃、僕らは render :json を使っていました。 render json: @user render json: @user.to_json として User#as_json や User#to_json を利用します。 この頃はまだ SPA という言葉もなく、ネイティブアプリもそこまで流行っていなかったので これで十分だったのですが、どんどんAPI に世の中が寄っていき、限界を迎えます。 この頃のツラみ JSON を組み立てるのが大変

The software industry as a whole contains a lot of people doing a lot of different things, but for every developer working on newembedded firmware, there’s about tenbuilding the linchpin of modern software – CRUD apps that serverequests over HTTP. A lot of these apps are backed by MVC frameworks likeRuby onRails orASP.NET, and backed by ACID-compliant relationaldatabases like Postgres or SQ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く