Choose Planck or Niu mini
| require 'io/console' | |
| print('original: ') | |
| original = STDIN.noecho(&:gets) | |
| puts | |
| loop do | |
| print('input: ') | |
| input = STDIN.noecho(&:gets) | |
| puts |
| RSpec.describe(テスト対象クラス) do | |
| it do | |
| テスト対象 = テスト対象をインスタンス化 | |
| テスト対象の状態を設定 | |
| expect(テスト対象.メソッド名).to eq("△△") | |
| end | |
| end |
たまたま今日、データモデルの設計についてレビューする機会があった。こういう機会って割とあるのだけれども、ざっと聞いてから、ざっと話すみたいな反射神経をもとめられるケースがおおいので、いつもやっているやり方について書いておきたい。ちなみに本論はこのビール缶を空けた時点でおわる。あしからず。
そもそもデータモデルの設計って何のためにするのか、ビール缶の2本目に取りかかっている立場でいうと、これからつくるシステムで表現可能な状態を設計するためってことになりそうである。まあ難しいことは言わないけれど、システムでやりたいことができるようにしてあげなきゃらないし、システムがやりたくなりそうなこともやれるようにしてあげなきゃならない。
データがシステムの寿命よりも長いってのは、まあおっさんの説教で聞いたことがあるのかもしれないけれど、今回のシステム開発のスコープ外だからといって、何でもYAGNIの精神で切り詰めればいいってもんでもないのがデータモデルの世界である。新しい要件がでた瞬間にデータモデルレベルで詰むみたいなシステムをつくっちゃあ、末代までの恥とされるのがソフトウェアエンジニアの世界である。
だから、データモデル設計の段階で、システムのリリース時点でシステムができなきゃいけないことはデータモデルとして当然できなきゃいけないし、システムのリリース時点ではできなくてもよいけれども、将来いかにもできなきゃいけないようなことについても、当然できるようしなきゃいけない。
そんな、簡単にいうけれど、と読者のみなさんはお考えだろう(そう考えない人や答をもっている人は対象読者ではない)。
| class ParameterFilterProcessor | |
| def self.create(filters) | |
| Class.new(Raven::Processor::Processor) do | |
| @filters = filters | |
| def initialize(client = nil) | |
| @parameter_filter = ActionDispatch::Http::ParameterFilter.new(self.class.filters) | |
| end | |
| def process(value) |
| This file contains any messages produced by compilers while | |
| running configure, to aid debugging if configure makes a mistake. | |
| It was created by configure, which was | |
| generated by GNU Autoconf 2.69. Invocation command line was | |
| $ ./configure --prefix=/Users/takai/.rbenv/versions/2.0.0-p0 --with-openssl-dir=/Users/takai/.rbenv/versions/2.0.0-p0/openssl | |
| ## --------- ## | |
| ## Platform. ## |
| configure: WARNING: unrecognized options: --with-openssl-dir | |
| checking build system type... x86_64-apple-darwin11.4.2 | |
| checking host system type... x86_64-apple-darwin11.4.2 | |
| checking target system type... x86_64-apple-darwin11.4.2 | |
| checking whether the C compiler works... yes | |
| checking for C compiler default output file name... a.out | |
| checking for suffix of executables... | |
| checking whether we are cross compiling... no | |
| checking for suffix of object files... o | |
| checking whether we are using the GNU C compiler... yes |
| require 'foreman/engine/cli' | |
| procfile = File.expand_path('../../Procfile', __FILE__) | |
| envfile = File.expand_path('../../.env', __FILE__) | |
| foreman = Foreman::Engine::CLI.new | |
| foreman.load_procfile(procfile) | |
| foreman.load_env(envfile) if File.exist? envfile | |
| RSpec.configure do |config| |
| # | |
| # rails new templ-app --database postgresql --skip-gemfile --skip-test-unit -m /path/to/rails-template.rb | |
| # | |
| create_file 'Gemfile' | |
| add_source :rubygems | |
| gem 'rails', '3.2.6' | |
| gem 'jquery-rails', '~> 2.0.2' |
Create lib-boot dir and move following libs to lib-boot dir:
lib-boot/EC2CltJavaClient-1.0.jar
lib-boot/EC2ConversionLib-1.0.jar
lib-boot/EC2WsdlJavaClient-1.0.jar
lib-boot/commons-codec-1.3.jar
lib-boot/commons-httpclient-3.1.jar
lib-boot/commons-logging-adapters-1.1.1.jar
lib-boot/commons-logging-api-1.1.1.jar
lib-boot/jdom.jar