ここの所、数か月おきにjsのユニットテストってどうやるのが良いのか悩んでいる気がするので、一つ情報集約の為にメモ書きをしておきます。
何かちゃんと文章書いておけば、それに対する反応が集まって、オレサマハッピー的な展開を望んでいます。
単体テストというか、ユニットテストというか、そういうアレを書く為のフレームワークを探しています。
覚える事が少なくて強力なやつ。
機能テストというか、e2eテストいうか、そういうアレの事は別途考える必要がありますので、今回はスコープ外とします。
__gvm_switch() { | |
if [ -s "gradle.properties" ]; then | |
local candidate current target | |
candidate=grails | |
target=$(cat gradle.properties | grep --color=never 'grailsVersion' | sed "s_grailsVersion=\(.*\)_\1_g") | |
if [[ $target != '' ]]; then | |
current=$(eval echo '$'$(echo $candidate | tr '[:lower:]' '[:upper:]')_HOME | sed -e "s_$GVM_DIR/$candidate/__g") | |
if [[ $current != $target ]]; then | |
echo "Switching to $candidate $target ..." | |
gvm offline enable > /dev/null |
#compdef plenv | |
# Installation | |
# | |
# * rename '_plenv.zsh' to '_plenv' | |
# * put on $HOME/.zsh/functions/ | |
typeset -A opt_args | |
local context state line |
https://gist.github.com/mala/5062931
の続き。
Twitterの人に色々と問題点は伝えたんだけど、これからOAuthのサーバー書く人や、クライアント書く人が似たような問題を起こさないようにするために、どうすればいいのかについて簡単に書きます。既存の実装真似して作るとうっかりひどい目にあう。
自分は意図的に「Twitterの脆弱性」という表現を使わないように気を使っていて、それはクライアントアプリ側の責任もあるからなのだけれども、安全に実装するための方法がわかりにくかったり誤解を招きやすかったり、Twitterに買収されているTweetDeckにも問題があったりしたので、それはやっぱりTwitter側の責任の比重が大きいとは思う。とはいっても別に責任を追求したかったり◯◯はクソだといったことを言いたいわけではなく、誰が悪いとか言う以前に、複合的な要因によって問題が起きるときには原因を正しく理解する必要があると思う。
cd ~ | |
sudo wget http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.2.1.v20140609.tar.gz -O jetty.tar.gz | |
tar -xf jetty.tar.gz | |
rm -rf jetty.tar.gz | |
mv jetty-* jetty | |
sudo /usr/sbin/useradd jetty | |
sudo mv jetty /srv/ |
#! /your/favourite/path/to/ruby | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2013 Urabe, Shyouhei | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
diff -crN emacs-25.1-orig/configure.ac emacs-25.1-new/configure.ac | |
*** emacs-25.1-orig/configure.ac 2016-07-24 23:56:46.000000000 +0900 | |
--- emacs-25.1-new/configure.ac 2016-09-13 01:09:24.000000000 +0900 | |
*************** | |
*** 1916,1922 **** | |
INSTALL_ARCH_INDEP_EXTRA= | |
fi | |
! NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o $ns_fontfile" | |
fi |