Examples for https://twitter.com/koic/status/1772524244896825639
<<TXT
first
second
third
TXTExamples for https://twitter.com/koic/status/1772524244896825639
<<TXT
first
second
third
TXT% g diff .rubocop.yml
diff --git a/.rubocop.yml b/.rubocop.yml
index a04de4b497..3b4dd79e81 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -26,6 +26,9 @@ Layout/CaseIndentation:
Layout/CommentIndentation:
Enabled: true| require 'benchmark/ips' | |
| Benchmark.ips do |x| | |
| x.report('upcase') { 'String'.upcase == 'string' } | |
| x.report('downcase') { 'String'.downcase == 'string' } | |
| x.report('casecmp') { 'String'.casecmp('string').zero? } | |
| x.report('casecmp?') { 'String'.casecmp?('string') } | |
| x.compare! | |
| end |
### 初参加の「ビギナー」
|時間|やること|
|---|---|
|19:15-19:30|開場|
|19:30-19:40|アイスブレイク|
|19:40-20:10|OSS開発手順を説明|
|20:10-21:10|対象OSSを動かす|
- |21:10-21:20|ふりかえり|% bundle exec rake test:sqlite3_mem
(snip)
Finished in 55.514131s, 87.2030 runs/s, 244.2982 assertions/s.
1) Error:
QueryCacheTest#test_cache_is_not_available_when_using_a_not_connected_connection:
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: tasks: SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = ? LIMIT ?
/Users/koic/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `initialize'
/Users/koic/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `new'
| # | |
| # activemodel-5.0.0.1/lib/active_model/type/string.rb | |
| # | |
| module ActiveModel | |
| module Type | |
| class String < ImmutableString # :nodoc: | |
| ... | |
| def serialize(value) |
| # | |
| # コミットメッセージアンチパターン: 「コメント対応」メッセージ | |
| # | |
| # 「コメント対応」というコミットメッセージではコミットをできないようにする hook です。 | |
| # gitメッセージのサマリとなる1行目が対象です。 | |
| # | |
| # このファイルの内容を .git/hooks/commit-msg に配置することで有効になります。 | |
| # | |
| if [ "$(head -1 $1 | grep 'コメント対応')" ]; then | |
| echo "\033[0;31m[ABORT] コミットメッセージには変更に対する「なぜ」を書きましょう。\033[0;39m" 1>&2 |
| require 'yaml' | |
| puts YAML.load(DATA.read) # => {"name"=>"Bob"} | |
| __END__ | |
| --- | |
| name: Alice | |
| name: Bob |