Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSS Gate Workshop: Tokyo: 2017-11-25: shitake4: beautiful-log: Work log #666

Closed
shitake4 opened this issue Nov 25, 2017 · 34 comments

Comments

Projects
None yet
3 participants
@shitake4
Copy link
Contributor

commented Nov 25, 2017

This is a work log of a "OSS Gate workshop".
"OSS Gate workshop" is an activity to increase OSS developers.
Here's been discussed in Japanese. Thanks.

作業ログ作成時の説明

以下のテンプレートを埋めてタイトルに設定します。埋め方例はスクロールすると見えてきます。

OSS Gate Workshop: ${LOCATION}: ${YEAR}-${MONTH}-${DAY}: ${アカウント名}: ${OSS名}: Work log

タイトル例↓:

OSS Gate Workshop: Tokyo: 2017-01-16: kou: Rabbit: Work log

OSS Gateワークショップ関連情報

  • スライド:ワークショップの進行に使っているスライドがあります。
  • チャット:OSS開発に関することならなんでも相談できます。ワークショップが終わった後もオンラインで相談しながら継続的にOSSの開発に参加しましょう!
  • シナリオ:ワークショップの目的・内容・進め方の詳細が書いています。
  • 過去のビギナーの作業ログ:他の人の作業ログから学べることがいろいろあるはずです。
@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

  1. ライセンスを調べる為に 「beautiful log ruby」で検索
  2. Githubにライセンス情報が乗ってそうなので、Githubが検索結果の2番目に出た
  3. ライセンスでライセンスを確認し、「MIT」であることがわかった
@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

READMEを見た感じ、Railsは必須そう
Make Rails log beautiful!

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

まずRailsプロジェクトを立ててみる

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

Rails 5.1.4をインストール中

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

Railsプロジェクトが出来たため、GithubのREADMEの手順に従って、installをする

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

Gemfileに gem 'beautiful-log' を記述し、プロジェクト配下(/)で bundle install を実行

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

操作ログ

$ bundle install 
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Fetching rake 12.3.0
Installing rake 12.3.0
Fetching concurrent-ruby 1.0.5
Installing concurrent-ruby 1.0.5
Fetching i18n 0.9.1
Installing i18n 0.9.1
Fetching minitest 5.10.3
Installing minitest 5.10.3
Fetching thread_safe 0.3.6
Installing thread_safe 0.3.6
Fetching tzinfo 1.2.4
Installing tzinfo 1.2.4
Fetching activesupport 5.1.4
Installing activesupport 5.1.4
Fetching builder 3.2.3
Installing builder 3.2.3
Fetching erubi 1.7.0
Installing erubi 1.7.0
Using mini_portile2 2.3.0
Using nokogiri 1.8.1
Fetching rails-dom-testing 2.0.3
Installing rails-dom-testing 2.0.3
Fetching crass 1.0.3
Installing crass 1.0.3
Fetching loofah 2.1.1
Installing loofah 2.1.1
Fetching rails-html-sanitizer 1.0.3
Installing rails-html-sanitizer 1.0.3
Fetching actionview 5.1.4
Installing actionview 5.1.4
Fetching rack 2.0.3
Installing rack 2.0.3
Fetching rack-test 0.8.2
Installing rack-test 0.8.2
Fetching actionpack 5.1.4
Installing actionpack 5.1.4
Fetching nio4r 2.1.0
Installing nio4r 2.1.0 with native extensions
Fetching websocket-extensions 0.1.3
Installing websocket-extensions 0.1.3
Fetching websocket-driver 0.6.5
Installing websocket-driver 0.6.5 with native extensions
Fetching actioncable 5.1.4
Installing actioncable 5.1.4
Fetching globalid 0.4.1
Installing globalid 0.4.1
Fetching activejob 5.1.4
Installing activejob 5.1.4
Fetching mini_mime 1.0.0
Installing mini_mime 1.0.0
Fetching mail 2.7.0
Installing mail 2.7.0
Fetching actionmailer 5.1.4
Installing actionmailer 5.1.4
Fetching activemodel 5.1.4
Installing activemodel 5.1.4
Fetching arel 8.0.0
Installing arel 8.0.0
Fetching activerecord 5.1.4
Installing activerecord 5.1.4
Fetching awesome_print 1.7.0
Installing awesome_print 1.7.0
Fetching colorize 0.8.1
Installing colorize 0.8.1
Fetching beautiful-log 0.2.1
Installing beautiful-log 0.2.1
Using bundler 1.16.0
Using byebug 9.1.0
Fetching ffi 1.9.18
Installing ffi 1.9.18 with native extensions
Fetching rb-fsevent 0.10.2
Installing rb-fsevent 0.10.2
Fetching rb-inotify 0.9.10
Installing rb-inotify 0.9.10
Fetching ruby_dep 1.5.0
Installing ruby_dep 1.5.0
Fetching listen 3.1.5
Installing listen 3.1.5
Using method_source 0.9.0
Fetching puma 3.11.0
Installing puma 3.11.0 with native extensions
Fetching thor 0.20.0
Installing thor 0.20.0
Fetching railties 5.1.4
Installing railties 5.1.4
Fetching sprockets 3.7.1
Installing sprockets 3.7.1
Fetching sprockets-rails 3.2.1
Installing sprockets-rails 3.2.1
Fetching rails 5.1.4
Installing rails 5.1.4
Fetching spring 2.0.2
Installing spring 2.0.2
Fetching spring-watcher-listen 2.0.1
Installing spring-watcher-listen 2.0.1
Fetching sqlite3 1.3.13
Installing sqlite3 1.3.13 with native extensions
Bundle complete! 9 Gemfile dependencies, 51 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.




@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

