You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
テスト書きすぎ問題 - hitode909の日記 階層が増えるとテストが増える - はこべブログ ♨ テストと対応関係 - $shibayu36->blog; 最近書いているWebアプリは、HTTPリクエストを送ってレスポンスと状態をテストする、というテストだけ書くようにしてる。リクエストするとブログエントリを返す、というサービスだとこういう風なテストを書いてる。(HTMLを返すようにすると話が広がって説明が面倒なのでJSONを返すAPIで説明する) describe "Entry resource" do let(:params) do {} end let(:env) do { "HTTP_AUTHORIZATION" => "Bearer: #{access_token.token}" } end let(:access_token) do AccessToken.make(user
Automator ってなんか超高機能なマクロみたいなイメージがありますが、とても便利なのでご紹介。 もともとは、会社の上司が Windows から Mac に移行したのだけれど、"秀丸みたいに選択範囲を ruby で evalできないの" とおっしゃっており、しかも Emacs は微妙とのことなので、Automator でどうにかしてみた。Service でできるんじゃないかねと教えてくれた同僚に感謝。 追記(2013/02/24) デバッグ方法を別エントリに書きました できること 文字列選択して Ctrl+= を押すと選択文字列が ruby で実行されます。編集可能なテキストエリアならだいたい何処でも。 作り方 アプリケーション ディレクトリにある Automator を起動します。 新しくサービスを作ります ユーティリティ > "シェルクスクリプトを実行"というアクションを選んで右の
Building a new gem ( ruby library ) with bundler is easy task. I found a lot of tutorial on this topic in the web but none of them was covering more then just generating scaffold and packing up the gem. I will try to uncover a bit more. So at the end of this post you will be able to generate new gem, build it and it will have ready support for rspec. First of all you need bundler. To install bundl
Nokogiri is unrelated, other than the fact that it gives you the link anchor to begin with. Use Ruby's URI library to manage paths: absolute_uri = URI.join( page_url, href ).to_s Seen in action: require 'uri' # The URL of the page with the links page_url = 'http://foo.com/zee/zaw/zoom.html' # A variety of links to test. hrefs = %w[ http://zork.com/ http://zork.com/#id http://zork.com/bar http://zo
平素よりQA@ITをご利用いただき、誠にありがとうございます。 QA@ITは「質問や回答を『共有』し『編集』していくことでベストなQAを蓄積できる、ITエンジニアのための問題解決コミュニティー」として約7年間運営をしてきました。これまでサービスを続けることができたのは、QA@ITのコンセプトに共感をいただき、適切な質問や回答をお寄せいただいた皆さまのご支援があったからこそと考えております。重ねて御礼申し上げます。 しかしながら、エンジニアの情報入手方法の多様化やQAサービス市場の状況、@ITの今後のメディア運営方針などを検討した結果、2020年2月28日(金)15:00をもちましてQA@ITのサービスを終了することにしました。 これまでご利用をいただきました皆さまには残念なお知らせとなり、誠に心苦しく思っております。何とぞ、ご理解をいただけますと幸いです。 QA@ITの7年間で皆さまの知識
README.md je - Instant jemalloc injection into Ruby apps jemalloc sometimes dramatically supresses the memory fragmentation on server programs. je gem contains jemalloc itself within a gem, and enables you to inject jemalloc into your application in a really easy way: install je gem, and launch your app with je command. Install Install je gem in your application. For bundler based application, ple
Macで漫然とRubyをインストールすると、rails consoleやirbで日本語を使えないことがある。(どうなるかというと、日本語の変換を確定した途端に「\U+FFE3\U+FFAB」みたいにUnicodeのエスケープっぽいものが表示される。)そうなった時の直し方を説明する。 なぜ日本語を使えないのか 大雑把に言うと、Macに付属しているコマンドライン処理のライブラリ(libedit)が日本語に対応していないから。これを使わず、libreadlineを使うようにすれば直る。 誰がlibeditを使っているのか Rubyをインストールしたディレクトリのどこかにあるreadline.bundleが使っている。findコマンドを使えば見つけられる。例えば、rbenvを使ってRubyをインストールしたなら、下のコマンドで見つかるだろう。
A simple but effective mini-profiler for .NET, Ruby, Go and Node.js. What does it profile? MiniProfiler does not attach itself to every single method call; that would be too invasive and wouldn't focus on the biggest performance issues. Instead, it provides: An ADO.NET profiler, capable of profiling calls on raw ADO.NET (SQL Server, Oracle, etc), LINQ-to-SQL, Entity Framework (including Code First
RubyUnagi.gcでアプリケーション設定ファイルあるあるを話していた。 「こういうの作ってますね」「じゃあgemで」 ということで公開してみた。 詳しくはREADMEで。 authorNari/configict ? GitHub アプリケーションの設定ファイルをYAMLで管理するときには 「config.yml.sample」みたいなの準備してそれをコミット 各開発者は.yml.sampleを.ymlにコピーして自分の環境に合わせた値に変えるといった感じになる。 コミットされれるのはconfig.yml.sampleだけなため 「なんか君のコミットでテスト動かなくなったんだけど」 「あ、.yml.sampleを更新したのでした。手元の.yml更新してください(てへ)」 という事態が発生しやすい。 configictを使うとそういうことはなくなる。 YAMLをロードするときに.yml
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く