intall のログをGemfile.lockから beautiful-logをがインストール出来ていることを確認

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

使い方を確認する為、READMEのusageを読む

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

READMEの他の項も読んでいたところ Requirementsが Ruby 2.3- の為、作成したプロジェクトがruby2.3以上で動いているか確認

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

% ruby -v                                                                                                                                        [~/RubymineProjects/sample][master]
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin17]
@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

usageの通りに
config/application.rbとconfig/envirnonment/developmentに記述

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

$ bin/rails s でサーバーの立ち上げと $ tail -f log/development.log でログの出力が変わるのか確認

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

特に変化がないため、ログ確認用にcontrollerを書いて、みる

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

$ rails generate controller sample index -s

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

config/routes.rb:3: syntax error, unexpected [, expecting keyword_do or '{' or '('
  resources :sample, only [:index]
                           ^ (SyntaxError)
@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

only: [:index] の間違い

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

タイポを直し
再度 rails s で立ち上げ localhost:3000 にアクセス

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

[2017-11-25 11:51:02] (pida=59091)   INFO -- : Started GET "/" for 127.0.0.1 at 2017-11-25 11:51:02 +0900
[2017-11-25 11:51:03] (pida=59091)   INFO -- : Processing by Rails::WelcomeController#index as HTML
[2017-11-25 11:51:03] (pida=59091)   INFO -- :   Rendering /Users/tsuzuki/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb
[2017-11-25 11:51:03] (pida=59091)   INFO -- :   Rendered /Users/tsuzuki/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/templates/rails/welcome/index.html.erb (6.0ms)
[2017-11-25 11:51:03] (pida=59091)   INFO -- : Completed 200 OK in 190ms (Views: 14.8ms)



[2017-11-25 11:51:03] (pida=59091)   INFO -- : Started GET "/favicon.ico" for 127.0.0.1 at 2017-11-25 11:51:03 +0900

[2017-11-25 11:51:03] (pida=59091)  FATAL -- :


[2017-11-25 11:51:03] (pida=59091)  FATAL -- : ActionController::RoutingError (No route matches [GET] "/favicon.ico"):


[2017-11-25 11:51:03] (pida=59091)  FATAL -- :


[2017-11-25 11:51:03] (pida=59091)  FATAL -- : actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
railties (5.1.4) lib/rails/rack/logger.rb:26:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
rack (2.0.3) lib/rack/runtime.rb:22:in `call'
activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
railties (5.1.4) lib/rails/engine.rb:522:in `call'
puma (3.11.0) lib/puma/configuration.rb:225:in `call'
puma (3.11.0) lib/puma/server.rb:624:in `handle_request'
puma (3.11.0) lib/puma/server.rb:438:in `process_client'
puma (3.11.0) lib/puma/server.rb:302:in `block in run'
puma (3.11.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'
@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

ログの出力結果が変わっていることを確認

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

Fatal 部分に赤色がついているのとフォーマットが変わっているみたい

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

動作確認完了

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

【気づき】
Railsプロジェクトで動くことが前提条件のようだが
Requirementsにそれが言及されていないのが、良くない気がする

出来れば、動作確認済みバージョンも合わせてRails 4.x.xと記載しておくのが良さそう

@knokmki612

This comment has been minimized.

Copy link
Member

commented Nov 25, 2017

午前中おつかれさまでした!

  • Railsプロジェクトで動かすものであることを明記する
  • RequirementsにRailsプロジェクトのバージョンを追加する
  • RequirementsがREADMEの下の方にあるとInstallationの前に見落としてしまうから並びをかえたい

と、フィードバックしたいことがはっきりしていて良いと思いました!

ドキュメントの変更はPRで出してしまって良いと思います!
どうするのか望ましいのか相談したいなら別途issueを出しても良いと思います!

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

プロジェクトのpull requestのフォーマットがどうなっているのか確認

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

contributing.mdが無いことを確認

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

issueもテンプレートがないことを確認

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

requirementsの記述場所を変更

install後にプロジェクトでは使用できなかった為、requirementsは、readme上部に記述があると親切だと感じた

actual

# Beautiful::Log(beta)
Make Rails log beautiful!

## Colored log,Backtrace,Status Code, etc…

## Requirements
Ruby 2.3-

expected

# Beautiful::Log(beta)
Make Rails log beautiful!

## Requirements
Ruby 2.3-

requirementsを追加

railsで動かすものであることはrequirementsに記述があるほうが親切だと感じた。かつバージョンの明記があるとなお良いのではないか

actual

## Requirements
- Ruby 2.3-

expected
## Requirements - Ruby 2.3- - Rails 4.x.x -

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

1つめ
nogahighland/beautiful-log#8

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

2つめ
nogahighland/beautiful-log#9

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

実際にプルリクしたことでハードルはかなり下がった気がしました。
仕事だと割りと説明文言を省略しがちなので、相手に伝わりやすくする為に詳細に書くというのは普段から気をつけるべきという新たな学びもありました

@shitake4

This comment has been minimized.

Copy link
Contributor Author

commented Nov 25, 2017

タイポ直しみたいなところからやっていきたいです

@kenhys

This comment has been minimized.

Copy link
Contributor

commented Nov 25, 2017

仕事だと割りと説明文言を省略しがちなので、相手に伝わりやすくする為に詳細に書くというのは普段から気をつけるべきという新たな学びもありました

新たな学びがあったようでよかったです!
これからもフィードバックの取り組みを続けていってください!

@knokmki612

This comment has been minimized.

Copy link
Member

commented Nov 29, 2017

おつかれさまでした!

直近の東京で開催されるOSS Gateのイベントは以下のとおりです!

是非よかったらまた参加してみてください!

@knokmki612 knokmki612 closed this Nov 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.